Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By AshishKumar4v0.2.0AGPL-3.0In 1 marketplace
Shrinks a long Claude Code session on disk by pruning old tool output and reasoning, then reopens it intact. Needs the Better Compact CLI; compaction runs after you exit with Ctrl-D, not mid-session.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Edited and maintained by Claude. Provided as-is.
Claude Code slash command for the Better Compact CLI.
Install the CLI:
npm install -g @better-compact/cli
Add this repository as a Claude Code marketplace:
claude plugin marketplace add AshishKumar4/better-compact
claude plugin install better-compact@better-compact
Launch Claude Code through the wrapper:
better-compact claude --run
In a long session:
/better-compact:compact
Exit with Ctrl-D. The wrapper compacts the closed session and reopens it.
Without the wrapper, the command prints the one-shot command to run after exit:
better-compact claude <session-id> --resume
better-compact claude <session-id> --keep-tokens 40000
better-compact claude <session-id> --from-backup
better-compact claude <session-id> --aggressive
See the CLI README for all options.
Remove an old local-proxy configuration with:
better-compact install claude-code
The command is a no-op on a fresh installation.
The plugin does not edit the live session. /better-compact:compact writes a queue marker for the current session and asks the user to exit.
better-compact claude --run checks the queue after Claude Code exits, compacts the transcript through the CLI, then reopens the same session.
Claude Code rebuilds its context state from the transcript on resume. This is why compaction runs after exit instead of through a request hook.
AGPL-3.0-or-later
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub ashishkumar4/better-compact --plugin better-compactPlugins from other owners that cover similar ground