Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
npxskills add affaan-m/everything-claude-code--skill strategic-compactLoading…
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
npxskills add affaan-m/everything-claude-code--skill strategic-compactLoading…
在工作流程的策略點建議手動 /compact,而非依賴任意的自動壓縮。
自動壓縮在任意點觸發:
邏輯邊界的策略性壓縮:
suggest-compact.js 腳本在 PreToolUse(Edit/Write)執行並:
以外掛安裝? 無需任何設定。外掛的 hooks/hooks.json 已經註冊了 suggest-compact.js(Hook ID pre:edit-write:suggest-compact,在 與 hook 設定檔中生效)。請勿將下方區塊複製到 — 外掛安裝中不存在 ,且重複註冊外掛 hook 會導致重複執行。
standardstrict~/.claude/settings.json~/.claude/scripts/如果是手動安裝(./install.sh),新增到你的 ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit",
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
},
{
"matcher": "Write",
"hooks": [{ "type": "command", "command": "node ~/.claude/scripts/hooks/suggest-compact.js" }]
}
]
}
}
環境變數:
COMPACT_THRESHOLD - 第一次建議前的工具呼叫次數(預設:50)Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).