strategic-compact
Skill87 starsChanged 7 months agoMITView on GitHub
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
40 other projects use a version of this, 31 of them edited.
Adopted by
Most recently taken up by
- NTPhat0322/claude-skillsedited, first seen Sep 28, 2026
- templetongroup/radiantedited, 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 everything-claude-code.
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.
InfopibeSkilleverything-claude-code
Also in 4 projects that use this
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 31
- WorldFlowAI/everything-claude-code★ 4k89% same
- sangrokjung/claude-forge★ 84789% same
- loulanyue/awesome-claude-notes★ 27232% same
- cloudnative-co/claude-code-starter-kit★ 15127% same
- tpavanipradeep/everything-claude-code★ 13442% same
- templetongroup/radiant★ 11317% same
- hellangleZ/burn-in-cceverywhere-ralph★ 11289% same
- cohen-liel/hivemind★ 11042% same
- myths-labs/muse★ 3518% same
- DangQuangSE/team-development-skills★ 1932% same
21 more not listed
Wrote their own version · 9
- xu-xiang/everything-claude-code-zh★ 2ksame name
- codelably/harmony-claude-code★ 43same 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 repository182 other files it gives its agents.
- accessibilitySkill
- agent-evalSkill
- agent-harness-constructionSkill
- agentic-engineeringSkill
- agent-introspection-debuggingSkill
- agent-payment-x402Skill
- agent-sortSkill
- ai-first-engineeringSkill
- ai-regression-testingSkill
- android-clean-architectureSkill
- api-connector-builderSkill
- api-designSkill
- architecture-decision-recordsSkill
- article-writingSkill
- automation-audit-opsSkill
- autonomous-agent-harnessSkill
- autonomous-loopsSkill
- backend-patternsSkill
- benchmarkSkill
- blueprintSkill
- brand-voiceSkill
- browser-qaSkill
- bun-runtimeSkill
- canary-watchSkill
- carrier-relationship-managementSkill
- ckSkill
- gemini-apiSkill
- gemini-devfleetSkill
- clickhouse-ioSkill
- click-path-auditSkill
- codebase-onboardingSkill
- code-tourSkill
- coding-standardsSkill
- compose-multiplatform-patternsSkill
- configure-eccSkill
- connections-optimizerSkill
- content-engineSkill
- content-hash-cache-patternSkill
- context-budgetSkill
- continuous-agent-loopSkill
- continuous-learningSkill
- continuous-learning-v2Skill
- cost-aware-llm-pipelineSkill
- councilSkill
- cpp-coding-standardsSkill
- cpp-testingSkill
- crosspostSkill
- csharp-testingSkill
- customer-billing-opsSkill
- customs-trade-complianceSkill
- dart-flutter-patternsSkill
- dashboard-builderSkill
- database-migrationsSkill
- data-scraper-agentSkill
- deep-researchSkill
- defi-amm-securitySkill
- deployment-patternsSkill
- design-systemSkill
- django-patternsSkill
- django-securitySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 1 is common, 0 are distinctive, and 1 is 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.
1
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 32
Add to your ~/.gemini/settings.json:
“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 in your workflow 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 context, keep implementation plan
- After completing a milestone - Fresh start for next phase
- Before major context shifts - Clear exploration context before different task
How It Works
The suggest-compact.js script runs on PreToolUse (Edit/Write) and:
- Tracks tool calls - Counts tool invocations in session
- Threshold detection - Suggests at configurable threshold (default: 50 calls)
- Periodic reminders - Reminds every 25 calls after threshold
Hook Setup
Add to your ~/.gemini/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "node ~/.gemini/scripts/hooks/suggest-compact.js"
}]
}]
}
}Configuration
Environment variables:
COMPACT_THRESHOLD- Tool calls before first suggestion (default: 50)
Best Practices
- Compact after planning - Once plan is finalized, compact to start fresh
- Compact after debugging - Clear error-resolution context before continuing
- Don't compact mid-implementation - Preserve context for related changes
- Read the suggestion - The hook tells you when, you decide if
Related
- The Longform Guide - Token optimization section
- Memory persistence hooks - For state that survives compaction
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.

