claudemods

All Claude Code modswalterreid/before-compact

before-compact

A Claude Code mod in walterreid/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.

Install hint

/plugin install before-compact --marketplace walterreid/before-compact

From 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, draws

Validation

Passed

View 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

Reach badge for before-compact Validation badge for before-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/walterreid--before-compact--before-compact-reach.svg)](https://mods.aidojo.si/mods/walterreid--before-compact--before-compact/)
[![validates](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/walterreid--before-compact--before-compact-validates.svg)](https://mods.aidojo.si/mods/walterreid--before-compact--before-compact/)