[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DT83FXBS87BCMSEH33FARY":3,"skill-same:01M6DT83FXBS87BCMSEH33FARY":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":23,"linkOnly":24,"markdownContent":25,"markdownBody":26,"frontMatter":27,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M6DT83FXBS87BCMSEH33FARY","strategic-compact",null,"Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.","AntifragileTech\u002Fantifragile-claude-code","AntifragileTech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F174357194?v=4","01M6DQCYMK4CDSQQAN0ZC72NTV","01M6DQCYS9YPW1WKMQ5TJMPQ43",9,"MIT","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fstrategic-compact\u002FSKILL.md",[],[18,19,20,21,22],"strategic compact","compact","context","auto","task","2026-11-10 10:12:30",false,"---\nname: strategic-compact\ndescription: Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.\norigin: ECC\n---\n\n# Strategic Compact Skill\n\nSuggests manual `\u002Fcompact` at strategic points in your workflow rather than relying on arbitrary auto-compaction.\n\n## When to Activate\n\n- Running long sessions that approach context limits (200K+ tokens)\n- Working on multi-phase tasks (research → plan → implement → test)\n- Switching between unrelated tasks within the same session\n- After completing a major milestone and starting new work\n- When responses slow down or become less coherent (context pressure)\n\n## Why Strategic Compaction?\n\nAuto-compaction triggers at arbitrary points:\n- Often mid-task, losing important context\n- No awareness of logical task boundaries\n- Can interrupt complex multi-step operations\n\nStrategic compaction at logical boundaries:\n- **After exploration, before execution** — Compact research context, keep implementation plan\n- **After completing a milestone** — Fresh start for next phase\n- **Before major context shifts** — Clear exploration context before different task\n\n## How It Works\n\nThe `suggest-compact.js` script runs on PreToolUse (Edit\u002FWrite) and:\n\n1. **Tracks tool calls** — Counts tool invocations in session\n2. **Threshold detection** — Suggests at configurable threshold (default: 50 calls)\n3. **Periodic reminders** — Reminds every 25 calls after threshold\n\n## Hook Setup\n\nAdd to your `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Edit\",\n        \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~\u002F.claude\u002Fskills\u002Fstrategic-compact\u002Fsuggest-compact.js\" }]\n      },\n      {\n        \"matcher\": \"Write\",\n        \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~\u002F.claude\u002Fskills\u002Fstrategic-compact\u002Fsuggest-compact.js\" }]\n      }\n    ]\n  }\n}\n```\n\n## Configuration\n\nEnvironment variables:\n- `COMPACT_THRESHOLD` — Tool calls before first suggestion (default: 50)\n\n## Compaction Decision Guide\n\nUse this table to decide when to compact:\n\n| Phase Transition | Compact? | Why |\n|-----------------|----------|-----|\n| Research → Planning | Yes | Research context is bulky; plan is the distilled output |\n| Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |\n| Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |\n| Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |\n| Mid-implementation | No | Losing variable names, file paths, and partial state is costly |\n| After a failed approach | Yes | Clear the dead-end reasoning before trying a new approach |\n\n## What Survives Compaction\n\nUnderstanding what persists helps you compact with confidence:\n\n| Persists | Lost |\n|----------|------|\n| CLAUDE.md instructions | Intermediate reasoning and analysis |\n| TodoWrite task list | File contents you previously read |\n| Memory files (`~\u002F.claude\u002Fmemory\u002F`) | Multi-step conversation context |\n| Git state (commits, branches) | Tool call history and counts |\n| Files on disk | Nuanced user preferences stated verbally |\n\n## Best Practices\n\n1. **Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh\n2. **Compact after debugging** — Clear error-resolution context before continuing\n3. **Don't compact mid-implementation** — Preserve context for related changes\n4. **Read the suggestion** — The hook tells you *when*, you decide *if*\n5. **Write before compacting** — Save important context to files or memory before compacting\n6. **Use `\u002Fcompact` with a summary** — Add a custom message: `\u002Fcompact Focus on implementing auth middleware next`\n\n## Related\n\n- [The Longform Guide](https:\u002F\u002Fx.com\u002Faffaanmustafa\u002Fstatus\u002F2014040193557471352) — Token optimization section\n- Memory persistence hooks — For state that survives compaction\n- `continuous-learning` skill — Extracts patterns before session ends\n","# Strategic Compact Skill\n\nSuggests manual `\u002Fcompact` at strategic points in your workflow rather than relying on arbitrary auto-compaction.\n\n## When to Activate\n\n- Running long sessions that approach context limits (200K+ tokens)\n- Working on multi-phase tasks (research → plan → implement → test)\n- Switching between unrelated tasks within the same session\n- After completing a major milestone and starting new work\n- When responses slow down or become less coherent (context pressure)\n\n## Why Strategic Compaction?\n\nAuto-compaction triggers at arbitrary points:\n- Often mid-task, losing important context\n- No awareness of logical task boundaries\n- Can interrupt complex multi-step operations\n\nStrategic compaction at logical boundaries:\n- **After exploration, before execution** — Compact research context, keep implementation plan\n- **After completing a milestone** — Fresh start for next phase\n- **Before major context shifts** — Clear exploration context before different task\n\n## How It Works\n\nThe `suggest-compact.js` script runs on PreToolUse (Edit\u002FWrite) and:\n\n1. **Tracks tool calls** — Counts tool invocations in session\n2. **Threshold detection** — Suggests at configurable threshold (default: 50 calls)\n3. **Periodic reminders** — Reminds every 25 calls after threshold\n\n## Hook Setup\n\nAdd to your `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Edit\",\n        \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~\u002F.claude\u002Fskills\u002Fstrategic-compact\u002Fsuggest-compact.js\" }]\n      },\n      {\n        \"matcher\": \"Write\",\n        \"hooks\": [{ \"type\": \"command\", \"command\": \"node ~\u002F.claude\u002Fskills\u002Fstrategic-compact\u002Fsuggest-compact.js\" }]\n      }\n    ]\n  }\n}\n```\n\n## Configuration\n\nEnvironment variables:\n- `COMPACT_THRESHOLD` — Tool calls before first suggestion (default: 50)\n\n## Compaction Decision Guide\n\nUse this table to decide when to compact:\n\n| Phase Transition | Compact? | Why |\n|-----------------|----------|-----|\n| Research → Planning | Yes | Research context is bulky; plan is the distilled output |\n| Planning → Implementation | Yes | Plan is in TodoWrite or a file; free up context for code |\n| Implementation → Testing | Maybe | Keep if tests reference recent code; compact if switching focus |\n| Debugging → Next feature | Yes | Debug traces pollute context for unrelated work |\n| Mid-implementation | No | Losing variable names, file paths, and partial state is costly |\n| After a failed approach | Yes | Clear the dead-end reasoning before trying a new approach |\n\n## What Survives Compaction\n\nUnderstanding what persists helps you compact with confidence:\n\n| Persists | Lost |\n|----------|------|\n| CLAUDE.md instructions | Intermediate reasoning and analysis |\n| TodoWrite task list | File contents you previously read |\n| Memory files (`~\u002F.claude\u002Fmemory\u002F`) | Multi-step conversation context |\n| Git state (commits, branches) | Tool call history and counts |\n| Files on disk | Nuanced user preferences stated verbally |\n\n## Best Practices\n\n1. **Compact after planning** — Once plan is finalized in TodoWrite, compact to start fresh\n2. **Compact after debugging** — Clear error-resolution context before continuing\n3. **Don't compact mid-implementation** — Preserve context for related changes\n4. **Read the suggestion** — The hook tells you *when*, you decide *if*\n5. **Write before compacting** — Save important context to files or memory before compacting\n6. **Use `\u002Fcompact` with a summary** — Add a custom message: `\u002Fcompact Focus on implementing auth middleware next`\n\n## Related\n\n- [The Longform Guide](https:\u002F\u002Fx.com\u002Faffaanmustafa\u002Fstatus\u002F2014040193557471352) — Token optimization section\n- Memory persistence hooks — For state that survives compaction\n- `continuous-learning` skill — Extracts patterns before session ends\n",{"name":5,"origin":28,"description":7},"ECC","master","c73386b305dec167db7654e0e6feacb462d4f9dc","assets\u002Fskills\u002Fthinking\u002Fstrategic-compact",1,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code","https:\u002F\u002Fgithub.com\u002FAntifragileTech","2026-10-02 14:22:14",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add AntifragileTech\u002Fantifragile-claude-code --skill strategic-compact",{"tool":42,"command":43},"bunx","bunx skills add AntifragileTech\u002Fantifragile-claude-code --skill strategic-compact",{"tool":45,"command":46},"pnpm","pnpm dlx skills add AntifragileTech\u002Fantifragile-claude-code --skill strategic-compact","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fstrategic-compact\u002FSKILL.md",true,[50],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"suggest-compact.sh","SCRIPT","脚本",1788,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fstrategic-compact\u002Fsuggest-compact.sh",[57,83,97,112,125,138],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":76,"publishedAt":23},"01M6DT9Q6VYA615SCXR757TZZ7","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-skills\u002FSKILL.md",[63,68,71],{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":69,"categoryName":70,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":72,"categoryName":73,"taxonomyType":74,"taxonomyTypeDesc":75},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[77,78,79,80,81,82],"writing skills","writing","use","editing","work","deployment",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":91,"publishedAt":23},"01M6DT9GFHDNY90P41WGAE1TV0","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-plans\u002FSKILL.md",[89,90],{"categoryNo":69,"categoryName":70,"taxonomyType":66,"taxonomyTypeDesc":67},{"categoryNo":72,"categoryName":73,"taxonomyType":74,"taxonomyTypeDesc":75},[92,93,78,94,22,79,95,96],"plans","writing plans","requirements","code","spec",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":105,"publishedAt":23},"01M6DT9C6PFGD86WS3HY7YE3XG","docs:write-concisely","Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwrite-concisely\u002FSKILL.md",[103,104],{"categoryNo":69,"categoryName":70,"taxonomyType":66,"taxonomyTypeDesc":67},{"categoryNo":72,"categoryName":73,"taxonomyType":74,"taxonomyTypeDesc":75},[106,107,108,109,110,111,78],"docs:write concisely","write","docs","read","Rules","documentation",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":23},"01M6DT98AWQ27P0N1CG97WAG66","kaizen:why","Iterative Five Whys root cause analysis drilling from symptoms to fundamentals","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwhy\u002FSKILL.md",[],[114,119,120,121,122,123,124],"why","kaizen","issue","five whys","analysis","root cause analysis",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":23},"01M6DT93EH25NAX19R3WGE1P53","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-loop\u002FSKILL.md",[],[132,133,134,135,95,136,137],"verification loop","verification","loop","sessions","claude code sessions","system",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":23},"01M6DT90GW7Z7VCN98P9DVYSNC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-before-completion\u002FSKILL.md",[],[145,133,146,81,79,147,148,149],"verification before completion","commands","evidence","claim","complete"]