Context & memory·terminal·MIT
Katharsis
Classifies each message and shapes the reply: answer first, a word cap, codes that last.

Katharsis is an output style that makes Claude decide what kind of message you sent before it replies. A status check, an approval, a bug report and a request for a diagnosis each get their own shape: the answer on the first line, a word ceiling for that type, and a code such as F3 or NA2 on every finding and next action, so “do NA2” is a complete instruction. A hooks module carries the per-turn reminder, keeps the codes on disk and adds a drawer to browse them.
The README’s test sends the same two messages, in the same sandbox repo, under the default style and under Katharsis. On Opus 5, the second reply drops from 449 words to 87 and opens with the test result. Across both turns Katharsis is also shorter on Opus 5.5, the run in the GIF above, and on Fable 5.1 and Fable 5, where it runs 224 words against 540. It is longer on Sonnet 5, 498 against 349. The replies are stored verbatim in the repo’s demo/ folder with the steps to reproduce them.
What it does
- Eleven exchange types. The model picks one from a cue table in the style, then runs a script that prints that type’s guidance file: what opens the reply, what stays out, how long it may run. The script never classifies; it only prints the file and records the type.
| Type | Typical message | Ceiling |
|---|---|---|
factual-question | a question with a short, checkable answer | 150 words |
status-and-resume | how is it going, or carry on | 250 |
approval | a go-ahead or a picked option | 250 |
thinking-out-loud | talking an idea through | 350 |
diagnosis | why does this happen, or what do you think | 500 |
redirect | do it another way | 250 |
broken-report | a reply or a result is wrong | 250 |
work-request | a task to do | 400 |
canned-review | a scripted review prompt naming a diff | 300 |
harness-probe | answer in one exact form | that form |
default | a greeting, a fragment, or three types at once | 250 |
The ceiling counts everything you read, coded lines included. When your message lists items, each one gets a line regardless.
- Reference codes. Findings (
F), assumptions (A), risks (R), caveats (C), actions taken (AT), verified (V), next actions (NA), blocked (B), your move (MV), waiting (W), excluded (X), state (S), trade-offs (T-O), errata (E) and questions (Q). Each coded line holds the claim and its evidence in one sentence, and numbers never restart within a session. - Acting instead of asking. The model makes the calls that are cheap to undo and reports them. It ends on a question only when a wrong guess would be expensive or reach past your machine, with the options and a recommendation inside it. You answer
Q3 a,Q3 zwith your own answer, orQ3 xto dismiss it. - A ledger and
kref. A Stop hook writes every coded item to a ledger, andkrefreads it back from bash mode:kref F3for one item,kref search <word>across every session,--short,--chrono,--htmlor--jsonfor other views. Codes still resolve after a compaction or in the next session. - The drawer. A band above the prompt counts the code types in the session, such as
F:3|C:1|AT:2|Q:1. Hover a type for its latest 10 titles and press one to open it./kdrawer [query]opens a pane with every item grouped by type, a search box, a type filter, a Status menu (all, open, resolved) and a short or full view. In a reply, each code on record becomes a link to the drawer, chips under the reply show a card per code on hover, and under the latest reply a Still open row lists unanswered questions, your moves, blocks and risks. - Checks on the reply. Stop hooks hold a reply once, asking only for the missing line, when it gives a code a different claim with no erratum, or when it opens by narrating instead of with the finding. Another prints one
Katharsis check:line when the reply says tests, a build, a linter or CI passed but the last run failed, ran before a later edit or never ran, or when a count rests ongrep -corrgwithout-uu. No hook asks for a rewrite. - An overwrite guard. Around each Bash call that replaces a file no earlier call named (
>,tee,cp,mv,dd of=), a hook copies the file first. If lines were lost, it keeps the copy, shows you and the model thecpcommand that restores it, and holds a reply that does not mention the loss once. This one runs in every session, with or without the style. /katharsis:rules-checkreads the instruction files Claude Code loads for the project and reports the rules that repeat or contradict the style, each with a suggested edit. It changes a file only after you approve that edit.


Install
Needs Claude Code 2.1.287 or later, plus bash and python3; kref also needs Node.js 22.18 or later.
claude plugin marketplace add OpenScribbler/Katharsis
claude plugin install katharsis@openscribbler
Then run /katharsis:setup in a session. It adds one entry to permissions.allow in ~/.claude/settings.json, Bash(~/.claude/katharsis/scripts/katharsis-exchange-style.sh:*), so the per-turn script does not ask for permission in every session. Running ~/.claude/katharsis/scripts/setup.sh --dry-run from a terminal prints the change without writing it.
Last, open /config, choose Output style and pick one of two:
katharsis:Katharsisdrops Claude Code’s built-in software-engineering instructions, as any custom output style does by default.katharsis:Katharsis codingkeeps them.
The pick is saved to .claude/settings.local.json in the current project, so each project needs its own. To run kref from your own terminal, link it once:
ln -s ~/.claude/katharsis/bin/kref ~/.local/bin/
How it works
What it reads. The prompt hook (prompt.submit) reads the active output style through settings.read. When it is not Katharsis, the hook deletes its marker file and does nothing else, and the drawer draws nothing. When it is, the hook reads your message locally for three things: answers such as Q3 a, signs that you did not type the turn (a task notification, a bash-mode result, a skill load, a compaction resume), and a handoff file under /tmp/punt-<id>.md, whose ledger parent it reads to join two sessions into one numbering.
What it adds to the context. Each typed turn gets two lines asking the model to classify the message, read the matching guidance file and check the draft against it, plus the next free code numbers and the open question codes. An untyped turn inherits the last typed message’s type, which the hook records so the model skips the script. When the model changes, and after a compaction, it attaches a short note for Fable, Opus or Sonnet that counters habits Anthropic’s prompting guide names for that family. After a compaction it also lists up to 12 of the oldest open next actions, moves, waits, blocks and questions from the ledger, each cut to 200 characters, so the resumed turn does not rely on the summary.
Tokens. Each typed turn costs those lines, one Bash call and the guidance file it prints. A held reply costs one more short turn. From the third turn until it gets a title, and every 15 turns after that, the module also asks the model in a forked call (model.fork) to name the session in three to six words, once the reply is out. The author does not say what any of this costs.
What it writes. Everything goes under ~/.claude/katharsis-data/ (KATHARSIS_DATA moves it): the ledger, one JSONL file per session; a session record with its folder, git branch, times, plugin version, transcript path and the forked title; answers to questions and telemetry counts, neither with message text; detections, which keep up to 300 characters of the command, result or reply sentence behind each flag; and the copies of overwritten files, capped at 64 MiB and never deleted. A session-start hook keeps a symlink at ~/.claude/katharsis pointing at the install directory, which moves on every update. The hooks module runs git branch --show-current once per session and makes no network calls of its own.
A hook that fails passes your prompt through untouched.
The repo signs hashes of the setup skill, the output styles and the guidance files with Sigstore on every push and records them in the Rekor public log; SECURITY.md says what that covers.
Limitations
- The author shows the band, the drawer and the chips only in the terminal.
- Classification is the model’s call. The prompt hook repeats the instruction every turn because it fades over long sessions, and a Stop hook logs each turn that skipped it.
- Without python3, setup fails and the ledger is not written.
- Uninstalling leaves the symlink and
~/.claude/katharsis-data/behind. Pick another style in/configin each project and remove the permission entry setup added.
Similar Claude Mods
cache-tax
Keeps the prompt cache warm during breaks and stops a cold send once with its price.
token-weather
Context window fill as a weather forecast above the prompt, with a chart of recent turns.
storybloq
A board of the tickets and issues kept in .story/, in a pane beside the transcript.
kindex-modern
Task tools backed by a Kindex store in your repo, plus repo memory on every prompt.
Popular Claude Mods
The whole directory →glowup
A live side pane for changes, subagents and context, shareable themes and a pixel pet.
collision-guard
Asks before Claude edits a file another open chat just changed.
replay-theater
A /replay pane that walks through the last turn's file edits, one diff per step.
auto-handoff
Hands a long session to a fresh one with a Haiku-written brief instead of compacting.





