بنقرة واحدة
audit-agents-md
Audit a project's CLAUDE.md / AGENTS.md for structure, bloat, stale references, and best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Audit a project's CLAUDE.md / AGENTS.md for structure, bloat, stale references, and best practices
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Read-only analysis of global Claude Code configuration — flags issues and suggests improvements
Set up global Claude Code configuration — personal CLAUDE.md, skills, hooks, and settings
Scan the current project and generate tailored project-level Claude Code configuration
Create a git commit with proper context and conventional commit message
Review a pull request using parallel agents for thorough coverage
| name | audit-agents-md |
| description | Audit a project's CLAUDE.md / AGENTS.md for structure, bloat, stale references, and best practices |
| disable-model-invocation | true |
| effort | high |
| allowed-tools | Read Glob Grep Bash(ls *) Bash(find *) Bash(cat *) Bash(wc *) Bash(test *) Bash(stat *) Bash(head *) Bash(command -v *) |
Audit the CLAUDE.md or AGENTS.md in the current project directory. ultrathink about what you find.
This is read-only. Do NOT create, edit, or delete any files.
If no instruction file (CLAUDE.md, AGENTS.md, AGENT.md, .cursorrules) is found in the project root, report that and stop.
!wc -l CLAUDE.md AGENTS.md AGENT.md .cursorrules 2>/dev/null || echo "(no instruction files in root)"
!ls docs/ 2>/dev/null | head -20 || echo "(no docs/ directory)"
!ls .claude/rules/ 2>/dev/null || echo "(no .claude/rules/ directory)"
CLAUDE.md, AGENTS.md, AGENT.md, .cursorrules
**/{CLAUDE,AGENTS,AGENT}.mddocs/ directory contents (from snapshot).claude/rules/ directory (from snapshot)Read the root instruction file in full. If over 500 lines, read in chunks.
Based on analysis of 2,500+ repositories:
| Lines | Verdict |
|---|---|
| 0 (missing) | ✗ No instruction file found |
| 1–30 | ⚠ Likely too thin — check for missing sections |
| 31–150 | ✓ Good range — concise and effective |
| 151–250 | ⚠ Getting long — look for extraction candidates |
| 251+ | ✗ Too long — needs decomposition into docs/, subtree files, or .claude/rules/ |
Research note: Gloaguen et al. (2026) found that verbose context files inflate reasoning costs without proportional task improvement. Minimal, precise content outperforms comprehensive documentation.
The GitHub analysis found that top-performing instruction files cover these six areas. Check whether they exist (by heading or equivalent content). Not every project needs all — use judgment.
| Area | What to look for | When it matters |
|---|---|---|
| Commands | Build, test, lint, deploy — executable with flags, not just tool names | Always for code projects |
| Testing | Framework, how to run, patterns, coverage expectations | Code projects |
| Project structure | Key directories and files, architecture bird's-eye view | Projects with >10 files |
| Code style | Real code examples showing preferred patterns (not prose descriptions) | Always |
| Git workflow | Commit style, branching, PR conventions | Team projects |
| Boundaries | What the agent must never do, what requires asking first | Always |
Flag missing critical areas as ⚠ with a one-line rationale.
docs/ directory or subtree files → ⚠ suggest decomposition@import is used, verify imported files exist (paths are relative to the file containing the @import directive)Scan for these patterns and flag as ⚠:
[x] items) still inline — historical noiseFor each bloat finding, note the line range and suggest where to extract it.
Verify a sample of references (up to 10):
test -e <path>command -v <bin>Flag stale references as ✗ with the specific line.
Flag these as ✗:
~/.claude/CLAUDE.md, flag project-bound paths/commandsFlag as ⚠ if the file reads more like human documentation than agent instructions:
src/adapters/base.rb for the pattern to follow." The agent won't read the file right away, but will know where to look when needed.git push --force, documenting "never force push" wastes tokens. Note: this only applies when the audited project actually has hooks configured.Quick check on naming and portability:
# AGENTS.md Audit — [project name or directory]
## Summary
[1-2 sentences: overall quality, biggest issue]
## File stats
- **File:** [path] ([N] lines)
- **Subtree files:** [count or "none"]
- **Docs directory:** [yes/no, file count if yes]
- **Rules:** [count or "none"]
- **Cross-tool:** [AGENTS.md / CLAUDE.md / both — compatibility note if relevant]
## ✗ Problems
- [issue + specific line/section + fix]
## ⚠ Suggestions
- [improvement + rationale + how]
## ✓ Good
- [things done well — be specific]
## Extraction candidates
[Only if file is >150 lines]
- **Lines [N-M]: [section name]** → extract to `docs/[name].md` ([reason])
## Next steps
1. [most impactful improvement]
2. [second]
3. [third]
Rules for the report: