strategic-compact
Skill0 starsChanged 5 months agoMITView on GitHub
Suggests manual /compact at logical task boundaries (after exploration, planning, milestones) instead of arbitrary auto-compaction. Use when the user wants automatic /compact reminders, asks about managing context size, or when deciding whether to suggest compaction at a phase boundary.
68 other projects use a version of this, 57 of them edited.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codeedited, first seen Nov 8, 2026
- XD3an/cc-plusedited, first seen Nov 7, 2026
- pankaj-mahaur/Agent-Daemonedited, first seen Nov 6, 2026
- myths-labs/museedited, first seen Nov 6, 2026
- TsinHzl/claude-code-configtheir own version, first seen Nov 1, 2026
- renepf/claude-skillsedited, first seen Oct 25, 2026
Used with
Projects with it also use configure-ecc, 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.
royaluniondesign-sysSkillconfigure-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 11 projects that use this
junimnjwSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 11 projects that use this
InfopibeSkilleverything-claude-code
Also in 11 projects that use this
TironFoxSkillopenclaw-persona-forge
为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡, 输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。 如当前环境提供已审核的生图 skill,可自动生成统一风格头像图片。 当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。 不适用于:微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。 触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、 龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、 lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。
Also in 5 projects that use this
royaluniondesign-sysSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 15 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 9 projects that use this
Other versions68 projects use a version of this.
Word for word · 0
None found.
Edited · 57
- affaan-m/ECC★ 246k12% same
- loulanyue/awesome-claude-notes★ 27217% same
- cloudnative-co/claude-code-starter-kit★ 15327% same
- cohen-liel/hivemind★ 10822% same
- tpavanipradeep/everything-claude-code★ 10422% same
- mturac/everything-openai-codex★ 8922% same
- mit-network/everything-claude-code★ 7622% same
- GGGODLIN/gggodlin-cc-harness★ 7323% same
- Fmarzochi/EGC★ 6117% same
- ysyecust/everything-claude-code★ 4418% same
47 more not listed
Wrote their own version · 11
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- mhylle/claude-skills-collection★ 20same name
- YehudaFrankel/clankbrain★ 16same name
- jiten-singh-shahi/salesforce-claude-code★ 15same name
- peopleforrester/claude-dotfiles★ 3same name
- TeamSPWK/nova★ 2same name
- TsinHzl/claude-code-config★ 2same name
- rhfl04-dfdf/jychoi_everything-claude-code-ko★ 1same name
- MANVENDRA-github/agentry★ 0same name
- RhythmMittal19/claude-config★ 0same name
1 more not listed
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 repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-validationSkill
- architecture-scannerSkill
- auto-approve-policySkill
- auto-learningSkill
- backend-patternsSkill
- branch-syncSkill
- browser-testSkill
- browseSkill
- build-checkSkill
- cache-refreshSkill
- codebase-explainerSkill
- coding-standardsSkill
- commit-styleSkill
- context-switchingSkill
- continuous-learningSkill
- db-preflightSkill
- env-preflightSkill
- eval-harnessSkill
- feature-completenessSkill
- file-indexSkill
- frontend-patternsSkill
- function-extractSkill
- idev-initSkill
- import-graphSkill
- lessons-learnedSkill
- post-creation-verifySkill
- pre-ship-verifySkill
- project-mapSkill
- self-reviewSkill
- session-resumeSkill
- skill-benchmarkSkill
- skilloptSkill
- smart-contextSkill
- task-journalSkill
- tdd-workflowSkill
- test-coverageSkill
- test-mapSkill
The file
We split this skill into the rules it gives an agent
5 rules. 1 is common, 0 are distinctive, and 4 are very specific to this project.
1
Common
Most of the 64 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
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 25
When the PostToolUse hook below injects a [strategic-compact] reminder, treat it as a prompt to evaluate whether the current moment is a …
- Very specific: line 32
Read the hook JSON from stdin and extract session_id
- Very specific: line 34
Every N calls (default 50), emit hookSpecificOutput JSON on stdout, which Claude Code injects as additional context for Claude
- Very specific: line 52
Add to ~/.claude/settings.json — NOTE: ${CLAUDE_PLUGIN_ROOT} is NOT expanded in user settings.
“Common” is measured: kept by at least 6 in 10 of the 64 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
What Claude should do when this skill loads
- At phase boundaries (plan finalized, milestone complete, bug fixed, long exploration finished), suggest the user run
/compact— briefly, with the reason. - When the PostToolUse hook below injects a
[strategic-compact]reminder, treat it as a prompt to evaluate whether the current moment is a logical boundary; only suggest/compactif it is. Never suggest it mid-implementation. - Remind the user that durable state survives compaction:
.claude/idev/smart-context/index.json,.claude/idev/project-map/project.map.md, and the other.claude/idev/caches.
How the hook works
suggest-compact.sh (Unix) / suggest-compact.ps1 (Windows) run on PostToolUse with matcher Edit|Write:
- Read the hook JSON from stdin and extract
session_id - Increment a per-session counter file in the temp directory
- Every N calls (default 50), emit
hookSpecificOutputJSON on stdout, which Claude Code injects as additional context for Claude
Hook Setup
The hook is pre-registered by the plugin's hooks/hooks.json (PostToolUse,
matcher Edit|Write) but off by default — the script exits instantly
unless the per-project opt-in flag exists. Enable it with:
/idev:hooks enable compactwhich creates <project>/.claude/idev/compact-suggestions-enabled. Disable
with /idev:hooks disable compact. No settings.json editing, takes effect
immediately.
<details><summary>Manual wiring (only if you can't use the plugin-registered hook)</summary>Add to ~/.claude/settings.json — NOTE: ${CLAUDE_PLUGIN_ROOT} is NOT
expanded in user settings; use the absolute plugin path. The matcher is a
regex over tool names, not an expression language:
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [{
"type": "command",
"command": "bash \"<idev-plugin-root>/skills/strategic-compact/suggest-compact.sh\""
}]
}]
}
}(Windows: powershell -ExecutionPolicy Bypass -File "<idev-plugin-root>\\skills\\strategic-compact\\suggest-compact.ps1".)
The opt-in flag file is still required either way.
</details>Configuration
IDEV_COMPACT_THRESHOLD- Edit/Write calls between suggestions (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
- The hook tells you when, you decide if
| Phase | Compact After | Why |
| Exploration | Reading 10+ files | Research context no longer needed |
| Planning | Plan finalized | Implementation needs fresh context |
| Debugging | Bug fixed | Error traces no longer needed |
| Feature complete | Tests pass | Ready for next feature |
Related
- smart-context skill - For context that persists across compaction
- project-map skill - The map survives compaction at
.claude/idev/project-map/project.map.md
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.

