Agent Skill
CLAUDE.md improver (Anthropic)
Anthropic's Claude Code skill that finds every CLAUDE.md in a repo, grades each one A to F, shows a report, then edits only the files you approve.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkInstall
Commands are pinned to commit 30c0ac7, the version we read, wherever the install method supports it.
npx skills
npx skills add anthropics/claude-plugins-official@30c0ac7ff8f2f6e741ed8204d5997f14bf80b481 --skill claude-md-improver -a claude-codeCopies the skill into .claude/skills/ in this project, pinned to the reviewed commit.
Plugin marketplace
/plugin install claude-md-management@claude-plugins-officialRun inside Claude Code. Installs the whole claude-md-management plugin from its default branch, not the pinned commit; the official marketplace is available by default.
npx skills
npx skills add anthropics/claude-plugins-official@30c0ac7ff8f2f6e741ed8204d5997f14bf80b481 --skill claude-md-improverPinned to the commit we reviewed. The CLI asks which agents to install for; add -g to install for your user instead of this project.
What it does
Keeps Claude Code’s project memory useful. The agent finds every CLAUDE.md (and .claude.local.md) in the repository, scores each one against a rubric (commands documented, architecture clear, gotchas recorded, concise, current, actionable) and grades it A to F. It always prints the quality report before changing anything. After you approve, it makes targeted edits: adding missing build and test commands, removing stale or obvious text, and noting non-obvious patterns it found in the code. Templates and update rules live in three reference files.
When to use it
When a CLAUDE.md was written months ago and nobody trusts it, after a big refactor, or when you take over a monorepo with a file per package and want to know which ones are thin or wrong.
When to skip it
If your team standardises on AGENTS.md for several agents, use Sentry’s agents-md instead. This skill only looks at CLAUDE.md files. It is also not something to upload to claude.ai or the Claude API: the name contains the reserved word “claude” and the frontmatter uses a tools field that is not in the open spec, so both surfaces would reject it.
Try it
Audit the CLAUDE.md files in this repo. Show me the quality report first, then
propose edits for anything graded C or below. Check every command you add by
running it.
The last sentence matters: the rubric asks for copy-paste-ready commands but does not tell the agent to run them.
What it can touch
- Bundles scripts
- No
- Pre-approved tools
- None declared
- Needs
- Claude Code
- Client-specific fields
- tools
claude.ai and the Claude API reject uploads that use fields outside the open spec or names containing "claude" or "anthropic", so this skill needs editing before you upload it there.
Its instructions steer what your agent does, and it may have changed since the commit we read. How to check a skill.
It reads the whole repository, runs find and similar read commands, and edits CLAUDE.md files once you approve. The tools field lists Read, Glob, Grep, Bash, Edit, but Claude Code ignores that key, so your normal permission prompts still apply. No scripts, no network.
At commit 30c0ac7 the SKILL.md is 179 lines long. Alongside it:
references/(3 entries)
Alternatives
agents-md for agent-neutral instruction files. Our tutorial on CLAUDE.md and AGENTS.md and the write a useful AGENTS.md workflow explain what belongs in these files in the first place.
SKILL.md
The file exactly as published at the reviewed commit, reproduced under its Apache-2.0 licence.
---
name: claude-md-improver
description: 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".
tools: Read, Glob, Grep, Bash, Edit
---
# CLAUDE.md Improver
Audit, evaluate, and improve CLAUDE.md files across a codebase to ensure Claude Code has optimal project context.
**This skill can write to CLAUDE.md files.** After presenting a quality report and getting user approval, it updates CLAUDE.md files with targeted improvements.
## Workflow
### Phase 1: Discovery
Find all CLAUDE.md files in the repository:
```bash
find . -name "CLAUDE.md" -o -name ".claude.md" -o -name ".claude.local.md" 2>/dev/null | head -50
```
**File Types & Locations:**
| Type | Location | Purpose |
|------|----------|---------|
| Project root | `./CLAUDE.md` | Primary project context (checked into git, shared with team) |
| Local overrides | `./.claude.local.md` | Personal/local settings (gitignored, not shared) |
| Global defaults | `~/.claude/CLAUDE.md` | User-wide defaults across all projects |
| Package-specific | `./packages/*/CLAUDE.md` | Module-level context in monorepos |
| Subdirectory | Any nested location | Feature/domain-specific context |
**Note:** Claude auto-discovers CLAUDE.md files in parent directories, making monorepo setups work automatically.
### Phase 2: Quality Assessment
For each CLAUDE.md file, evaluate against quality criteria. See [references/quality-criteria.md](references/quality-criteria.md) for detailed rubrics.
**Quick Assessment Checklist:**
| Criterion | Weight | Check |
|-----------|--------|-------|
| Commands/workflows documented | High | Are build/test/deploy commands present? |
| Architecture clarity | High | Can Claude understand the codebase structure? |
| Non-obvious patterns | Medium | Are gotchas and quirks documented? |
| Conciseness | Medium | No verbose explanations or obvious info? |
| Currency | High | Does it reflect current codebase state? |
| Actionability | High | Are instructions executable, not vague? |
**Quality Scores:**
- **A (90-100)**: Comprehensive, current, actionable
- **B (70-89)**: Good coverage, minor gaps
- **C (50-69)**: Basic info, missing key sections
- **D (30-49)**: Sparse or outdated
- **F (0-29)**: Missing or severely outdated
### Phase 3: Quality Report Output
**ALWAYS output the quality report BEFORE making any updates.**
Format:
```
## CLAUDE.md Quality Report
### Summary
- Files found: X
- Average score: X/100
- Files needing update: X
### File-by-File Assessment
#### 1. ./CLAUDE.md (Project Root)
**Score: XX/100 (Grade: X)**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Commands/workflows | X/20 | ... |
| Architecture clarity | X/20 | ... |
| Non-obvious patterns | X/15 | ... |
| Conciseness | X/15 | ... |
| Currency | X/15 | ... |
| Actionability | X/15 | ... |
**Issues:**
- [List specific problems]
**Recommended additions:**
- [List what should be added]
#### 2. ./packages/api/CLAUDE.md (Package-specific)
...
```
### Phase 4: Targeted Updates
After outputting the quality report, ask user for confirmation before updating.
**Update Guidelines (Critical):**
1. **Propose targeted additions only** - Focus on genuinely useful info:
- Commands or workflows discovered during analysis
- Gotchas or non-obvious patterns found in code
- Package relationships that weren't clear
- Testing approaches that work
- Configuration quirks
2. **Keep it minimal** - Avoid:
- Restating what's obvious from the code
- Generic best practices already covered
- One-off fixes unlikely to recur
- Verbose explanations when a one-liner suffices
3. **Show diffs** - For each change, show:
- Which CLAUDE.md file to update
- The specific addition (as a diff or quoted block)
- Brief explanation of why this helps future sessions
**Diff Format:**
```markdown
### Update: ./CLAUDE.md
**Why:** Build command was missing, causing confusion about how to run the project.
```diff
+ ## Quick Start
+
+ ```bash
+ npm install
+ npm run dev # Start development server on port 3000
+ ```
```
```
### Phase 5: Apply Updates
After user approval, apply changes using the Edit tool. Preserve existing content structure.
## Templates
See [references/templates.md](references/templates.md) for CLAUDE.md templates by project type.
## Common Issues to Flag
1. **Stale commands**: Build commands that no longer work
2. **Missing dependencies**: Required tools not mentioned
3. **Outdated architecture**: File structure that's changed
4. **Missing environment setup**: Required env vars or config
5. **Broken test commands**: Test scripts that have changed
6. **Undocumented gotchas**: Non-obvious patterns not captured
## User Tips to Share
When presenting recommendations, remind users:
- **`#` key shortcut**: During a Claude session, press `#` to have Claude auto-incorporate learnings into CLAUDE.md
- **Keep it concise**: CLAUDE.md should be human-readable; dense is better than verbose
- **Actionable commands**: All documented commands should be copy-paste ready
- **Use `.claude.local.md`**: For personal preferences not shared with team (add to `.gitignore`)
- **Global defaults**: Put user-wide preferences in `~/.claude/CLAUDE.md`
## What Makes a Great CLAUDE.md
**Key principles:**
- Concise and human-readable
- Actionable commands that can be copy-pasted
- Project-specific patterns, not generic advice
- Non-obvious gotchas and warnings
**Recommended sections** (use only what's relevant):
- Commands (build, test, dev, lint)
- Architecture (directory structure)
- Key Files (entry points, config)
- Code Style (project conventions)
- Environment (required vars, setup)
- Testing (commands, patterns)
- Gotchas (quirks, common mistakes)
- Workflow (when to do what)Related skills
AGENTS.md maintainer (Sentry)
Writes and trims AGENTS.md and CLAUDE.md files so they stay short, point at real docs, and only hold rules the agent can't infer from the repo.
Skill creator
Anthropic's skill for writing new skills and improving old ones: interviews you, drafts SKILL.md, runs evals against a baseline and tunes the description.
Find skills
Helps the agent search for an existing skill with the npx skills CLI, check its quality and offer to install it, before writing anything new.
Guides and recipes that use CLAUDE.md improver (Anthropic)
- Claude Code skills: folders, invocation and plugins
Where Claude Code skills live, which copy wins when names clash, how /skill-name works, Claude Code's extra frontmatter fields and how plugin skills are named.
- Migrate Cursor rules, slash commands and prompts to skills
Turn Cursor rules into skills with /migrate-to-skills, see what it converts and skips, move Claude Code commands across, and know what stays in AGENTS.md.
- CLAUDE.md and AGENTS.md: instruction files for coding agents
CLAUDE.md vs AGENTS.md: what to put in each, where Claude Code, Codex, Cursor and Copilot look for them, and how to keep one source of truth without drift.
- Write a useful AGENTS.md: example, template and test
An AGENTS.md example and template with build and test commands, conventions and traps, plus a before-and-after task that shows whether the file actually helps.
- CLAUDE.md
Claude Code's instruction file, read at the start of a session from the project and user directories, so standing rules apply every time.