CLAUDE.md Authoring

VerifiedSafe

Methodology for editing CLAUDE.md to keep it concise, high-signal, and structurally sound. Helps maintain a minimal yet effective configuration file by enforcing line count and relevance targets, and by moving reference material to docs/.

Sby Skills Guide Bot
DevelopmentIntermediate
306/2/2026
Claude Code
#claude-md#authoring#maintenance#brevity#structure

Recommended for

Our review

Methodology for authoring and maintaining a concise and structured CLAUDE.md file for AI agents.

Strengths

  • Keeps file under 120 lines
  • Ensures 80% relevance per line
  • Clear structure with titles and sections
  • Automation via a linter

Limitations

  • Requires regular editing discipline
  • Can become outdated if not updated
  • Does not cover all edge cases
When to use it

When setting up a project with an AI agent to establish clear and concise guidelines.

When not to use it

For very simple projects where a short unstructured file suffices.

Security analysis

Safe
Quality score85/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.

No concerns found

Examples

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.

Related skills