compact-guard
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 skills add rohitg00/pro-workflow --skill compact-guard --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Compact Guard Protect important context through compaction cycles. Based on Claude Code internals: compaction restores max 5 files with 5K tokens each, within a 50K total budget. ## Trigger Use before `/compact` or when auto-compact warning appears. ## Key Constants (from Claude Code source) - `POST_COMPACT_MAX_FILES_TO_RESTORE = 5` — only 5 files survive - `POST_COMPACT_TOKEN_BUDGET = 50K` — to
What does the compact-guard skill do?
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.
How do I install it?
Run `npx skills add rohitg00/pro-workflow --skill compact-guard --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From rohitg00/pro-workflow, a repository with 2,760 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.