Context weight-loss plugin for Claude Code. Prune bloated sessions, protect agent teams from compaction, and monitor context usage — all from within Claude Code.
pip install cozempic# Development / testing
claude --plugin-dir ./plugin
# From marketplace (once published)
claude plugin install cozempic| Skill | Description | Invocation |
|---|---|---|
/cozempic:diagnose |
Analyze session bloat, token count, context % | User or Claude (auto) |
/cozempic:treat [rx] |
Prune session with gentle/standard/aggressive | User only |
/cozempic:reload [rx] |
Treat + auto-resume in new terminal | User only |
/cozempic:guard |
Start background sentinel daemon | User only |
/cozempic:doctor |
Run health checks | User or Claude (auto) |
Automatically registered when the plugin is enabled:
| Event | Action |
|---|---|
SessionStart |
Start guard daemon in background |
PostToolUse (Task/TaskCreate/TaskUpdate) |
Checkpoint agent team state |
PreCompact |
Emergency checkpoint before compaction |
Stop |
Final checkpoint on session end |
The plugin includes an MCP server that gives Claude direct access to cozempic tools:
diagnose_current— Full session diagnosis with token countsestimate_tokens— Quick token count + context % checklist_sessions— All sessions with sizes and tokenstreat_session— Dry-run or apply a prescriptionlist_strategies— Available strategies and prescriptions
Claude can invoke these automatically when it detects context pressure.
The plugin wraps the cozempic CLI and Python package:
- Skills call
cozempicCLI commands via Bash - Hooks run
cozempic guardandcozempic checkpointon lifecycle events - MCP server imports from the
cozempicpackage directly for richer tool integration