improve-claude-md
Skill1 starsChanged 6 months agoMITView on GitHub
Audit and improve CLAUDE.md files by wrapping conditionally-relevant sections in <important if> tags, removing linter territory, and ensuring project accuracy. Use when user wants to optimize their CLAUDE.md for better agent performance.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- PackmindHub/packmindtheir own version, first seen Sep 21, 2026
- zhangliang0115/ai-plugintheir own version, first seen Sep 6, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- PackmindHub/packmind★ 323same name
- zhangliang0115/ai-plugin★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- agent-cliSkill
- askSkill
- blueprintSkill
- brainstormSkill
- carveSkill
- dispatchSkill
- handoffSkill
- leanSkill
- llm-councilSkill
- orientSkill
- react-auditSkill
- shipSkill
- tddSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
If the file exists, read its full contents.
- Distinctive: line 33
Read (never modify) project files to build context.
- Distinctive: line 86
Wait for user approval before proceeding to the next section
- Distinctive: line 104
Only after explicit confirmation, write the file
- Distinctive: line 109
Never delete content without explaining why.
- Distinctive: line 110
If unsure whether something is linter territory, ask — don't assume.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Improve CLAUDE.md — Structured Optimization
Audit an existing CLAUDE.md (or create one from scratch) by scanning the project, scoring the file across eight dimensions, and rewriting it section-by-section with user approval at each step.
Usage
/improve-claude-md -- improve ./CLAUDE.md in current project
/improve-claude-md path/to/file -- improve a specific fileCore Principle
Wrap conditionally-relevant sections in <important if="condition"> XML tags. This prevents the system reminder from dismissing instructions as "may or may not be relevant" — the condition tells the agent exactly when the guidance applies.
Foundational context (identity, directory map) stays bare. Everything else gets a targeted condition.
Workflow
Step 1 — Intake
- Identify the target file. Default:
./CLAUDE.md. Check forAGENTS.mdsymlinks. - If the file exists, read its full contents. If not, confirm the user wants to create one from scratch.
- Confirm scope: "I'll audit and improve this file. Ready to proceed?"
Step 2 — Project Scan
Read (never modify) project files to build context. Adapt the scan to what exists:
| Category | Files to check |
| Language/Framework | package.json, Cargo.toml, pyproject.toml, go.mod, Gemfile |
| Commands | Makefile, justfile, Taskfile.yml, package.json scripts |
| CI/CD | .github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile |
| Linters/Formatters | .eslintrc*, .prettierrc*, biome.json, ruff.toml, rustfmt.toml |
| Testing | vitest.config.*, jest.config.*, pytest.ini, phpunit.xml |
| Config | tsconfig.json, docker-compose.yml, .env.example |
| Structure | Top two levels of the directory tree |
Present a one-paragraph summary: "This is a TypeScript monorepo using pnpm, Vitest, ESLint + Prettier, deployed via GitHub Actions." Ask the user to confirm or correct before proceeding.
Step 3 — Audit
Score the existing CLAUDE.md across eight dimensions. Present findings one dimension at a time (exhaust each before moving on).
Reasoning approach: Many findings are cross-dimensional — e.g., a vague instruction nested inside a domain section, or a code snippet that duplicates linter rules. Hold all 8 dimensions in mind simultaneously while scoring each one. Reason silently through the full file before writing the scorecard. Recommended for this step: opus-4.7 with extended thinking (high effort).
Dimensions:
- Identity — Is there a clear one-sentence project description? Is it bare (unwrapped)?
- Directory map — Present or absent? Accurate against the actual project structure?
- Commands — Are build/test/lint/deploy commands listed? Wrapped in a single
<important if="you need to run commands">block? - Rules granularity — Are rules individually wrapped with specific conditions, or monolithic?
- Domain sections — Are testing, API, state management, deployment sections wrapped with appropriate conditions?
- Linter overlap — Identify instructions that duplicate what the project's linters/formatters already enforce. These are deletion candidates.
- Code snippets — Are there inline code blocks that should be file path references instead?
- Vague instructions — "Follow best practices," "keep code clean," etc. These add noise and should be deleted.
Output a scorecard:
Dimension | Status | Action
-------------------|------------|---------------------------
Identity | Good | None
Directory map | Missing | Generate from project scan
Commands | Unwrapped | Wrap in <important if>
Rules granularity | Monolithic | Split into individual blocks
Domain sections | Partial | Add testing, API sections
Linter overlap | 3 items | Delete
Code snippets | 2 found | Replace with file refs
Vague instructions | 1 found | DeleteStep 4 — Rewrite
Address each scorecard action, one section at a time:
- Show the before (current content or "missing")
- Show the after (proposed content)
- Explain the rationale (why this change improves agent performance)
- Wait for user approval before proceeding to the next section
Transformation rules:
- Identity → one bare sentence at the top
- Directory map → bare, accurate against project scan
- Commands → single
<important if="you need to run commands to build, test, lint, or deploy">block - Rules → split into individual
<important if>blocks with specific conditions (see important-if-catalog.md) - Domain sections → wrap each with a relevant condition
- Linter overlap → delete entirely
- Code snippets → replace with file path references
- Vague instructions → delete entirely
Reference claude-md-template.md for the ideal structure.
Step 5 — Verify & Apply
- Present the complete proposed file for final review
- Walk through the acceptance checklist
- Only after explicit confirmation, write the file
Skill-Specific Rules
- Present diffs section-by-section, not all at once.
- Never delete content without explaining why.
- If unsure whether something is linter territory, ask — don't assume.
Acceptance Checklist
- Project scanned and summary confirmed by user
- Audit scorecard presented and discussed
- Identity section is one bare sentence
- Directory map is accurate and bare
- Commands wrapped in single
<important if>block - Each rule wrapped individually with a specific condition
- Domain sections wrapped with relevant conditions
- No linter-enforceable instructions remain
- No inline code snippets (replaced with file references)
- No vague instructions remain
- User approved final output before file was written
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

