/software-engineering:check-claude-md-tokens [optional: path to CLAUDE.md file]from software-engineering
Monitors CLAUDE.md token count using character-based estimation and offers reduction strategies when exceeding the 2500 token limit.
Ships in software-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Monitor the token count of CLAUDE.md files to ensure they stay within the recommended 2500 token limit. This skill analyzes the current token usage and provides reduction recommendations when the limit is exceeded.
Locate CLAUDE.md Files: Find all CLAUDE.md files in the repository:
./CLAUDE.md~/.claude/CLAUDE.mdCalculate Token Count: Use character-based estimation (~4 characters per token):
wc -c CLAUDE.md | awk '{print int($1/4)}'
Evaluate Against Limit: Check if token count exceeds 2500 tokens
Report Status: Display current token usage with clear status indicator:
Offer Reduction: If over limit, analyze content and propose specific reductions
Estimation: tokens ≈ characters ÷ 4
This rough estimate works well for English text. The actual token count may vary slightly based on:
When CLAUDE.md exceeds the token limit, apply these optimization techniques:
These sections are canonical output of /gen-claude and must survive verbatim. Never propose removing, abbreviating, externalizing, reordering, or renumbering them — no reduction strategy above applies to them:
## Behavioral Guidelines — a byte-identical copy of a plugin asset (~545 tokens). It reads as generic prose, which makes it a tempting cut, but it is deliberate always-in-context guidance and /gen-claude will reinstate it on the next run.## Operating Guidelines — only ~40 tokens; pointer to docs/operating-guidelines.md.Together these are ~585 tokens of intentional fixed overhead. When a file is over limit, reduce project-specific sections only. If it is still over limit after that, report the overage and stop — do not touch protected sections.
📊 CLAUDE.md Token Analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
File: ./CLAUDE.md
Characters: 12,450
Estimated Tokens: 3,112
Limit: 2,500
Status: ❌ OVER LIMIT (+612 tokens)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Recommendation: Reduce by approximately 2,448 characters (612 tokens)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
When offering to reduce CLAUDE.md, analyze the content and propose specific edits:
/gen-claude output carries ~585 protected tokens (Behavioral + Operating Guidelines), leaving ~1915 for project-specific content# Check current project CLAUDE.md
/check-claude-md-tokens
# Check global CLAUDE.md
/check-claude-md-tokens ~/.claude/CLAUDE.md
# Check specific file
/check-claude-md-tokens path/to/CLAUDE.md
This skill works alongside:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 skills in this plugin
/auto-mrPush current branch, create MR/PR on GitHub, GitLab, or Forgejo, wait for CI pipeline, merge, and clean up branch using auto-mr CLInpx claudepluginhub sgaunet/claude-plugins --plugin software-engineeringOther plugins' skills for the same job