strategic-compact
Skill35 starsChanged 8 months agoMITView on GitHub
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction. Supports focus-aware compaction for targeted context preservation.
40 other projects use a version of this, 30 of them edited.
Adopted by
Most recently taken up by
- NTPhat0322/claude-skillsedited, first seen Sep 28, 2026
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- arfar-x/agent-skillsedited, first seen Sep 7, 2026
- best-radar/bradar-everything-claude-codeedited, first seen Sep 6, 2026
- tarrragon/claude-skillsedited, first seen Sep 1, 2026
- SamuelNDCE/claude-super-skill-libraryedited, first seen Aug 1, 2026
Used with
Projects with it also use kotlin-testing, ralphinho-rfc-pipeline and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 10 projects that use this
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 11 projects that use this
mryeastcodeSkillsanta-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
Also in 6 projects that use this
- +3 more from Infopibe
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 30
- WorldFlowAI/everything-claude-code★ 4k46% same
- sangrokjung/claude-forge★ 84746% same
- loulanyue/awesome-claude-notes★ 27214% same
- tpavanipradeep/everything-claude-code★ 13418% same
- hellangleZ/burn-in-cceverywhere-ralph★ 11246% same
- cohen-liel/hivemind★ 11018% same
- Jamkris/everything-gemini-code★ 8740% same
- codelably/harmony-claude-code★ 4314% same
- DangQuangSE/team-development-skills★ 1913% same
- arfar-x/agent-skills★ 1310% same
20 more not listed
Wrote their own version · 10
- xu-xiang/everything-claude-code-zh★ 2ksame name
- cloudnative-co/claude-code-starter-kit★ 151same name
- templetongroup/radiant★ 113same name
- mhylle/claude-skills-collection★ 19same name
- jiten-singh-shahi/salesforce-claude-code★ 17same name
- YehudaFrankel/clankbrain★ 16same name
- peopleforrester/claude-dotfiles★ 3same name
- TeamSPWK/nova★ 2same name
- the-hugin/RSIm★ 2same name
- Matheuscara/claude-code★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- agent-protocolSkill
- context-health-checkSkill
- layered-contextSkill
- muse-commandsSkill
- semantic-searchSkill
- using-superpowersSkill
- verification-before-completionSkill
- growth-distributionSkill
- api-design-principlesSkill
- architect-agentSkill
- brainstormingSkill
- build-error-resolverSkill
- changelog-generatorSkill
- code-documentationSkill
- code-refactoringSkill
- code-reviewer-agentSkill
- coding-standardsSkill
- context7-mcpSkill
- coordinator-modeSkill
- creating-skillsSkill
- deep-diveSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- doc-updaterSkill
- e2e-runnerSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- git-commitSkill
- github-pr-creationSkill
- github-pr-mergeSkill
- github-pr-reviewSkill
- git-security-guardSkill
- iterative-retrievalSkill
- markitdownSkill
- planner-agentSkill
- ralph-wiggumSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- sciomcSkill
- security-reviewSkill
- skill-creatorSkill
- skills-updaterSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- theme-factorySkill
- traceSkill
- ui-ux-pro-maxSkill
- using-git-worktreesSkill
- webapp-testingSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
3 rules. 1 is common, 0 are distinctive, and 2 are very specific to this project.
1
Common
Most of the 36 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 14
No awareness of logical task boundaries
- Very specific: line 58
Add to your ~/.claude/settings.json:
- Very specific: line 89
Persist: Write current task progress to memory/YYYY-MM-DD.md
“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Strategic Compact Skill
Suggests manual /compact at strategic points rather than relying on arbitrary auto-compaction.
Why Strategic Compaction?
Auto-compaction triggers at arbitrary points:
- Often mid-task, losing important context
- No awareness of logical task boundaries
- Can interrupt complex multi-step operations
Strategic compaction at logical boundaries:
- After exploration, before execution — Compact research, keep plan
- After completing a milestone — Fresh start for next phase
- Before major context shifts — Clear old context before different task
Focus-Aware Compaction (inspired by OpenClaw)
Blind compaction = blind discards. Focus-directed compaction = preserving key information.
Usage: Specify what to preserve when manually compacting.
Scenario: Completed 3 hours of debugging, now starting a new feature
✅ /compact preserve root cause analysis and fix approach, discard trial-and-error debugging
❌ /compact (blind compaction may discard root cause analysis)Common focus templates:
| Scenario | Focus Directive |
| After debugging | Preserve root cause and fix approach, discard trial-and-error |
| After planning | Preserve final plan and key decisions, discard alternative discussions |
| After code review | Preserve items to change, discard confirmed-OK sections |
| After strategy discussion | Preserve strategic decisions and metrics, discard brainstorming process |
| After multi-file edits | Preserve which files changed and why, discard file content details |
When to Trigger Compaction
| Signal | Action |
| Completed a full milestone | ✅ Good time to compact |
| Switching from exploration to execution | ✅ Good time to compact |
| Debugging complete, starting new feature | ✅ Good time to compact |
| In the middle of multi-step implementation | ❌ Do NOT compact |
| Still analyzing a problem | ❌ Do NOT compact |
/ctx shows 60-70% consumed | 🟡 Consider compacting |
/ctx observes ≥80% pressure | Save the current Lane, compact if supported, verify and continue |
Hook Setup
Add to your ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
}]
}]
}
}Configuration
Environment variables:
COMPACT_THRESHOLD- Tool calls before first suggestion (default: 50)
Best Practices
- Compact with focus — Always specify what to preserve, never compact blindly
- Write memory before compacting — Save key information to
memory/YYYY-MM-DD.mdfirst - Never compact mid-task — Maintain complete context during multi-step implementations
- Pair with /ctx — Use actual observations; ≥80% means save and reassess after compaction, not forced exit. Unknown occupancy remains unknown.
Pre-Compaction Protocol (MUSE — derived from LCM compact:before)
MUST execute in order before compaction:
- Persist: Write current task progress to
memory/YYYY-MM-DD.md - Preserve recent instructions: Save recent decisions, corrections and constraints; do not claim the client supports a protected/non-compactable zone unless its actual interface does.
- Extract key decisions: Scan content about to be compacted, extract key decisions/data to memory
- Notify user: Inform about upcoming compaction, list what will be preserved
Principle: Persist first, then compact. Never discard information without a backup.
Post-Compaction Injection (MUSE — derived from OpenClaw postCompactionSections)
MUST re-internalize the following after compaction:
- First 4 lines of
CLAUDE.md(7 iron laws + priority chain) - Currently
[/]in-progress tasks fromtask.md - Today's
memory/snapshot (just written) - Any focus-aware specified preservation items
Compaction may omit information. Reconcile the selected role/Lane checkpoint and required evidence after it; do not reload all history or claim memory is lossless.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

