agentsclimarketplace

Check claudemd size

Skill kyuna0312/context_forge/skills/check-claudemd-size

This skill should be used when the user says "check claude.md size", "is my claude.md too big", "claude.md token cost", "how big is claude.md", or when triggered automatically on session start to warn about oversized claude.md files.From its SKILL.md

Install
npx -y skills add kyuna0312/context_forge --skill check-claudemd-size

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.6 KB, as published. Nobody here has run it

Check Claude.md Size

Measure and report claude.md file sizes. Warn when files exceed optimal token budget. Suggest optimization when needed.

Size Thresholds

SizeStatusAction
< 300 wordsOptimalNo action needed
300-600 wordsAcceptableMonitor growth
600-1,000 wordsBloatedRun optimize-claudemd
> 1,000 wordsCriticalImmediate optimization needed

Check Procedure

Scan All claude.md Files

# Global
wc -w ~/.claude/CLAUDE.md 2>/dev/null
wc -w ~/.claude/claude.md 2>/dev/null

# Project
wc -w ./CLAUDE.md 2>/dev/null
wc -w ./claude.md 2>/dev/null

Report Format

CLAUDE.MD SIZE CHECK
====================
Global (~/.claude/CLAUDE.md):   [N] words ≈ [N*1.3] tokens  [STATUS]
Project (./CLAUDE.md):          [N] words ≈ [N*1.3] tokens  [STATUS]

Combined constant cost: ~[N] tokens per response

[WARNING if any file is Bloated/Critical]
Run: /context_forge:optimize-claudemd to reduce size

Automatic Session-Start Check

The SessionStart hook (hooks/scripts/session-start.sh) performs this same check automatically — it does not invoke this skill. Use the skill for on-demand checks mid-session; don't re-run it right after session start, the hook already reported. On session start the hook:

  1. Check all claude.md file sizes
  2. If any file > 600 words: print warning
  3. If any file > 1,000 words: print critical warning with optimization command

Warning format:

⚠ TOKEN SAVER: claude.md is [N] words ([STATUS])
  Run /context_forge:optimize-claudemd to reduce by ~[%]%

What Makes claude.md Grow

Common causes of bloat:

  • Accumulated instructions over time without pruning
  • Paste of full API docs or schemas
  • Duplicate rules from different sessions
  • Long prose explanations instead of bullet rules
  • Examples that should be in references/ files

LTX Schema

Emit structured output as LTX rows when reporting file sizes.

@v1:file|words|tokens|level
FieldDescription
filePath to the claude.md file checked
wordsRaw word count
tokensEstimated tokens (words * 1.3, rounded)
levelok, warn (600–999 words), critical (≥1000 words)

Example:

@v1:file|words|tokens|level
~/.claude/CLAUDE.md|850|1105|critical
./CLAUDE.md|320|416|ok

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.