csr-lens

Reviewed at commit 5d5c709

Caution: Copies your project files into a new temp folder before every Bash command and never deletes them, so copies of your code pile up outside the project.

Painel ao lado da conversa com visão geral, agentes (quem chamou quem, recados e rodadas), turnos, diffs como no VS Code, árvore de arquivos ao vivo, contexto…

Made by
Cesar Schutz
What we checked

Adds a side panel (/lens, /inventario) and a summary line above the prompt that show your agents and their messages, turns, file diffs, a live file tree, context use and cost, and an inventory of your plugins, skills, hooks and MCP servers. It runs read-only git commands in your project, makes no network calls, and keeps the last three sessions' prompts, replies and command output in its own store.

Review details

Static review of the source at the pinned commit; not run. Hooks: session.start (registers /lens and /inventario, restores the saved session snapshot, reads usage, model and git, starts a 1 s clock), session.end, command.run (its commands; re-reads the inventory after /plugin, /mcp, /hooks and similar), ui.press, ui.focus, ui.close, tool.call, agent.spawn, session.send, turn.start, turn.step, turn.complete, session.measure, ui.render for its Pane and the AbovePrompt band. Every hook passes the event through unchanged, except tool.call, which denies every tool call (other than SubagentHandback) of a subagent you pressed Stop for in the panel; that button also sends the agent a fixed stop message with $.session.send. Runtime calls: $.process.run for git only (rev-parse, status, diff HEAD, diff --no-index for untracked files) plus mktemp, mkdir and cp; before each Bash call of the main conversation it snapshots the working tree with git add -A and write-tree using a temporary index and object folder in a mktemp directory (the user's index and refs are not touched; non-ignored file contents end up as git objects in that temp folder, which the mod never cleans up; the call waits up to 5 s for it), then diffs the snapshot afterwards to show what the command changed. $.fs.read of a file before Write, of workflow journals and agent transcripts under ~/.claude/projects/<project>/<session>/subagents/workflows, of plugin manifests, installed_plugins.json, known_marketplaces.json, skill/command/agent frontmatter, hooks.json and the project's .mcp.json (only server names); $.fs.list of project folders when you open them in the tree; $.settings.read (hook commands and output style for the inventory); $.env.get of HOME, CLAUDE_CONFIG_DIR and CLAUDE_CODE_PLUGIN_DIRS; $.fs.write of ~/.claude/csr-lens-erros.log (last 50 error messages and stack traces) and, only after /lens diagnostico, ~/.claude/csr-lens-diagnostico.log (click and render events); $.session.usage/messages/id/model, $.agent.list, $.command.list, $.tool.list, $.ui.open/close/panes/toast/log/scroll/resolve, $.clock, $.store.get/set/delete. $.store keeps the graph zoom and, per session for the last three sessions (under about 1 MB each), a snapshot with prompts (up to 6000 chars), replies, agent prompts and answers, Bash commands with the tail of their output (3000 chars), edit diffs and touched paths. The Contexto tab's exact count ($.session.usage with breakdown full) makes token-count requests only when you press its button. No $.http, fetch, $.model, eval or settings writes. Read fully: register.tsx, memoria.ts and the I/O parts of inventario.ts; the pure rendering and parsing modules (telas.tsx, fichas.tsx, graficos.ts, desenhos.ts, pecas.tsx, the -tela files, dados.ts, arvore.ts, diff*.ts, pilulas.ts, workflows.ts, caminhos-do-bash.ts) were checked by targeted search for runtime calls, network, processes and writes and contain none.

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: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events

Painel ao lado da conversa com visão geral, agentes (quem chamou quem, recados e rodadas), turnos, diffs como no VS Code, árvore de arquivos ao vivo, contexto e custo e inventário de plugins, e uma linha de resumo acima do prompt. Só observa, a não ser quando você manda parar um agente.

Made this mod? Add a badge to your README

modsforClaude badge for csr-lens

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/csr-lens.svg)](https://modsforclaude.com/mods/csr-lens/)

← All mods