Loading...
Loading...
Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers.
npx skill4agent add rohitg00/pro-workflow compact-guard/compactPOST_COMPACT_MAX_FILES_TO_RESTORE = 5POST_COMPACT_TOKEN_BUDGET = 50KPOST_COMPACT_MAX_TOKENS_PER_FILE = 5Kcontext_window - 13K| Strategy | Token Savings | When |
|---|---|---|
| Delegate grep/search to subagent | 30-60% per search | Always for broad searches |
Read only needed lines ( | 50-90% per read | Large files |
| Compact at task boundaries | Preserves coherence | Between logical steps |
Use | 100% | Unrelated new task |
COMPACT GUARD
Files to preserve: [list top 5]
Task state: [one sentence]
Decisions: [key choices]
Next step: [immediate action after compact]
Ready to compact. Run /compact now.