CL

claudemd-maintainer

Get context-aware advice for optimizing your project's CLAUDE.md instruction file.

Install

mkdir -p .claude/skills/claudemd-maintainer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3166" && unzip -o skill.zip -d .claude/skills/claudemd-maintainer && rm skill.zip

Installs to .claude/skills/claudemd-maintainer

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Context-aware guidance for maintaining and improving CLAUDE.md files. Use when editing CLAUDE.md, discussing documentation structure for AI assistants, or optimizing project instructions.
187 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Validates CLAUDE.md instruction length
  • Ensures compliance with progressive disclosure patterns
  • Provides templates for stack and rule sections
  • Identifies redundant code snippet documentation
  • Promotes file references over hard-coded examples

How it works

Checks the file against a set of documented architectural principles for LLM context files and suggests restructuring based on best practices.

Inputs & outputs

You give it
Content of CLAUDE.md
You get back
Optimized structure and instructions for improvement

When to use claudemd-maintainer

  • Optimize CLAUDE.md instructions
  • Document project architecture
  • Clean up instruction files
  • Standardize project onboarding

About this skill

CLAUDE.md Maintainer (Smart Router)

Purpose

Context-aware guidance for maintaining and improving CLAUDE.md files. Helps ensure the file stays effective, concise, and follows best practices for LLM instruction files.

When Auto-Activated

  • Editing or discussing CLAUDE.md
  • Keywords: claude.md, project instructions, onboarding claude, context file
  • Discussing documentation structure for AI assistants

🚨 CRITICAL RULES

  1. Keep under 300 lines - Research shows LLMs handle ~150-200 instructions reliably; performance degrades with more
  2. Never auto-generate - Manually craft each line; auto-generated content often contains noise
  3. Universal applicability only - Remove task-specific or narrow-scope guidance
  4. File references over code snippets - Code embeds become outdated; paths stay accurate

📊 Effective CLAUDE.md Principles

What To Include (WHAT, WHY, HOW)

CategoryIncludeAvoid
StackTechnologies, architecture overviewExhaustive dependency lists
Critical RulesMust-follow behaviors (consolidated)Duplicate rules across sections
Quick CommandsEssential build/run commandsFull command reference
File ReferencesPaths to detailed guidesEmbedded code that can outdated
Common MistakesDocumented actual failuresHypothetical warnings

What To Exclude

  • Code style guidelines → Use linters instead (SwiftFormat, ESLint, etc.)
  • Exhaustive command references → Point to tool documentation
  • Task-specific instructions → Put in skills or separate docs
  • Code snippets → Use file:line references instead

🎯 Progressive Disclosure Pattern

Level 1: CLAUDE.md (~100-150 lines ideal, max 300)
├─ Critical rules (must-follow behaviors)
├─ Quick start (essential commands only)
├─ High-level architecture
└─ Pointers to Level 2 and 3

Level 2: Skills (.claude/skills/)
├─ Domain-specific quick references
├─ Decision trees and workflows
└─ "→ Routes to" comprehensive docs

Level 3: Specialized Guides
├─ Complete technical documentation
├─ Full examples and edge cases
└─ Troubleshooting guides

📋 Quick Audit Checklist

When reviewing CLAUDE.md:

  • Line count under 300? (wc -l CLAUDE.md)
  • No duplicate rules? (Search for repeated concepts)
  • Code snippets minimized? (Replace with file path references)
  • Narrow-scope items removed? (Move to skills)
  • Critical rules consolidated? (Single authoritative location)
  • File references current? (Paths still valid)
  • Common mistakes documented? (Actual failures, not hypotheticals)

🔄 Optimization Workflow

Reducing Line Count

  1. Find duplicates: Search for repeated concepts

    # Find potential duplicates
    grep -n "NEVER" CLAUDE.md | head -20
    
  2. Consolidate rules: Move all critical rules to one section

  3. Replace code with references:

    # ❌ Before (takes 10+ lines)
    ### Typography
    ```swift
    AnytypeText("Title", style: .uxTitle1Semibold)
    AnytypeText("Body", style: .bodyRegular)
    

    ✅ After (1 line)

    Typographypath/to/TYPOGRAPHY_MAPPING.md

  4. Move narrow guidance to skills: If it applies to < 20% of tasks, it's a skill

Adding New Guidance

Before adding, ask:

  1. Does this apply to most tasks? (If no → skill or specialized doc)
  2. Is there existing guidance? (If yes → consolidate, don't duplicate)
  3. Can a linter/tool enforce this? (If yes → use the tool instead)
  4. Will this code example outdated quickly? (If yes → use file reference)

⚠️ Common Mistakes

Accumulating Hotfixes

# ❌ WRONG - Adding one-off rules
### Special Note (2025-01-15)
Remember to always check X when doing Y...

# ✅ CORRECT - Add to appropriate skill or remove

Duplicating Rules

# ❌ WRONG - Same rule in 3 places
## Critical Rules: NEVER add AI signatures
## Pre-Commit: NO AI signatures
## PR Format: No "Generated with Claude"

# ✅ CORRECT - Single consolidated rule
## Critical Rules
2. **NEVER add AI signatures anywhere** - No Co-Authored-By, no emoji signatures

Embedding Code That Outdates

# ❌ WRONG - Code will outdated
```swift
Image(asset: .X32.qrCode)  // What if asset name changes?

✅ CORRECT - File reference stays accurate

IconsModules/Assets/.../ImageAsset.swift:45


## 📚 Research & Best Practices

**Source**: Based on industry practices and LLM behavior research

### Key Findings
- LLMs handle ~150-200 instructions reliably
- Performance degrades with additional instructions
- Irrelevant context may be ignored entirely (Claude adds "this context may or may not be relevant")
- Code snippets in docs become maintenance burden
- Progressive disclosure reduces context overhead

### Recommended Metrics
| Metric | Target | Max |
|--------|--------|-----|
| Total lines | 100-150 | 300 |
| Code blocks | 2-4 | 6 |
| Critical rules | 3-5 | 10 |
| Sections | 6-8 | 12 |

## 🔗 Related

- `.claude/skills/README.md` - Skills system overview
- `.claude/skills/skills-manager/SKILL.md` - Managing the skills system
- Progressive disclosure architecture documentation

---

**Navigation**: This skill helps maintain CLAUDE.md quality. For skills system management, see `skills-manager`. For adding new skills, see `.claude/skills/README.md`.

When not to use it

  • Non-project documentation
  • Very short, static instruction files

Prerequisites

Active CLAUDE.md file

Limitations

  • Requires manual file editing
  • Does not enforce content accuracy
  • Subjective judgment on instruction quality

How it compares

Advises on the structure of instruction files specifically to improve LLM performance, rather than just checking for grammar or typos.

Compared to similar skills

claudemd-maintainer side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
claudemd-maintainer (this skill)16moReviewIntermediate
ml-paper-writing486moReviewAdvanced
docs-review107moNo flagsBeginner
claude-md-improver216moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

ml-paper-writing

davila7

Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification workflows.

4897

docs-review

metabase

Review documentation changes for compliance with the Metabase writing style guide. Use when reviewing pull requests, files, or diffs containing documentation markdown files.

1085

claude-md-improver

anthropics

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".

2167

write-docs

tldraw

Writing SDK documentation for tldraw. Use when creating new documentation articles, updating existing docs, or when documentation writing guidance is needed. Applies to docs in apps/docs/content/.

665

update-docs

vercel

This skill should be used when the user asks to "update documentation for my changes", "check docs for this PR", "what docs need updating", "sync docs with code", "scaffold docs for this feature", "document this feature", "review docs completeness", "add docs for this change", "what documentation is affected", "docs impact", or mentions "docs/", "docs/01-app", "docs/02-pages", "MDX", "documentation update", "API reference", ".mdx files". Provides guided workflow for updating Next.js documentation based on code changes.

2543

wiki-architect

microsoft

Analyzes code repositories and generates hierarchical documentation structures with onboarding guides. Use when the user wants to create a wiki, generate documentation, map a codebase structure, or understand a project's architecture at a high level.

1144

Search skills

Search the agent skills registry