Download for MacApple silicon, macOS 14+
Skill

compact-guard

@rohitg00 Updated 2026-07-27

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.

agent-orchestrationai-agentsai-codingai-workflowclaudeclaude-codeclaude-code-pluginclaude-code-skills

Install

With your agent

Install OMGSkills skill "rohitg00/pro-workflow:skills/compact-guard" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/rohitg00/pro-workflow /tmp/pro-workflow && ln -s /tmp/pro-workflow/skills/compact-guard ~/.claude/skills/compact-guard

From README

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) POSTCOMPACTMAXFILESTORESTORE = 5 — only 5 files survive POSTCOMPACTTOKENBUDGET = 50K — total restore budget POSTCOMPACTMAXTOKENSPERFILE = 5K — per-file limit Auto-compact fires at contextwindow - 13K buffer Pre-Compact Checklist Before compacting, save these to memory or a scratch file: Current task — What are you working on? One sentence. Files in progress — Which files are being edited? (max 5 — compaction only restores 5) Decisions made — Any architectural choices made this session Blockers — What's preventing progress?