$ recombobulate _
home / tips / move-specialised-claudemd-instructions-into-skills-to-shrink-context
0

Move Specialised CLAUDE.md Instructions into Skills to Shrink Context

bagwaa @bagwaa · Mar 26, 2026 · Performance
move-specialised-claudemd-instructions-into-skills-to-shrink-context

Your CLAUDE.md file loads into context at the start of every session. If it's packed with detailed instructions for PR reviews, database migrations, and deployment checklists, all those tokens are present even when you're just fixing a typo.

Skills load on demand only when invoked, so moving workflow-specific instructions out of CLAUDE.md keeps your base context lean.

# Before: everything in CLAUDE.md (always loaded)
# CLAUDE.md = 800 lines of instructions

# After: essential rules in CLAUDE.md, workflows in skills
# CLAUDE.md = 200 lines of core project rules
# .claude/skills/pr-review/SKILL.md = PR review process
# .claude/skills/db-migration/SKILL.md = migration checklist

Keep CLAUDE.md under about 500 lines with just the essentials: coding standards, project structure, key conventions, and test commands. Move everything else into focused skills that Claude invokes when the task calls for them.

The token savings compound over a session. Every message Claude processes includes the system prompt, so a 600-line reduction in CLAUDE.md saves those tokens on every single API call.

A slim CLAUDE.md costs less on every message. Let skills carry the heavy instructions.


via Claude Code Docs — Costs

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Filter Test Output with a PreToolUse Hook to Cut Token Costs

A PreToolUse hook can intercept test runner commands and filter output to show only failures, cutting thousands of tokens from Claude's context.

bagwaa @bagwaa · 1 hour ago
0
Use prompt.id to Trace All Activity from a Single User Prompt

Every event emitted while processing a single prompt shares a prompt.id UUID, letting you trace the complete chain of API calls and tool executions.

bagwaa @bagwaa · 1 hour ago
0
Add Custom Compaction Instructions to Preserve Key Context

Pass custom instructions to /compact so Claude preserves test output, code changes, and other context that matters to your workflow.

bagwaa @bagwaa · 2 hours ago