Skip to content

/cco-claudemd

Analyze CLAUDE.md files for token bloat and suggest optimizations

shell
$ npx -y skills add egorfedorov/claude-context-optimizer --skill cco-claudemd --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/cco-claudemd
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Analyze CLAUDE.md files for token bloat and suggest optimizations

SKILL.md

cco-claudemd.SKILL.md
name: cco-claudemd
description: Analyze CLAUDE.md files for token bloat and suggest optimizations
license: MIT
allowed-tools: [Bash, Read]

CLAUDE.md Analyzer

Analyze CLAUDE.md files in the current project for token bloat and optimization opportunities.

Run the analyzer:

node ${CLAUDE_PLUGIN_ROOT}/src/claudemd-analyzer.js "${CWD}"

Present the output to the user. The analyzer checks for:

  • **Overall size** — files over 2K tokens get flagged
  • **Large sections** — sections over 1K tokens
  • **Duplicate lines** — repeated content
  • **Verbose patterns** — "please make sure to", "it is important that", etc.
  • **Long code blocks** — examples over 20 lines
  • **Excessive whitespace** — empty lines eating tokens

For each issue found, explain the savings potential and suggest a concrete fix.

If the user wants to apply fixes, help them edit the CLAUDE.md directly using the Edit tool.

Read it on GitHub ↗
Ships withclaude-context-optimizer

Claude Code plugin that tracks token usage, identifies wasted context, and saves 30-50% on API costs. Heatmaps, ROI reports, budget alerts, efficiency scores, git-aware suggestions — all local, zero config.

Get the whole plugin, auto-invoked
Stats
85
Stars
0
Views
10
Forks
Active
Maintenance
JavaScript
Language
MIT
License
20d ago
Last commit
4mo ago
Created

Repo: egorfedorov/claude-context-optimizer