Help us improve
Share bugs, ideas, or general feedback.
From skills
Audits and restructures CLAUDE.md files to reduce token bloat and improve Claude compliance. Targets 2,500–3,500 tokens with a hard 5,000 limit.
npx claudepluginhub kriscard/skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/skills:claude-optimizerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
CLAUDE.md is loaded into context on every single turn. Bloated or poorly structured instructions compete with the user's actual request for attention. A well-structured CLAUDE.md dramatically improves compliance; a 10K-token wall of prose does the opposite.
Optimizes CLAUDE.md files and Skills for Claude Code CLI by applying Anthropic's prompt best practices like positive framing, specificity, context provision, and markdown structure. Use for reviewing or improving system prompts.
CLAUDE.md instruction quality: writing effective project instructions, diagnosing why Claude ignores rules, routing content to the right layer, and systematic improvement. Invoke whenever task involves any interaction with CLAUDE.md files — writing, reviewing, auditing, improving, or debugging instruction compliance.
Provides best practices for creating, updating, and auditing CLAUDE.md files including constraints, commands, architecture overviews, and bloat reduction for projects.
Share bugs, ideas, or general feedback.
CLAUDE.md is loaded into context on every single turn. Bloated or poorly structured instructions compete with the user's actual request for attention. A well-structured CLAUDE.md dramatically improves compliance; a 10K-token wall of prose does the opposite.
Step 1 — Read and measure
wc -w path/to/CLAUDE.md
# Rough token estimate: word count ÷ 0.75
Also check for nested @-referenced files — they count against context too.
Step 2 — Analyze against these criteria
| Issue | Symptom | Fix |
|---|---|---|
| Token bloat | >3,500 tokens | Move deep content to @references/ files |
| Explanatory fluff | "It's important to note that...", "Please ensure..." | Delete. Claude 4 follows direct instructions. |
| Duplicated rules | Same constraint stated 3 different ways | Keep the clearest one |
| Missing structure | Safety rules buried mid-file | Safety rules first — highest attention at top |
| Prose where lists work | Paragraph describing a workflow | Numbered list or code block |
| Missing parallel hints | Sequential tool calls that could be concurrent | Add "Run X and Y in parallel" where appropriate |
| Inline content that should be referenced | Large code templates, full file examples | Move to @path/to/reference.md |
Target: 2,500–3,500 tokens. Hard limit: 5,000 tokens. Below 1,500 often means missing critical context.
Step 3 — Propose changes with reasoning
Show the user what you'd change and why. Don't silently rewrite the file. The user knows their workflow better than you do — some verbosity is intentional.
Step 4 — Apply only after approval
Rewrite the file after the user confirms. If the file is large, show a diff-style summary of what's changing rather than pasting the entire new version.
# Safety Rules (first — highest attention)
Hard constraints that cannot be overridden.
# Communication Style
How Claude should respond.
# Workflow
Step-by-step processes. Use numbered lists or code blocks.
# Project Context
What the project is, stack, key conventions.
# Commands / Tools
Available scripts, how to run them.
@references to files with deep context (they load lazily, low cost)| Priority | Load when | Reference |
|---|---|---|
| 1 — High | Need CLAUDE.md structure guidelines, what to include/exclude, or token budget rules | references/best-practices.md |