Agent skill
md-audit
Audits and improves CLAUDE.md files by scanning repositories. Use when maintaining CLAUDE.md files, optimizing project instructions, or reviewing what project instructions should contain. Evaluates quality against templates, outputs scored reports, and applies targeted updates.
Install this agent skill to your Project
npx add-skill https://github.com/philoserf/claude-code-setup/tree/main/skills/md-audit
SKILL.md
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.
Reference Files
- quality-criteria.md - Detailed scoring rubrics per criterion
- templates.md - CLAUDE.md templates by project type
- update-guidelines.md - Rules for proposing and applying updates
Workflow
Phase 1: Discovery
Find all CLAUDE.md files in the repository:
Use Glob to find all CLAUDE.md files:
Patterns: **/CLAUDE.md, **/.claude.md, **/.claude.local.md
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.
Edge cases:
- Empty or newly-created files: Score as F (0/100) and recommend using the relevant template from templates.md
- Overlapping content across files: Flag duplication and recommend consolidating to the most specific location
Phase 2: Quality Assessment
For each CLAUDE.md file, evaluate against quality criteria. See 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):
-
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
-
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
-
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:
### 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.
User tips to include in the report:
#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
Templates
See templates.md for CLAUDE.md templates by project type.
Common Issues to Flag
- Stale commands: Build commands that no longer work
- Missing dependencies: Required tools not mentioned
- Outdated architecture: File structure that's changed
- Missing environment setup: Required env vars or config
- Broken test commands: Test scripts that have changed
- Undocumented gotchas: Non-obvious patterns not captured
What Makes a Great CLAUDE.md
See templates.md for templates and key principles. In short: concise, actionable, project-specific, with non-obvious gotchas.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
pre-release
Validates a project is ready to tag and ship. Use when tagging a release, cutting a version, shipping a package, or asking "are we ready to release?" Checks repo hygiene, CI status, docs, version sync, and build verification. Optimized for Obsidian plugins with fallback detection for other project types.
local-issues
Reviews a codebase for bugs, design issues, and code cleanliness problems with specific file paths and line numbers. Use when auditing code quality, finding bugs, doing a code review, finding problems, or reviewing a project for issues. Creates issue files in `.issues/` directory.
skill-improve
Generates prioritized improvement recommendations for Claude Code skills. Use when improving skills, enhancing customizations, or wanting actionable feedback on how to make a skill better. Provides impact/effort prioritization with specific fix suggestions.
release
Executes the final release workflow for Obsidian plugins after pre-release checks pass. Use when tagging a release, publishing a version, or shipping an Obsidian plugin. Bumps version via bun run script, creates git tag, pushes to trigger GitHub Actions, and updates GitHub release notes from CHANGELOG.md.
skill-quality
Scores Claude Code skills (1-5) across 6 weighted quality dimensions aligned with official Anthropic docs. Use when evaluating skill quality, rating skills, scoring customizations, comparing skill effectiveness, or checking if a skill follows best practices. Produces per-dimension scores with evidence, weighted totals, quality tier classification, and actionable improvement recommendations.
obsidian-cli
Interacts with Obsidian vaults using the Obsidian CLI to read, create, and manage notes, tasks, properties, tags, and more. Also supports plugin and theme development with commands to reload plugins, run JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, add to daily note, find notes about a topic, check tasks, append to a note, query the vault, list tags, list files, manage bookmarks, check sync status, view file history, use templates, query bases, run QuickAdd, perform vault operations from the command line, or develop and debug Obsidian plugins and themes.
Didn't find tool you were looking for?