[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FD1WB34TDG4CPP75CDJ0H1":3,"skill-same:01M7FD1WB34TDG4CPP75CDJ0H1":50},{"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":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":28,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7FD1WB34TDG4CPP75CDJ0H1","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.","sakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI","sakkez","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42839026?v=4","01M7FCWFVN581VKXJCSH7AC9HM","01M7FCWFW9023NDFV5JF0MSCT9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\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":14,"description":7},"main","22c2e100b28c8ca43d166cb2d59c8454b4dd13c6","Zure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Fstrategic-compact","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI","https:\u002F\u002Fgithub.com\u002Fsakkez","zure.com","2026-10-22 19:32:15",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add sakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI --skill strategic-compact",{"tool":36,"command":37},"bunx","bunx skills add sakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI --skill strategic-compact",{"tool":39,"command":40},"pnpm","pnpm dlx skills add sakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI --skill strategic-compact","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Fstrategic-compact\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",272,"https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Fstrategic-compact\u002Fagents\u002Fopenai.yaml",[51,58,65,72,78,85],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7FDAREQ7SGKQJ4M8682CHGW","verification-loop","Run a six-phase verification of a Claude Code session's work — build, type check, lint, tests with coverage, security grep, and diff review — then produce a PASS\u002FFAIL verification report. Use when verifying work after completing a feature or refactor, before creating a PR, or when quality gates must pass.","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7FD2KX8C0EM6R1EHV6SPP9Y","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Fx-api\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7FD2DW0WVM670PZBS6N2CDC","video-editing","AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Fvideo-editing\u002FSKILL.md",[],[],{"skillNo":73,"name":53,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7FD29RPJMD6A4X3FEYHS5H0","A comprehensive verification system for Claude Code sessions. Use when verifying a Claude Code session's work before claiming it is complete.","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7FD269C4AH5FDAKTPEHD7W7","unified-memory","Share durable, inspectable context and handoffs between Claude, Codex, Hermes, Cursor, OpenCode, and other agents through the local ECC Memory Vault. Use when an agent must save work state, transfer context, resume another agent's task, or search shared project knowledge.","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Funified-memory\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7FD1Z82V9YAPBZ5CPYC0B05","tdd-workflow","Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.","https:\u002F\u002Fgithub.com\u002Fsakkez\u002FZure-Sakari-Stavanger2026-EngineeringWithAI\u002Fblob\u002Fmain\u002FZure.Talk.AIDev\u002Ftalks\u002Fstavanger26\u002Fruns\u002Fecc-med\u002F.claude\u002F.agents\u002Fskills\u002Ftdd-workflow\u002FSKILL.md",[],[]]