Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By warrenthv1.0.0MITIn 1 marketplace
Scores your .claude/ rules, skills and CLAUDE.md for token waste, then proposes trims to cut per-conversation context cost. /optimize asks before applying any change.
Trending plugins
7-day copy clicks
Claude hands work to one, or you mention it with @.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Evaluate and optimize your AI agent's context. Save tokens, cut costs.
ctxcraft analyzes your .claude/ directory structure and provides actionable recommendations to reduce token consumption — without losing any functionality.
AI coding agents (Claude Code, Cursor, Windsurf) load context files on every conversation. As your .claude/ directory grows, silent token waste accumulates:
ctxcraft finds and fixes all of this.
vs
/doctor? Claude Code's built-in/doctorproposes trims for a checked-in CLAUDE.md. ctxcraft audits the whole.claude/surface — rules/, skills/, agents/, legacy commands/, auto memory — with a quality score, a plan-tier cost axis, and CI integration. Thresholds follow the official docs.
# Add marketplace (one-time)
claude plugin marketplace add warrenth/ctxcraft
# Install plugin (run per project)
claude plugin install ctxcraft@tools
Then in Claude Code:
/ctxcraft:evaluate # Analyze token efficiency
/ctxcraft:optimize # Auto-fix issues
/ctxcraft:token-guide # Best practices reference
Note:
claude plugin installmust be run in each project. Despitescope: user, Claude Code plugins are not truly global — you need to reinstall when switching to a new project.
{
"extraKnownMarketplaces": {
"ctxcraft": {
"source": { "source": "github", "repo": "warrenth/ctxcraft" }
}
},
"enabledPlugins": { "ctxcraft@tools": true }
}
curl -sL https://raw.githubusercontent.com/warrenth/ctxcraft/main/install.sh | bash
Then in Claude Code: /evaluate, /optimize, /token-guide
curl -sL https://raw.githubusercontent.com/warrenth/ctxcraft/main/install.sh | bash -s -- --local
/evaluateuses read-only tools (Read, Grep, Glob) — no permission prompts./optimizeadditionally uses Write/Edit and always asks before applying any change.Note: plugin installs don't load the optional always-on rules file (
rules/token-efficiency.md) — plugins can't shiprules/. Theinstall.shpath offers to copy it to~/.claude/rules/instead.
$ /ctxcraft:evaluate
━━━ Phase 1: Token Efficiency Audit ━━━
PASS [ 1] CLAUDE.md size
FAIL [ 2] Always-on tokens → Compress rules, save ~8,848 tokens
FAIL [ 3] Rules file size → Move examples to skills/
PASS [ 4] Rules file count
WARN [ 5] Duplicate sections → Keep in one place only
PASS [ 6] Progressive disclosure
...
PASS [25] Cross-reference validity
━━━ Phase 2: Report ━━━
┌────────────────────┬────────────┬───────┐
│ Category │ Tokens │ Files │
├────────────────────┼────────────┼───────┤
│ Always-on (every) │ 16,848 │ 14 │
│ On-demand (lazy) │ 53,040 │ 46 │
├────────────────────┼────────────┼───────┤
│ Total │ 69,888 │ 60 │
└────────────────────┴────────────┴───────┘
💡 Potential savings: ~9,168 tokens/conversation
━━━ Summary ━━━
Quality: 86/100 (A-)
Cost: Comfortable (Max 5x plan)
PASS 20 WARN 3 FAIL 2
┌──────────────────────────────────────────────────┐
│ ctxcraft — Optimization Complete │
│ │
│ Before After Change │
│ Quality 78/100 → 92/100 (+14 pts) │
│ Grade B+ → A │
│ Always-on 16,848 → 9,200 (-7,648 tok) │
│ │
│ PASS 20 → 24 WARN 3 → 1 FAIL 2 → 0 │
└──────────────────────────────────────────────────┘
/optimize DoesAll changes require user confirmation before applying.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub warrenth/ctxcraft --plugin ctxcraftPlugins from other owners that cover similar ground