claudemods

All Claude Code modsStevenLi-phoenix/claude-code-self-compact-plugin

self-compact

A Claude Code mod in StevenLi-phoenix/claude-code-self-compact-plugin

Gives Claude a compact_context tool: it decides when to compact, the mod compacts once the turn ends, only past the idle-compaction size, reminds it past 300k tokens, carries on with the work it names, and a Stop hook such as /goal cannot hold it back

self-compact reaches L2 (writes or runs) and passed claude plugin validate with warnings.

To install it, open the repository and follow the author’s setup instructions. Mods need Claude Code 2.1.287 or later.

Access

L2 Writes or runsdrives Claude, reads env vars, draws

Validation

Passed with warnings

View the source on GitHub Back to the list

What the scan recorded

Observed events
mcp__self-compact__compact_context calls, every prompt, every tool call, classic hooks
Hooks
session.start, tool.call {tool=mcp__self-compact__compact_context}, prompt.submit, tool.call, classic.Stop, turn.start, turn.complete
API calls
$.clock.after, $.env.get, $.prompt.submit, $.session.compact, $.session.usage, $.tool.register, $.ui.log, $.ui.status, $.ui.toast
Validation
Passed with warnings
Scanned revision
bfa8c9754a73

These are the hooks and API calls reported by claude plugin validate. Access levels describe the widest reach of those calls and are not safety ratings. Validation is a static check, not a runtime test, and a passing result does not prove that a mod works or is safe. What a mod can access and how the scan works.

Badge for your README

Reach badge for self-compact Validation badge for self-compact

Authors can show the latest scan result in their README. Each badge links to this page.

[![reach](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/StevenLi-phoenix--claude-code-self-compact-plugin--self-compact-reach.svg)](https://mods.aidojo.si/mods/StevenLi-phoenix--claude-code-self-compact-plugin--self-compact/)
[![validates](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/StevenLi-phoenix--claude-code-self-compact-plugin--self-compact-validates.svg)](https://mods.aidojo.si/mods/StevenLi-phoenix--claude-code-self-compact-plugin--self-compact/)