[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F6PBYE0G461FK24M1DHPRJ":3,"skill-same:01M7F6PBYE0G461FK24M1DHPRJ":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7F6PBYE0G461FK24M1DHPRJ","strategic-compact",null,"Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction. Use when a session is approaching a context limit and a task phase is a natural place to compact.","JUICEWRLD998\u002Fmyskills","JUICEWRLD998","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F112366831?v=4","01M7F6BY76NXJQY5JX1JQ0J9GA","BLVCK_NINJA","01M7F6BY8EBEVH8BX79AVB9B5T",0,"MIT","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fplugins\u002Fecc__ecc\u002F.agents\u002Fskills\u002Fstrategic-compact\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: strategic-compact\ndescription: Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction. Use when a session is approaching a context limit and a task phase is a natural place to compact.\nlicense: MIT\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 combines two signals:\n\n1. **Context size (primary)** — Reads the latest `usage` record from the session transcript (`transcript_path` in the hook payload) and sums `input_tokens + cache_read_input_tokens + cache_creation_input_tokens` (the true context size of the turn). Suggests `\u002Fcompact` at a window-scaled threshold — 160k tokens on a 200k window, 250k on a 1M window (detected from a `[1m]` model marker, or inferred when observed tokens already exceed 200k) — and re-reminds after every additional 60k tokens of context growth\n2. **Tool-call count (secondary)** — Counts tool invocations in session; suggests at a configurable threshold (default: 50 calls), then every 25 calls after\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- `COMPACT_CONTEXT_THRESHOLD` — Context tokens before the context-size suggestion (default: 160000 on a 200k window, 250000 on a 1M window; `0` disables the context signal)\n- `COMPACT_CONTEXT_INTERVAL` — Additional context tokens before the suggestion repeats (default: 60000)\n- `ECC_CONTEXT_WINDOW_TOKENS` — Explicit context-window size, in tokens, overriding auto-detection. Set this for large-window models whose reported id lacks a `[1m]` marker (e.g. 400k Opus 4.x, or a new 1M-window model family) so the threshold scales to the real window instead of defaulting to 200k and overstating context usage.\n- `CLAUDE_CODE_AUTO_COMPACT_WINDOW` — Claude Code's native window-size override, in tokens; honored as a fallback when `ECC_CONTEXT_WINDOW_TOKENS` is unset.\n\n> The context window is otherwise auto-detected from a `[1m]` model marker or inferred when observed tokens already exceed 200k. On a large-window model that carries neither signal, set one of the overrides above so the `\u002Fcompact` suggestion fires at the right point.\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 written down (a file, or the task list if you have one); 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| Files on disk | 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| The task list — **only if you have the todo tools** (see below) | Nuanced user preferences stated verbally |\n\n> ### Don't rely on the task list surviving — it may not exist\n>\n> Claude Code **2.1.233 removed the todo\u002Ftask tools by default** on Opus 4.8, Sonnet 5,\n> Fable 5, Mythos 5 and newer models (`TodoWrite`, `TaskCreate\u002FGet\u002FUpdate\u002FList`).\n> `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` brings them back, but that is a per-machine\n> environment setting — **it does not travel with this skill**, so you cannot assume the\n> reader has it.\n>\n> This matters because \"my todo list survives compaction\" is a reason people compact\n> *instead of* writing state down. If the tools are absent there is no list to survive,\n> and the plan is simply gone. **Write the plan to a file before compacting** — a file\n> persists on every version and every model. Treat the task list as a convenience that\n> may be missing, never as your durable record.\n\n## Best Practices\n\n1. **Compact after planning** — Once the plan is finalized **and written to a file**, 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 combines two signals:\n\n1. **Context size (primary)** — Reads the latest `usage` record from the session transcript (`transcript_path` in the hook payload) and sums `input_tokens + cache_read_input_tokens + cache_creation_input_tokens` (the true context size of the turn). Suggests `\u002Fcompact` at a window-scaled threshold — 160k tokens on a 200k window, 250k on a 1M window (detected from a `[1m]` model marker, or inferred when observed tokens already exceed 200k) — and re-reminds after every additional 60k tokens of context growth\n2. **Tool-call count (secondary)** — Counts tool invocations in session; suggests at a configurable threshold (default: 50 calls), then every 25 calls after\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- `COMPACT_CONTEXT_THRESHOLD` — Context tokens before the context-size suggestion (default: 160000 on a 200k window, 250000 on a 1M window; `0` disables the context signal)\n- `COMPACT_CONTEXT_INTERVAL` — Additional context tokens before the suggestion repeats (default: 60000)\n- `ECC_CONTEXT_WINDOW_TOKENS` — Explicit context-window size, in tokens, overriding auto-detection. Set this for large-window models whose reported id lacks a `[1m]` marker (e.g. 400k Opus 4.x, or a new 1M-window model family) so the threshold scales to the real window instead of defaulting to 200k and overstating context usage.\n- `CLAUDE_CODE_AUTO_COMPACT_WINDOW` — Claude Code's native window-size override, in tokens; honored as a fallback when `ECC_CONTEXT_WINDOW_TOKENS` is unset.\n\n> The context window is otherwise auto-detected from a `[1m]` model marker or inferred when observed tokens already exceed 200k. On a large-window model that carries neither signal, set one of the overrides above so the `\u002Fcompact` suggestion fires at the right point.\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 written down (a file, or the task list if you have one); 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| Files on disk | 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| The task list — **only if you have the todo tools** (see below) | Nuanced user preferences stated verbally |\n\n> ### Don't rely on the task list surviving — it may not exist\n>\n> Claude Code **2.1.233 removed the todo\u002Ftask tools by default** on Opus 4.8, Sonnet 5,\n> Fable 5, Mythos 5 and newer models (`TodoWrite`, `TaskCreate\u002FGet\u002FUpdate\u002FList`).\n> `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` brings them back, but that is a per-machine\n> environment setting — **it does not travel with this skill**, so you cannot assume the\n> reader has it.\n>\n> This matters because \"my todo list survives compaction\" is a reason people compact\n> *instead of* writing state down. If the tools are absent there is no list to survive,\n> and the plan is simply gone. **Write the plan to a file before compacting** — a file\n> persists on every version and every model. Treat the task list as a convenience that\n> may be missing, never as your durable record.\n\n## Best Practices\n\n1. **Compact after planning** — Once the plan is finalized **and written to a file**, 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,"license":15,"description":7},"main","e4b5c5ed00b1419bd769ad56a0621e872609ac23","plugins\u002Fecc__ecc\u002F.agents\u002Fskills\u002Fstrategic-compact","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998","blvckninja.vercel.app","Full-stack Dev 💻|| Smart Contract Auditor||Blockchain Engineer||Road to mastery 🚀","2026-10-30 17:50:51",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add JUICEWRLD998\u002Fmyskills --skill strategic-compact",{"tool":38,"command":39},"bunx","bunx skills add JUICEWRLD998\u002Fmyskills --skill strategic-compact",{"tool":41,"command":42},"pnpm","pnpm dlx skills add JUICEWRLD998\u002Fmyskills --skill strategic-compact","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fplugins\u002Fecc__ecc\u002F.agents\u002Fskills\u002Fstrategic-compact\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",272,"https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fplugins\u002Fecc__ecc\u002F.agents\u002Fskills\u002Fstrategic-compact\u002Fagents\u002Fopenai.yaml",[53,60,67,74,83,91],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7FBFRSSQYQZNR9JDBF5KS4Q","web-pentest","Authorized web pentest: recon, proof-based exploits, report.","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fweb-pentest\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7FBEWDAAP23Z2VAAG3N6BXZ","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7FBENYKD6ZK0R73SVEZ0RVK","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7FBE16336DACSKJ88EVNQV2","skill-creator","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fsynced\u002F2afcd8ab-ba1f-4bc7-97aa-30e65b87f9ec_e979b332-d9cd-418f-b1bb-ef8141c48880\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fsynced\u002F2afcd8ab-ba1f-4bc7-97aa-30e65b87f9ec_e979b332-d9cd-418f-b1bb-ef8141c48880\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FBCTE262XYW1MF4AXS7W4T","learn","Use this skill when the user wants intellectual understanding — learning how or why something works, not getting a task done or soliciting Claude's judgment.\n\nTrigger for:\n- Explicit learning requests: teach, explain, ELI5, walk me through, quiz me, flashcards, \"I'm rusty on\"; definitions (\"what is X\")\n- Terse concept names implying \"help me understand this\": \"Galois theory,\" \"transformers, from scratch\"\n- Confusion signals: \"won't stick,\" \"keep mixing these up,\" \"not getting it\"\n- Learning-path questions: prerequisites, sequencing, what to study before X\n- Conceptual questions about mechanisms, causes, or dynamics\n\nDon't trigger for:\n- Tasks: coding, writing, calculation, translation, factual lookup, news updates\n- Personal troubleshooting; resource\u002Ftextbook recommendations\n- Claude's evaluative verdict: opinion prompts (\"do you think X\", \"settle this\", \"honest take\", \"is X dead \u002F still taken seriously\") and interpretive takes (\"was X really as harsh as people say\")","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fsynced\u002F2afcd8ab-ba1f-4bc7-97aa-30e65b87f9ec_e979b332-d9cd-418f-b1bb-ef8141c48880\u002Flearn\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fsynced\u002F2afcd8ab-ba1f-4bc7-97aa-30e65b87f9ec_e979b332-d9cd-418f-b1bb-ef8141c48880\u002Flearn\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7FB94QHCE1GV8VA8V0TGQAX","plan","Write a markdown plan to .hermes\u002Fplans\u002F; no execution.","https:\u002F\u002Fgithub.com\u002FJUICEWRLD998\u002Fmyskills\u002Fblob\u002Fmain\u002Fskills\u002Fplan\u002FSKILL.md",[],[]]