/strategic-compact:strategic-compactfrom strategic-compact
Monitors Claude Code sessions for context pressure and phase transitions, suggesting strategic compaction at natural breakpoints like exploration-to-implementation or milestone completion. Recommends /compact, /handoff, or /clear based on session state.
Ships in strategic-compact. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Intelligent context management that suggests compaction at optimal moments.
Manual compaction at strategic points > Auto-compaction at arbitrary points
Auto-compact triggers at context limits, often mid-task. Strategic compaction preserves context through logical phases and compacts at natural transition points.
| Trigger | Reason |
|---|---|
| Exploration complete, implementation starting | Exploration context rarely needed for coding |
| Milestone completed | Clean slate for next phase |
| Plan finalized and documented | Plan captured, context can reset |
| Debug session resolved | Debug traces clutter future work |
| Switching to unrelated task | Previous context not relevant |
| 50+ tool calls in session | Accumulated context likely stale |
| Scenario | Why |
|---|---|
| Mid-implementation | Loses code context and decisions |
| Active debugging | Loses diagnostic information |
| Incomplete task | May need earlier context |
| Code review in progress | Loses review thread |
Creates HANDOFF.md with:
Then start fresh with: > HANDOFF.md
Detect phase transitions by monitoring:
EXPLORATION → IMPLEMENTATION
- Many Read/Grep/Glob calls → Edit/Write calls starting
- Questions answered → Code being written
IMPLEMENTATION → TESTING
- Edit/Write heavy → Bash(test) calls
- Feature code done → Verification starting
DEBUGGING → RESOLUTION
- Error investigation → Fix confirmed working
- Multiple attempts → Success achieved
This skill works with hooks that:
[Hook detects: 30+ Read/Grep calls, first Edit coming]
→ Suggest: "Exploration complete. Consider /compact before implementation."
[Hook detects: Tests passing after implementation]
→ Suggest: "Milestone reached. Good time for /compact or /handoff."
[Hook detects: 50 tool calls reached]
→ Suggest: "Session has 50+ tool calls. Consider /compact if context feels stale."
Works automatically via plugin hooks. No manual configuration needed.
The hooks:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anilcancakir/claude-code-plugins --plugin strategic-compactOther plugins' skills for the same job