diff

A command that turns a Git change list, pull-request link, or pasted changes into a visual review page. A Git diff is the record of lines added, changed, or removed in a code update.

In plain words
What is it for?
Use it for reviewing pull requests, checking local changes, and explaining how a code update may affect a system.
Why use it?
It makes code changes easier to scan by showing the changed sections, possible risks, and a summary of affected architecture.

Command

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 commands/keepyaoung/artifact-organizer/diff
Clone the repo
git clone --depth 1 https://github.com/keepYaoung/artifact-organizer
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,586 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.00037 $0.01586
Opus 5 $0.00018 $0.00793
Sonnet 5 $0.00007 $0.00317
Haiku 4.5 $0.00004 $0.00159

Measured 2d ago against content hash aee80856733b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

diff 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 2d 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.

plugins/artifact-organizer/commands/diff.md · 132 lines

How it starts

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

Step 0 — theme + renderer preference (run first, every invocation)

When PREF is empty below, you MUST prompt the user for theme + renderer via AskUserQuestion BEFORE writing the preference file — theme options: notion (warm cream + Notion Blue), linear (dark-native + indigo), vercel (gallery white + Geist), stripe (weight-300 luxury + deep navy), supabase (dark-native + emerald), apple (SF + Apple Blue + true-black dark), tailwind (Inter + slate + indigo-600); renderer options: auto / canvas / page. Use the answer to set THEME and RENDERER. If the user skips or the tool is unavailable, fall back silently to notion + auto. Color mode is not a setting — every output inlines both light and dark; the toggle button + prefers-color-scheme switch them at view time.

PREF=""
for p in ./.artifact-organizer/preference.md ~/.artifact-organizer/preference.md; do
  [ -f "$p" ] && { PREF="$p"; break; }
done

if [ -z "$PREF" ]; then
  # See the instruction above — populate from AskUserQuestion or fall back.
  THEME=notion; RENDERER=auto
  mkdir -p ~/.artifact-organizer; PREF=~/.artifact-organizer/preference.md
  printf -- '---\ntheme: %s\nrenderer: %s\ncreated_at: %s\n---\n' \
    "$THEME" "$RENDERER" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$PREF"
fi

THEME=$(awk    -F': *' '/^theme:/{print $2; exit}'    "$PREF")
RENDERER=$(awk -F': *' '/^renderer:/{print $2; exit}' "$PREF")
[ -z "$THEME" ]    && THEME=notion
[ -z "$RENDERER" ] && RENDERER=auto

You are invoking Artifact Organizer's diff review. The user's input:

$ARGUMENTS

Source detection

  1. Git range (like main..HEAD, HEAD~5..HEAD, or abc123..def456) — run git diff <range> to get the unified diff.
  2. PR URL (e.g. https://github.com/owner/repo/pull/123) — use gh pr diff 123 -R owner/repo or gh api repos/owner/repo/pulls/123.diff.
  3. No args or "diff" — assume the user will paste or already has the diff in context. Ask if unclear.

Envelope structure

Read the full file on GitHub · 132 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. 2d ago First seen · 132 lines · 37 tokens per session scan A aee80856733b

Subscribe to this mod's changes

diff is a command published in the GitHub repository keepYaoung/artifact-organizer (2 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 1,586 once invoked, about $0.0002 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-31.