Review and optimize AI context files (CLAUDE.md, AGENTS.md) in the current project. Classifies each line as KEEP, REMOVE, or MOVE using the core test — would removing this cause the agent to make mistakes?
Audits and optimizes Claude context files by classifying lines as KEEP, REMOVE, or MOVE based on whether removal would cause agent mistakes.
npx claudepluginhub maxnoller/claude-code-pluginsThis skill is limited to using the following tools:
Audit the context files in this project (CLAUDE.md, AGENTS.md, CLAUDE.local.md, .claude/rules/) and recommend cuts. These files should only contain what prevents consistent mistakes — not document the project.
For every line: "Would removing this cause the agent to make mistakes?" If no — cut it.
Use Glob to find:
CLAUDE.md, CLAUDE.local.md, .claude/CLAUDE.md, .claude/rules/*.mdAGENTS.mdnode_modules)Read each one in full.
For each section or line, assign one of:
package.json, source files, or the filesystemdocs/, an ADR, .claude/rules/ with path scoping, or a subdirectory context fileApply these rules:
| Content type | Classification |
|---|---|
| Verification commands to run after changes | KEEP |
| Coding rules differing from framework defaults | KEEP |
| Non-obvious gotchas / footguns | KEEP |
| Commit format + hook behavior | KEEP |
| Files/dirs to never modify | KEEP |
| Project description / tech stack overview | REMOVE (reads package.json) |
| Directory structure / file tree | REMOVE (explores filesystem) |
| Key file lists | REMOVE (searches codebase) |
| Architecture diagrams or explanations | MOVE (ADR or docs/) |
| Environment variable templates | REMOVE (reads .env.example) |
| Database schema documentation | REMOVE (reads schema files) |
| Deployment / CI pipeline info | REMOVE (irrelevant during coding) |
| Feature-specific flows or setup steps | MOVE (docs/ or subdirectory context file) |
Show a summary table:
| Section | Lines | Classification | Reason |
|---|---|---|---|
| ... | ... | KEEP / REMOVE / MOVE | ... |
Show: current line count → projected line count after cuts.
Do NOT apply changes yet. Ask the user which recommendations to apply.
After approval, edit the file(s) to apply the agreed cuts. Verify the result reads cleanly.
docs/decisions/ (ADRs), not context files.You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.