contextsaver

Reviewed at commit 0f83acb

Caution: Its Write button adds a permission rule proposed by the model to your project settings while the pane shows only the rule's title, not the rule itself.

Diagnoses wrong processes, workflows and habits in Claude Code sessions: fires on plan acceptance, workflow launches, pace complaints and the clock, names the…

Made by
Almog Baku
What we checked

Logs every tool call and periodically asks Claude, in background requests on your own account, to spot wasteful habits; findings appear as cards in a band and pane. Fixes you pick are added to later prompts, tool results and new subagents' prompts, and a Write button can save them to CLAUDE.md, a skill, an agent file or a permission rule in your project settings. No other network calls.

Review details

Static review of the source at the pinned commit; not run. Hooks: session.start, turn.start, tool.call, turn.complete, agent.spawn, session.compact, prompt.submit, ui.render (AbovePrompt band and its own Pane), command.run (/saver and, after the fact, clear/resume to reset), ui.close. Runtime calls: $.clock, $.ui.toast/log/open/close/focus/invalidate/resolve, $.command.register, $.session.usage, $.session.messages (rebuilds the ledger from the transcript when joined late), $.store.get/set (pattern registry per cwd; typed prompts are not stored and quoting entries are dropped), $.model.fork (two judges: the habit judge after about 30k new tokens and 3 turns or 40 new tool calls and 5 minutes, the process judge at most every 30 minutes or on plan acceptance, workflow launch or a pace complaint; this costs tokens without being asked), $.fs.read/exists/write, $.env.get('CONTEXTSAVER_DEBUG'). tool.call calls next exactly once, records a row (tool, normalized key, size, result head, changed paths), and appends pending one-time notes or standing fixes to the result's context; agent.spawn appends standing fixes to non-fork subagent prompts; prompt.submit appends them to the prompt context. Files read: workflow journals (transcriptDir/journal.jsonl) and Workflow scripts (scriptPath, parsed as a literal, never executed). Files written only on the user's Write press: append to CLAUDE.md, overwrite .claude/skills/<slug>/SKILL.md or .claude/agents/<slug>.md, or merge a model-proposed rule (validated only as Tool(...), so a broad rule like Bash(*) would pass) into permissions.allow of the project .claude/settings.json; the pane shows the rule's title and kind 'permission rule', not the rule text. All hooks catch errors and fall through. No fetch, no processes. scripts/ (replay.ts spawns claude -p and reads ~/.claude/projects, screenshot.py, check.sh, smoke.sh) are developer tools not loaded by the plugin.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: no
  • Calls the model (uses tokens): yes
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Screenshot of contextsaver

Diagnoses wrong processes, workflows and habits in Claude Code sessions: fires on plan acceptance, workflow launches, pace complaints and the clock, names the lean alternative with its measured cost, and lets the user fix it in one click.

Made this mod? Add a badge to your README

modsforClaude badge for contextsaver

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/contextsaver.svg)](https://modsforclaude.com/mods/contextsaver/)

← All mods