Compactor — Development skill for Claude Code
Claude Code plugin: agent-controlled auto-compaction — hold compaction during fragile work, with handoff notes that survive it.
How to install Compactor
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open rhwendt/compactor and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Compactor does
Claude Code plugin: agent-controlled auto-compaction — hold compaction during fragile work, with handoff notes that survive it.
Alternatives in Development
- Create Handoff — You are tasked with writing a handoff document to hand off your work to another agent in a new session 10k ★
- Om Intake — Process all unread meeting notes in work/meetings/ — reads each file, classifies content, routes to the right 4.6k ★
- Mem Save — Save a curated session-level summary to history 186 ★
README
compactor
Agent-controlled auto-compaction for Claude Code. The agent **holds** auto-compaction during fragile work, such as debugging chains or multi-file refactors, and **releases** it at a safe breakpoint. It can leave a **handoff note** that comes back after compaction.
What "control" means
Claude Code can't be told to compact early, by hooks or by the model. So compactor controls **when compaction is allowed**:
- Below roughly your threshold, nothing compacts (Claude Code starts a little early; see Known Claude Code behaviors).
- At or above it, compaction proceeds unless the agent holds it. Releasing lets it through at the next automatic check. The exception: by default, while a background subagent runs, compactions are held until the safety ceiling (see the same section).
- A safety ceiling (90% of the window by default) overrides any hold, so a session never runs into the hard limit. It counts tool output that arrived since the model's last reply, and lets compaction through early when one more turn as large as the last would reach it.
Requirements
- Claude Code with plugin support
python3(3.9 or newer) on your PATH. It uses the standard library only. On Windows, make surepython3resolves, for example through the Python launcher or an alias.
The test suite runs in CI on Linux, macOS and Windows (Python 3.9–3.13). Live sessions have been checked on Linux only, so reports from macOS and Windows are welcome.
Install
/plugin marketplace add rhwendt/compactor
/plugin install compactor@compactor
Enable
compactor is inactive until you set a threshold, which also pulls auto-compaction below the model's default. Add it to `~/.claude/settings.json`:
{ "env": { "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "350000" } }
Set the threshold below the model's context window, for example `350000` on 1M-context models or `150000` on 200k models. The safety ceiling is always a percentag
Related Skills
Lossless Handoff
Claude Code hooks for lossless context: a handoff before every auto-compaction, a per-project decisions list,
Bind
Bind this session to a project (and work item) under the work root, so its knowledge, scripts and handoff are
Recursive Research
Claude Code skill for recursive research up to PhD level across any domain. Source tiering, WDM + Munger inver
1on1
Hold a 1:1 with a member of the office — review queued notes, consolidate their LEARNED.md
Moonlight Claude Mods
Mods for Claude Code's terminal: a pill row of side panels (skills, prompts, files, agent progress, heads-up n
Claude Compact Keeper
Compaction without amnesia: the summarizer is told to keep your goal, constraints, decisions and paths verbati
Related Agents
Memory Compactor
Folds this project's raw ccmemory notes into one dense compiled- article. Fire it in the background when a com
Logging
Use only during context compaction or task completion. Consolidates and organizes work logs into the task's Wo
Memory Orchestrator
Biomimetic memory orchestrator. Retrieve before complex work, store high-salience facts during execution, and