strategic-compact
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
Target: Target not categorized. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Chinese text
Topics in the source
- 策略性壓縮技能
- 為什麼需要策略性壓縮?
- 運作方式
- Hook 設定
- 設定
- 最佳實務
- 相關
在工作流程的策略點建議手動 /compact,而非依賴任意的自動壓縮。 自動壓縮在任意點觸發: 經常在任務中途,丟失重要上下文 不知道邏輯任務邊界 可能中斷複雜的多步驟操作 邏輯邊界的策略性壓縮: 探索後、執行前 - 壓縮研究上下文,保留實作計畫 完成里程碑後 - 為下一階段重新開始 主要上下文轉換前 - 在不同任務前清除探索上下文 suggest-compact.js 腳本在 PreToolUse(Edit/Write)執行並: 1. 追蹤工具呼叫 - 計算工作階段中的工具呼叫次數 2. 門檻偵測 - 在可設定門檻建議(預設:50 次呼叫) 3. 定期提醒 - 門檻後每 25 次呼叫提醒一次 以外掛安裝? 無需任何設定。外掛的 hooks/hooks.json 已經註冊了 suggest-compact.js(Hook ID pre:edit-write:suggest-compact,在 standard 與 strict hook 設定檔中生效)。請勿將下方區塊複製到 /.claude/settings.json — 外掛安裝中不存在 /.claude/scripts/,且重複註冊外掛 hook 會導致重複執行。 如果是手動安裝(./install.sh),新增到你的 /.claude/settings.json: 環境變數: COMPACTTHRESHOLD - 第一次建議前的工具呼叫次數(預設:50) 1. 規劃後壓縮 - 計畫確定後,壓縮以重新開始 2. 除錯後壓縮 - 繼續前清除錯誤解決上下文 3. 不要在實作中途壓縮 - 為相關變更保留上下文 4. 閱讀建議 - Hook 告訴你何時,你決定是否 Longform Guide - Token 優化章節 記憶持久性 hooks - 用於壓縮後存活的狀態
- Source repository
- affaan-m/ECC
- Source file
- docs/zh-TW/skills/strategic-compact/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T15:01:42.768Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.