skills/auto-compact/SKILL.md
This skill should be used when the user says "auto compact", "enable auto compact", "compact on context full", "automatic context compression", "prevent context limit errors", "set up auto compaction", or "context keeps hitting limit".
npx skillsauth add kyuna0312/kyuna_token_saver Auto CompactInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Configure Claude Code to automatically compact conversation history when context approaches its limit, preventing hard stops and maintaining session continuity.
When context window fills:
Compaction preserves:
Compaction discards:
Add to ~/.claude/settings.json (global) or .claude/settings.json (project):
{
"compactOnContextFull": true,
"compactThreshold": 0.85
}
compactThreshold: 0.85 = trigger compaction at 85% context usage.
To trigger manual compaction now:
/compact
Claude will summarize current context and continue with reduced token usage.
Configure hook to run before compaction for custom summary logic:
{
"PreCompact": [{
"hooks": [{
"type": "command",
"command": "bash $CLAUDE_PLUGIN_ROOT/hooks/scripts/pre-compact.sh",
"timeout": 15
}]
}]
}
Create hooks/scripts/pre-compact.sh with custom pre-compaction logic, for example:
#!/usr/bin/env bash
# Runs before Claude compacts context. Use to save state, log context usage, etc.
echo "Compacting context at $(date)" >> ~/.claude/compact.log
To manually compact with preserved context, use:
Compact context now.
Preserve:
- Current task: [TASK]
- Active files: [FILES]
- Current errors: [ERRORS IF ANY]
Summarize everything else. Continue where we left off.
Check current context fill level:
references/compact-strategies.md — Custom compaction strategies and PreCompact hook examplestools
This skill should be used when the user asks to "show recent changes", "show forge changelog", "show changelog for <project>", "what did I add this week", "what files did I touch today", "what packages keep recurring", "what drifts from the template", "review template suggestions", "show pending forge suggestions", "sync forge templates", "apply template suggestion", or "compute back-mapping suggestions". Provides read, drift-discovery, and template back-mapping workflows that wrap the `forge-db` MCP tools (`get_changelog`, `compute_suggestions`, `apply_suggestion`).
development
This skill should be used when the user says "build a wiki", "maintain a wiki", "ingest docs into wiki", "query my wiki", "set up llm wiki", "wiki-based knowledge base", "stop re-reading docs every session", "persistent knowledge base", or "compress my docs into wiki pages".
testing
Use this skill when the user says "/task_brain", "break down this task", "plan this", "decompose this problem", or when a task has multiple moving parts, unclear dependencies, or high ambiguity.
tools
This skill should be used when the user says "optimize settings.json", "tune settings for low tokens", "settings.json for performance", "disable auto memory", "configure for token savings", "minimal context window settings", or "settings taking too many tokens".