revdiff: Instructions file for Claude Code

CLAUDE.md

revdiff CLAUDE.md is an instructions file for Claude Code from umputun/revdiff. It costs 9,249 tokens per session, scanned A, original, MIT.

Project instructions for revdiff, a terminal interface for reviewing code changes, files, and documents with inline notes. It also documents the project's Go structure, commands, and support for Git, Mercurial, and Jujutsu.

In plain words
What is it for?
Work on revdiff by following its architecture, running its build and test commands, generating mocks, and maintaining its version-control and terminal interface code.
Why use it?
They give an coding agent the project rules needed to build, test, format, lint, and change revdiff consistently. This avoids guessing how the repository is organized or verified.

Instructions file for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_DATA} variable. Also seen: reads .claude/ paths; mentions .claude-plugin; names the ExitPlanMode tool.

This is umputun/revdiff's own configuration. It tells Claude Code how to work on revdiff itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything revdiff configures →

Reuse

Borrowing it

Nothing to install: this file belongs to umputun/revdiff. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/umputun/revdiff/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/umputun/revdiff

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for revdiff CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/umputun/revdiff/claude-md/github.svg)](https://agentmods.dev/instructions/umputun/revdiff/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/umputun/revdiff/claude-md"><img src="https://agentmods.dev/badge/instructions/umputun/revdiff/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for revdiff CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/umputun/revdiff/claude-md"><img src="https://agentmods.dev/badge/instructions/umputun/revdiff/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,249 This file is loaded in full into every session.
When invoked 9,249 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.09249 $0.09249
Opus 5.5 $0.03700 $0.03700
Sonnet 5.5 $0.01850 $0.01850
Haiku 4.5 $0.00925 $0.00925

Measured 10d ago against content hash 1ea0d684b9e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

revdiff CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

revdiff

TUI for reviewing diffs, files, and documents with inline annotations, built with bubbletea.

Architecture: see docs/ARCHITECTURE.md for system design, data flows, interfaces, and design decisions.

Commands

  • Build: make build (output: .bin/revdiff)
  • Test: make test (race detector + coverage, excludes mocks)
  • Lint: make lint or golangci-lint run
  • Format: make fmt or ~/.claude/format.sh
  • Generate mocks: go generate ./...
  • Vendor after adding deps: go mod vendor

Project Structure

  • app/ - all Go source
  • app/revdiff/ - composition root (package main), split by concern: main.go (entrypoint + run()), config.go (options/parsing), stdin.go (stdin mode), renderer_setup.go (VCS wiring), themes.go (theme CLI + adapter), history_save.go (session save)
  • app/diff/ - VCS interaction (git + hg + jj), unified diff parsing, VCS detection, Mercurial + Jujutsu support. compare.go — CompareReader renderer for --compare-old/--compare-new (runs git diff --no-index, no repo required)
  • app/ui/ - bubbletea TUI package. Single Model struct with state grouped into sub-structs (cfg, layout, file, modes, nav, search, annot), methods split across files by concern (~500 lines each). Each source file has a matching _test.go. See app/ui/doc.go for package docs, docs/ARCHITECTURE.md for file-by-file breakdown. Does not import app/theme or app/fsutil — theme operations go through the ThemeCatalog interface
  • app/ui/style/ - color/style resolution: hex-to-ANSI, lipgloss styles, SGR tracking, HSL math. Types: Resolver, Renderer, SGR. Also display.go - package-level SanitizeFilenameForDisplay and TruncateLeftToWidth, the shared helpers every filename-rendering surface must route through
  • app/ui/sidepane/ - file tree + markdown TOC components with cursor/offset management
  • app/ui/worddiff/ - intra-line word-diff: tokenizer, LCS, line pairing, highlight insertion
  • app/ui/overlay/ - layered popups: help, annotation list, theme selector, file picker. Manager enforces one-at-a-time
  • app/highlight/ - chroma syntax highlighting, foreground-only ANSI
  • app/keymap/ - configurable keybindings (Action constants, parser, defaults, dump)
  • app/theme/ - Catalog-centric theme system: Theme (data + serialization) and Catalog (discovery, loading, installation, gallery). Zero standalone functions — all logic as methods. Files: theme.go (Theme struct), catalog.go (Catalog struct + all operations). 8 bundled + community gallery
  • app/annotation/ - in-memory annotation store and structured output
  • app/editor/ - external $EDITOR invocation for multi-line annotations: temp-file lifecycle, editor resolution ($EDITOR → $VISUAL → vi), and Command() API returning *exec.Cmd + completion func for tea.ExecProcess. Consumed by app/ui via the ExternalEditor interface
  • app/handoff/ - prepares user-configured post-flush shell commands. Annotation snapshots are provided on stdin; stdout is suppressed so helpers cannot overwrite the TUI. Consumed by app/ui via the PostFlushHook interface and tea.ExecProcess
  • app/history/ - review session auto-save to ~/.config/revdiff/history/
  • app/fsutil/ - filesystem utilities
  • app/ptybridge/ - macOS/Linux PTY bridge (package main) built on demand by plugins/opencode/v2/runtime-check.ts to run a real OpenCode CLI in a terminal. Test helper only: make build and goreleaser build ./app/revdiff alone, so it never ships
  • app/ui/mocks/ - moq-generated mocks (never edit manually)

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago Changed · +21 tokens per session 1ea0d684b9e3
  2. 19d ago Changed · +1 lines · +1,029 tokens per session a78a7c5c350d
  3. 27d ago Changed 193c14b77d1e
  4. 1mo ago Changed · +1 lines · +416 tokens per session 36726d9887ee
  5. 1mo ago Changed · +1 lines · +363 tokens per session 682352ece8a2
  6. 1mo ago Changed · +9 lines · +447 tokens per session 00cd97616665
  7. 2mo ago Changed · +1 lines · +14 tokens per session d7a0b3a864fc
  8. 2mo ago Changed · +4 lines · +2,239 tokens per session 255ddeb87fd0
  9. 3mo ago First seen · 94 lines · 4,720 tokens per session scan A a0f7c5c98e9c

Subscribe to this mod's changes

revdiff CLAUDE.md is an instructions file published in the GitHub repository umputun/revdiff (974 stars, last pushed today), licensed MIT. It adds 9,249 tokens to every session, about $0.0370 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

revdiff CLAUDE.md compared with instructions from other repositories

revdiff CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
revdiff CLAUDE.mdumputun/revdiffInstructions file974todayMITA9,249Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109ktodayMITA3,077GitHub Copilot