All Claude Code modswalterreid/before-compact
before-compact
Keeps your last turns, verbatim, across compaction. PreCompact hooks save the last turns verbatim, yours and the assistant's as two bundles (and the full arc beside them); SessionStart hooks re-inject each as its own block after compaction. /before-compact:recover does it on demand; /before-compact opens a monitor pane with the summary the engine installed.
before-compact reaches L2 (writes or runs) and passed claude plugin validate.
- Events hooked: 7
- API methods referenced: 21
- Access from classified calls: L2, writes or runs: runs processes, writes files, drives Claude, reads files, reads env vars, reads the transcript, reads mod state, draws
- Reads mod state: the scan does not record whose state, so this does not show that it reads another mod’s values
- Static scan, not a runtime test
Install hint
/plugin install before-compact --marketplace walterreid/before-compactFrom the repository's own marketplace. Confirm the plugin name in the repository's README before installing. Mods need Claude Code 2.1.287 or later.
Access
L2 Writes or runsruns processes, writes files, drives Claude, reads files, reads env vars, reads the transcript, reads mod state, drawsValidation
PassedView the source on GitHub Back to the list
What the scan recorded
- Observed events
- compaction, classic hooks
- Hooks
config.set {key=/"(^|\\.)(inject_(in_mod|turns|max_chars)|summary_instructions|digest_(in_precompact|model|max_tokens))$"/}, session.start, command.run {command=before-compact}, session.compact, classic.PreCompact, classic.SessionStart {source=compact}, ui.render {component=Pane, requestId=before-compact}- API calls
$.clock.every, $.command.register, $.env.get, $.fs.exists, $.fs.list, $.fs.read, $.fs.stat, $.fs.write, $.model.complete, $.process.run, $.session.cwd, $.session.id, $.session.messages, $.session.usage, $.state.get, $.state.set, $.ui.invalidate, $.ui.log, $.ui.open, $.ui.resolve, $.ui.toast- Validation
- Passed
- Scanned revision
3c10d7422aa7- Marketplace passed
- walterreid-plugins
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
Authors can show the latest scan result in their README. Each badge links to this page.
[](https://mods.aidojo.si/mods/walterreid--before-compact--before-compact/)
[](https://mods.aidojo.si/mods/walterreid--before-compact--before-compact/)