strategic-compact
affaan-m
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
bunx add-skill affaan-m/everything-claude-code -s strategic-compactLoading…
affaan-m
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
bunx add-skill affaan-m/everything-claude-code -s strategic-compactLoading…
在工作流程的策略點建議手動 /compact,而非依賴任意的自動壓縮。
自動壓縮在任意點觸發:
邏輯邊界的策略性壓縮:
suggest-compact.sh 腳本在 PreToolUse(Edit/Write)執行並:
新增到你的 ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
}]
}]
}
}
環境變數:
COMPACT_THRESHOLD - 第一次建議前的工具呼叫次數(預設:50)Use when you need to run Flow type checking, or when seeing Flow type errors in React code.
Use when you want to validate changes before committing, or when you need to check all React contribution requirements.
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.
Use when you need to check feature flag states, compare channels, or debug why a feature behaves differently across release channels.