Rédaction de CLAUDE.md

VérifiéSûr

Méthodologie pour éditer CLAUDE.md afin de le garder concis, pertinent et bien structuré. Aide à maintenir un fichier de configuration minimal mais efficace en imposant des limites de lignes et de pertinence, et en déplaçant les documents de référence dans docs/.

Spar Skills Guide Bot
DeveloppementIntermédiaire
4002/06/2026
Claude Code
#claude-md#authoring#maintenance#brevity#structure

Recommandé pour

Notre avis

Méthodologie pour créer et maintenir un fichier CLAUDE.md concis et structuré pour les agents IA.

Points forts

  • Garder le fichier sous 120 lignes
  • Assurer une pertinence de 80% par ligne
  • Structure claire avec titres et sections
  • Automatisation via un linter

Limites

  • Nécessite une discipline d'édition régulière
  • Peut devenir obsolète si les mises à jour ne sont pas suivies
  • Ne couvre pas tous les cas d'usage spécifiques
Quand l'utiliser

Lors de la configuration initiale d'un projet avec un agent IA pour établir des directives claires et concises.

Quand l'éviter

Pour des projets très simples où un fichier court non structuré suffit.

Analyse de sécurité

Sûr
Score qualité85/100

The skill only invokes a linting/validation command via a task runner after stopping; no destructive or exfiltrating actions are performed, and it only uses standard, non-obfuscated tools.

Aucun point d'attention détecté

Exemples

Validate CLAUDE.md structure
Run the linter to check if my CLAUDE.md follows the recommended structure and length.
Refactor CLAUDE.md
My CLAUDE.md is too long. Please restructure it to be under 120 lines and move reference material to docs/ folder.
Guide for editing CLAUDE.md
Explain the key principles for writing a good CLAUDE.md, including the target length, structure, and what to include/exclude.

name: claude-md description: "Methodology for authoring and maintaining CLAUDE.md. Enforces brevity, relevance, and structure." user-invocable: false allowed-tools:

  • Read
  • Edit
  • Bash
  • Grep
  • Glob hooks: Stop:
    • type: command command: "task claude:validate-skill -- --skill claude-md"

CLAUDE.md Authoring

Purpose

Methodology for editing CLAUDE.md that keeps it concise, high-signal, and structurally sound. The guide (patterns/anti-patterns in skill.yaml) is the primary value; the linter (lint-claude-md.sh) is a safety net for quantifiable rules.

Quick Reference

  • Target: <120 lines, 80% relevance per line
  • Structure: Title, behavioral, "Built with:", dirs-only structure, auto-gen table, commands, conventions
  • Rule: Reference material lives in docs/ — CLAUDE.md links to it
task docs:lint-claude-md    # Validate CLAUDE.md structure

Key Principle

Every line in CLAUDE.md must be useful in 80%+ of sessions. If it's reference material, move it to docs/ and link. If Claude can discover it with tools, omit it.

Automation

See skill.yaml for patterns, anti-patterns, and editing procedure. See collaboration.yaml for boundaries with docs-refresh. See sharp-edges.yaml for common pitfalls.

Skills similaires