onlyterp/windsurf-unlocked/compact-hygiene
Claude Code and agent skill by onlyterp/windsurf-unlocked
- community
Checking that the SKILL.md file is still in the repository.
Guides proactive /compact usage with preservation instructions to prevent context rot in long Cascade sessions. Triggers when context reaches ~50% of window, before large tool outputs, or when the user mentions "context", "compact", "drift", or "forgetting".
Install
npx vskill@latest install onlyterp/windsurf-unlocked/compact-hygieneSKILL.md
Compact Hygiene
Long sessions rot. Most users only run /compact when the warning light is already red — and by then the earliest (most foundational) context is already being summarized away. You run it proactively, with explicit preservation instructions.
When to Run
- Proactive (best): at 50–60% context utilization, before the model starts approximating
- Pre-output: right before a large tool output (big file read, long test run) you don't need to keep verbatim
- Checkpoint: after finishing a major step, before starting the next
- Never: at 95%. By then you're compressing context that already degraded the last 20 responses.
How to Compact With Preservation
Run /compact with a clear list of what to keep verbatim and what to drop. Example:
Preservation Checklist — What You Almost Always Want to Keep
- [ ] Current plan file path and checkbox state
- [ ] Cited AGENTS.md invariants
- [ ] Design decisions made this session
- [ ] Current blocker (if any)
- [ ] Recent error messages
- [ ] Vault pages being actively referenced
Things Safe to Drop
- [ ] Tool outputs from rejected paths
- [ ] File contents you've already modified
- [ ] Verbose command logs (test runs, installs)
- [ ] Exploration that didn't pan out
- [ ] Superseded grep/search results
Agent Protocol
- Monitor context size silently. At ~50%, suggest a compact and list what you'd preserve.
- Ask first if the session has made novel design decisions not yet written to the plan. Compact can summarize these away.
- Write decisions to vault/ FIRST. Anything worth preserving long-term goes to
vault/decisions/before you compact — the vault survives forever, the session doesn't. - After compact, re-read the preserved plan file and any cited vault pages to ground yourself before continuing.
Never
- Never run
/compactwithout explicit preservation instructions — you lose the thread - Never wait until context is at 95% to compact — by then the earliest (and most foundational) context is already degraded
- Never compact mid-tool-call — finish the in-flight step first
- Never rely on compact as long-term memory — write durable facts to
vault/before compacting; the vault survives forever, the session doesn't - Never compact away an active blocker or the current plan file path — always keep those in the preserve list
Credits
Pattern from MindStudio's /compact writeup (Apr 2026) and Anthropic's automatic context compaction cookbook.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingstarter/.windsurf/skills/compact-hygiene/SKILL.md
Popularity
- Repository stars
- 44
- Repository forks
- 9
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/onlyterp/windsurf-unlocked/compact-hygiene)