From claude-optimize
Use when running /optimize:init, /optimize:audit, or /optimize:context to assess CLAUDE.md quality, generate templates, and suggest improvements. Scores files using a weighted rubric covering commands, architecture, patterns, conciseness, currency, and actionability. Do NOT trigger on general file editing or coding tasks.
npx claudepluginhub btcdlabs/btcd-cc-marketplace --plugin claude-optimizeThis skill uses the workspace's default tool permissions.
Assesses and improves CLAUDE.md files using a structured quality rubric. Powers the CLAUDE.md quality dimension across `/optimize:init`, `/optimize:audit`, and `/optimize:context`.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Designs, implements, and audits WCAG 2.2 AA accessible UIs for Web (ARIA/HTML5), iOS (SwiftUI traits), and Android (Compose semantics). Audits code for compliance gaps.
Assesses and improves CLAUDE.md files using a structured quality rubric. Powers the CLAUDE.md quality dimension across /optimize:init, /optimize:audit, and /optimize:context.
ALWAYS use the bundled scripts. Do NOT use Glob to discover CLAUDE.md files, manually count tokens, parse package.json, or run any ad-hoc shell commands.
# Discover all CLAUDE.md files and measure token load
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/token_counter.py --claude-md --json --summary
# Score quality, validate commands, and check file path references
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/claude_md_validator.py --auto-discover --json
The token_counter recursively finds all CLAUDE.md variants (project root, subdirectories, .claude.local.md, ~/.claude/) and reports token counts with bands.
The validator automatically:
package.json scripts and Makefile targetsThe validator scores on 6 dimensions (total 100):
| Dimension | Points | Key Question |
|---|---|---|
| Commands/Workflows | 20 | Are build/test/lint/deploy commands documented? |
| Architecture Clarity | 20 | Can Claude understand where things live? |
| Non-Obvious Patterns | 15 | Are gotchas, quirks, and workarounds captured? |
| Conciseness | 15 | Is every line earning its place? No filler? |
| Currency | 15 | Does it reflect the actual current codebase? |
| Actionability | 15 | Can instructions be copy-pasted and executed? |
Grade Scale: A (90-100), B (70-89), C (50-69), D (30-49), F (0-29)
Quality rubric reference: ${CLAUDE_PLUGIN_ROOT}/skills/claude-md-manager/references/quality-criteria.md
For each issue found, categorize:
## CLAUDE.md Quality Assessment
### File: [path]
**Grade**: [A-F] ([score]/100)
| Dimension | Score | Notes |
|-----------|-------|-------|
| Commands/Workflows | XX/20 | [brief note] |
| Architecture Clarity | XX/20 | [brief note] |
| Non-Obvious Patterns | XX/15 | [brief note] |
| Conciseness | XX/15 | [brief note] |
| Currency | XX/15 | [brief note] |
| Actionability | XX/15 | [brief note] |
### Red Flags
- [specific issue with line reference]
### Suggested Improvements
1. [specific improvement with diff preview]
2. [specific improvement with diff preview]
When no CLAUDE.md exists, generate one using:
${CLAUDE_PLUGIN_ROOT}/skills/claude-md-manager/references/templates.md
Follow the principles in:
${CLAUDE_PLUGIN_ROOT}/skills/claude-md-manager/references/update-guidelines.md
Key rules:
# in Claude Code to quickly add info to CLAUDE.md from conversation.claude.local.md for personal preferences, CLAUDE.md for team conventions~/.claude/CLAUDE.md for global defaultsKey principles: Project-specific, concise, actionable, current.
Recommended sections: Commands, Architecture, Key Files, Code Style, Environment, Testing, Gotchas, Workflow.
Avoid: generic advice, restating obvious code, documenting what Claude already knows, TODO items that never get completed.
CLAUDE.md quality dimension (20% of total score):