Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
Suggests manual /compact at strategic points in your workflow rather than relying on arbitrary auto-compaction.
Auto-compaction triggers at arbitrary points:
Strategic compaction at logical boundaries:
The suggest-compact.sh script runs on PreToolUse (Edit/Write) and:
Add to your ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [{
"matcher": "tool == \"Edit\" || tool == \"Write\"",
"hooks": [{
"type": "command",
"command": "~/.claude/skills/strategic-compact/suggest-compact.sh"
}]
}]
}
}
Environment variables:
COMPACT_THRESHOLD - Tool calls before first suggestion (default: 50)