All skills
anthropics avatar

/claude-md-improver

@a86e346

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".

Use this Skill: https://skilld.dev/gh/anthropics/claude-plugins-official/claude-md-improver

This session only. Nothing lands on disk.

referencesupdate-guidelines.md

≈800 tokens on demand. Your agent reads this file only when SKILL.md points to it.

CLAUDE.md Update Guidelines

Core Principle

Only add information that will genuinely help future Claude sessions. The context window is precious - every line must earn its place.

What TO Add

1. Commands/Workflows Discovered

## Build

`npm run build:prod` - Full production build with optimization
`npm run build:dev` - Fast dev build (no minification)

Why: Saves future sessions from discovering these again.

2. Gotchas and Non-Obvious Patterns

## Gotchas

- Tests must run sequentially (`--runInBand`) due to shared DB state
- `yarn.lock` is authoritative; delete `node_modules` if deps mismatch

Why: Prevents repeating debugging sessions.

3. Package Relationships

## Dependencies

The `auth` module depends on `crypto` being initialized first.
Import order matters in `src/bootstrap.ts`.

Why: Architecture knowledge that isn't obvious from code.

4. Testing Approaches That Worked

## Testing

For API endpoints: Use `supertest` with the test helper in `tests/setup.ts`
Mocking: Factory functions in `tests/factories/` (not inline mocks)

Why: Establishes patterns that work.

5. Configuration Quirks

## Config

- `NEXT_PUBLIC_*` vars must be set at build time, not runtime
- Redis connection requires `?family=0` suffix for IPv6

Why: Environment-specific knowledge.

What NOT to Add

1. Obvious Code Info

Bad:

The `UserService` class handles user operations.

The class name already tells us this.

2. Generic Best Practices

Bad:

Always write tests for new features.
Use meaningful variable names.

This is universal advice, not project-specific.

3. One-Off Fixes

Bad:

We fixed a bug in commit abc123 where the login button didn't work.

Won't recur; clutters the file.

4. Verbose Explanations

Bad:

The authentication system uses JWT tokens. JWT (JSON Web Tokens) are
an open standard (RFC 7519) that defines a compact and self-contained
way for securely transmitting information between parties as a JSON
object. In our implementation, we use the HS256 algorithm which...

Good:

Auth: JWT with HS256, tokens in `Authorization: Bearer <token>` header.

Diff Format for Updates

For each suggested change:

1. Identify the File

File: ./CLAUDE.md
Section: Commands (new section after ## Architecture)

2. Show the Change

 ## Architecture
 ...

+## Commands
+
+| Command | Purpose |
+|---------|---------|
+| `npm run dev` | Dev server with HMR |
+| `npm run build` | Production build |
+| `npm test` | Run test suite |

3. Explain Why

Why this helps: The build commands weren't documented, causing confusion about how to run the project. This saves future sessions from needing to inspect package.json.

Validation Checklist

Before finalizing an update, verify:

  • Each addition is project-specific
  • No generic advice or obvious info
  • Commands are tested and work
  • File paths are accurate
  • Would a new Claude session find this helpful?
  • Is this the most concise way to express the info?

Source: SKILL.md on GitHub

1 warning17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill includes some security considerations such as indirect prompt injection risks and access to local configuration files. While these warrant review, they are part of the skill's intended functionality for auditing project documentation. See detailed analysis for context.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    1/4 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at a86e346. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 9 months ago
tools
Read, Glob, Grep, Bash, Edit
  • Documentation
  • claude-md
  • project-context
  • audit
  • code-quality
  • repository-management
  • ai-coding-agents

README badge

README badge for anthropics/claude-plugins-official/claude-md-improver

Scans a repository for CLAUDE.md files, evaluates them against quality criteria, outputs a quality report with scores and recommendations, then applies targeted improvements with user approval. Designed for teams maintaining project context files that Claude Code reads during sessions.

Generated from the current SKILL.md.

What file types and locations does this skill scan?
The skill finds CLAUDE.md files in multiple locations: project root (./CLAUDE.md), local overrides (./.claude.local.md), global defaults (~/.claude/CLAUDE.md), package-specific files in monorepos (./packages/*/CLAUDE.md), and nested subdirectories. It searches up to 50 files per scan.
Does this skill write to CLAUDE.md files automatically?
No. The skill presents a quality report and list of recommended changes first, then asks for user approval before making any updates to files.
What happens if CLAUDE.md is missing or outdated?
The skill flags this during the quality assessment phase (typically a D or F grade) and recommends specific additions based on discovered commands, architecture patterns, and gotchas found in the codebase.
Can this skill work with monorepo projects?
Yes. The skill scans for CLAUDE.md files at package level and automatically handles monorepos because Claude's file discovery works across parent directories.

Generated from the current SKILL.md. These answers refresh after source changes.