Estimate token usage for skill files and their dependencies. Triggers: estimate tokens, token count, token usage, context budget, token estimation, skill tokens, context window, token analysis Use when: planning context budgets before adding content, comparing modularization approaches for token efficiency, validating progressive disclosure patterns, checking if skill fits context window DO NOT use when: analyzing skill complexity - use /analyze-skill instead. DO NOT use when: full context optimization report - use /context-report. DO NOT use when: evaluating skill quality - use /skills-eval instead. Use this command for token budgeting decisions.
Estimates token consumption for skill files and dependencies to optimize context window usage.
/plugin marketplace add athola/claude-night-market/plugin install abstract@claude-night-marketEstimates token consumption for skill files, including optional dependency analysis. Essential for context window budgeting and optimization decisions.
# Estimate tokens for a skill file
/estimate-tokens skills/my-skill/SKILL.md
# Estimate with dependency analysis
/estimate-tokens skills/my-skill/SKILL.md --include-dependencies
# Estimate for entire directory
/estimate-tokens skills/
/estimate-tokens skills/modular-skills/SKILL.md
# Output:
# === skills/modular-skills/SKILL.md ===
# Total tokens: 1,847
# Component breakdown:
# Frontmatter: 45 tokens
# Body content: 1,402 tokens
# Code blocks: 400 tokens
# === Recommendations ===
# GOOD: Optimal token range (800-2000 tokens)
/estimate-tokens skills/skills-eval --include-dependencies
# Includes token costs from referenced modules
Before adding new content to a skill, estimate current usage to validate you stay within optimal bounds.
Compare token costs of monolithic vs modular approaches:
# Check current monolithic skill
/estimate-tokens skills/big-skill/SKILL.md
# After modularization, check hub + modules
/estimate-tokens skills/big-skill/
Verify that hub files remain lightweight while modules contain detailed content.
Works alongside:
/analyze-skill - Complexity metrics/context-report - Directory-wide analysis/skills-eval - Quality scoringpython3 ${CLAUDE_PLUGIN_ROOT}/scripts/token_estimator.py --file "${1:-.}"