revdiff-plan

A terminal tool for reviewing the latest message from Codex with notes placed directly beside its text. A TUI is a text-based interface that runs inside a terminal window.

In plain words
What is it for?
Use it to annotate a plan, analysis, proposal, or other recent Codex response in the revdiff review screen.
Why use it?
It makes plans and proposals easier to inspect line by line before acting on them. Comments stay tied to the part of the response they discuss.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/umputun/revdiff/revdiff-plan
Any agent
npx skills add umputun/revdiff --skill revdiff-plan
Clone the repo
git clone --depth 1 https://github.com/umputun/revdiff

Made for: Claude Code, Codex.

Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00084 $0.01602
Opus 5 $0.00042 $0.00801
Sonnet 5 $0.00017 $0.00320
Haiku 4.5 $0.00008 $0.00160

Measured yesterday against content hash 2007d5137c7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

revdiff-plan 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/extract-last-message.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/codex/skills/revdiff-plan/SKILL.md · 176 lines

How it starts

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

revdiff-plan - Review Codex Output

Review the last Codex assistant message with inline annotations using revdiff TUI in a terminal overlay.

Script Path Resolution

Resolve the script directory using repo root first, then fall back to Codex home:

SCRIPT_DIR="$(git rev-parse --show-toplevel 2>/dev/null)/plugins/codex/skills/revdiff-plan/scripts"
if [ ! -d "$SCRIPT_DIR" ]; then
    SCRIPT_DIR="${CODEX_HOME:-$HOME/.codex}/skills/revdiff-plan/scripts"
fi

Also resolve the launcher script from the revdiff skill:

LAUNCHER_DIR="$(git rev-parse --show-toplevel 2>/dev/null)/plugins/codex/skills/revdiff/scripts"
if [ ! -d "$LAUNCHER_DIR" ]; then
    LAUNCHER_DIR="${CODEX_HOME:-$HOME/.codex}/skills/revdiff/scripts"
fi

Use $SCRIPT_DIR and $LAUNCHER_DIR in place of script paths throughout this skill.

Activation Triggers

  • "revdiff-plan", "review plan with revdiff", "annotate plan"
  • "review last response", "annotate codex output"

How It Works

  1. Extract the last Codex assistant message from rollout files
  2. Write it to a temp markdown file
  3. Launch revdiff with --only=<tempfile> in a terminal overlay
  4. User reads the plan, adds annotations on specific lines
  5. On quit, annotations are captured from stdout
  6. Codex reads annotations and addresses each one (refine plan, answer questions, fix issues)
  7. Loop: re-launch revdiff to verify changes, user can add more annotations
  8. Done when user quits without annotations; clean up temp file

Workflow

Step 1: Extract Last Assistant Message

Run the extraction script with --skip-current to avoid picking up this session's own output:

$SCRIPT_DIR/extract-last-message.sh --skip-current

The script:

  • Uses a best-effort heuristic: picks the second most recent rollout JSONL file by modification time from ~/.codex/sessions/
  • This assumes the newest file belongs to the active session; if concurrent Codex sessions exist, the wrong file may be selected
  • Falls back to the newest file if only one session exists
  • Extracts the last assistant message text using jq
  • Outputs raw markdown to stdout
  • Accepts an explicit rollout file path as an argument to bypass auto-detection when precision matters

Read the full file on GitHub · 176 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 176 lines · 84 tokens per session scan A 2007d5137c7d

Subscribe to this mod's changes

revdiff-plan is a skill published in the GitHub repository umputun/revdiff (826 stars, last pushed 3d ago), licensed MIT. It adds 84 tokens to every session and 1,602 once invoked, about $0.0004 per session on Opus 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

Other skills, from other repositories

hunk-extensions

Maps the hunkdiff/extension authoring surface for Hunk, the terminal diff viewer — hiding or reordering reviewed files, docked panes, alternate file views, commands and key bindings, dialogs, workspace writes, themes, syntax languages, VCS backends, lifecycle events. Use when writing, debugging, or installing a Hunk…

modem-dev/hunk · 105 tokens

hunk-launch-video

Produces Hunk videos by driving the real TUI headlessly in a PTY, compositing captioned 1080p frames in Chromium, and encoding with ffmpeg. Use for feature demos, workflow explainers, announcements, launch videos, and full-release roundups.

modem-dev/hunk · 60 tokens

hunk-review

Interacts with live Hunk diff review sessions via CLI. Inspects review focus, navigates files, hunks, and exact lines, reloads session contents, adds inline review comments, and paints attention marks on character ranges. Use when the user has a Hunk session running or wants to review diffs interactively.

modem-dev/hunk · 69 tokens

hunk-release

Prepares, publishes, verifies, and curates Hunk releases. Use for release metadata, benchmarks, tags, publishing, release videos, backports, or recovery.

modem-dev/hunk · 38 tokens

critique

Git diff viewer. Renders diffs as web pages, images, and PDFs with syntax highlighting. Use this skill when working with critique for showing diffs, generating diff URLs, or selective hunk staging.

remorses/critique · 45 tokens

agent-release-swarm

Agent skill for release-swarm - invoke with $agent-release-swarm.

ruvnet/ruflo · 19 tokens