What is compaction-trigger?
compaction-trigger is a Claude Code mod by darkroomengineering that requests a session compaction when the live context passes a token threshold, so verbatim compaction plugins run near the working ceiling instead of at the model window. It is listed under Cost & usage and has 51 GitHub stars.
| Type | Claude code mod |
|---|---|
| Author | darkroomengineering |
| Repository | darkroomengineering/cc-settings |
| Popularity | 51 GitHub stars |
| Category | Cost & usage |
| Security | Review before installing (76/100) |
| Rank | #235 of 5,272 Claude Code mods; #38 in Cost & usage |
| License | MIT |
| Last commit | 2026-10-16 |
| Stars this week | +4 |
| Hooks | 2 events |
| Sees | only the events it hooks |
| Draws on | nothing |
Is compaction-trigger safe to install?
compaction-trigger scores 76/100 on the MCPMods security check: Review before installing. Things to review: writes files or config; reads environment variables. It passed 6 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts no processes | Pass |
| Writes files or config | Review |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Passes claude plugin validate | Pass |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.env.get | reads env vars |
$.env.set | sets env vars |
$.session.compact | drives Claude |
$.session.usage | |
$.settings.read | reads settings |
$.ui.log | draws interface |
How do I install compaction-trigger?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/darkroomengineering/cc-settings claude plugin validate ./cc-settings/plugins/compaction-trigger
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add darkroomengineering/cc-settings && claude plugin install compaction-trigger@cc-settings
Or ask Claude to set it up
Paste this into Claude Code and it installs compaction-trigger for you:
Install the "compaction-trigger" Claude Code mod from https://github.com/darkroomengineering/cc-settings/tree/main/plugins/compaction-trigger. Run claude plugin validate on it first and show me what it can access before you enable it.
More from darkroomengineering/cc-settings
This repository has 3 Claude Code mods on MCPMods.
- context-report: Prints which instruction files the engine loaded (tier, path, @ imports, size) once per context load, and hints when a p (Low risk)
- drift-fuse: Scores each unattended turn against the task the person asked for with TypeSafe's Jev model, and after consecutive off-t (Review before installing)