AgentSkillsCN

claude-md-improver

通过 gh CLI 自动化 GitHub 仓库、议题、拉取请求、分支、CI/CD,以及权限管理。以程序化方式管理代码工作流、审查 PR、搜索代码,以及处理部署。

SKILL.md
--- frontmatter
name: claude-md-improver
description: Audit and improve CLAUDE.md files in repositories. Scans for all CLAUDE.md files, evaluates quality against criteria, outputs quality report, then makes targeted updates.
tools: Read, Glob, Grep, Bash, Edit

CLAUDE.md Improver

Audit, evaluate, and improve CLAUDE.md files across a codebase.

Workflow

Phase 1: Discovery

Find all CLAUDE.md files:

bash
find . -name "CLAUDE.md" -o -name ".claude.md" -o -name ".claude.local.md" 2>/dev/null | head -50

File Types:

TypeLocationPurpose
Project root./CLAUDE.mdPrimary project context (shared with team)
Local overrides./.claude.local.mdPersonal/local settings (gitignored)
Global defaults~/.claude/CLAUDE.mdUser-wide defaults
Package-specific./packages/*/CLAUDE.mdModule-level context in monorepos

Phase 2: Quality Assessment

CriterionWeightCheck
Commands/workflows documentedHighBuild/test/deploy commands present?
Architecture clarityHighCan Claude understand the codebase structure?
Non-obvious patternsMediumGotchas and quirks documented?
ConcisenessMediumNo verbose or obvious info?
CurrencyHighReflects current codebase state?
ActionabilityHighInstructions 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: Report

Output quality report BEFORE making any updates.

Phase 4: Targeted Updates

After user approval:

  • Propose targeted additions only
  • Keep minimal - avoid restating what's obvious
  • Show diffs for each change

Phase 5: Apply

Apply changes using Edit tool. Preserve existing structure.

What Makes a Great CLAUDE.md

  • Concise and human-readable
  • Actionable commands that can be copy-pasted
  • Project-specific patterns, not generic advice
  • Non-obvious gotchas and warnings
  • Sections: Commands, Architecture, Key Files, Code Style, Environment, Testing, Gotchas