preview-diff

preview-diff is a skill for Claude Code from veelenga/preview-skills. It costs 16 tokens per session (407 once invoked), scanned A, original, MIT.

A tool for viewing Git changes in a readable web-style layout. Git is the version-control system that records edits to files.

In plain words
What is it for?
Use it to preview changes in the current project or compare branches before reviewing or committing code. It also shows tracked, staged, and untracked files.
Why use it?
It makes it easier to inspect what changed without reading raw diff text. You can find files, compare versions side by side or line by line, and see added and removed lines.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to preview changes in the current project or compare branches before reviewing or committing code. It also shows tracked, staged, and untracked files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/veelenga/preview-skills/preview-diff
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.

Any agent
npx skills add veelenga/preview-skills --skill preview-diff
Clone the repo
git clone --depth 1 https://github.com/veelenga/preview-skills

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 preview-diff

README.md
[![agentmods](https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-diff/github.svg)](https://agentmods.dev/skills/veelenga/preview-skills/preview-diff)
Your own site
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-diff"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-diff/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 preview-diff

Your own site · 80×15
<a href="https://agentmods.dev/skills/veelenga/preview-skills/preview-diff"><img src="https://agentmods.dev/badge/skills/veelenga/preview-skills/preview-diff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 407 The whole file, excluding the scripts and references it only reads on demand.
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.00016 $0.00407
Opus 5.5 $0.00006 $0.00163
Sonnet 5.5 $0.00003 $0.00081
Haiku 4.5 $0.00002 $0.00041

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

Security

Grade A, and why

preview-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 1mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (config.sh, lib/browser-utils.sh, lib/content-utils.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.

skills/preview-diff/SKILL.md · 60 lines

What it actually says

Git Diff Preview Tool

Internal tool for previewing git changes with GitHub-style formatting. Accessed via /preview-diff command.

Features

Visual Design

  • Beautiful gradient header with clear stats summary
  • GitHub-style formatting using diff2html library
  • Modern UI with rounded corners and smooth transitions
  • Enhanced readability with optimized fonts and spacing

Functionality

  • Accordion-style files: Click headers to expand/collapse
  • Smart defaults: First file expanded, others collapsed
  • Expand/Collapse All button for quick control
  • Real-time search: Filter files by name
  • View switching: Toggle between unified and split view
  • Unified view (default): Traditional line-by-line diff
  • Split view: Side-by-side comparison
  • Change statistics: Files changed, additions, deletions
  • Line numbers and syntax highlighting
  • View persistence across sessions
  • Shows all changes: tracked, staged, and untracked files

Agent Usage

When the user asks to preview a diff, DO NOT build HTML manually. Use the Bash tool to execute this skill's run.sh script:

# Preview current changes
git diff HEAD | ./run.sh

# Preview specific branch comparison
git diff main..feature-branch | ./run.sh

The script handles all HTML generation and automatically opens the result in the browser. Do NOT open the file manually to avoid duplicate tabs.

Options

The script works with sensible defaults but supports these flags for flexibility:

  • -o, --output PATH - Custom output path
  • --no-browser - Skip browser, output file path only

Technology

  • diff2html: GitHub-style diff rendering
  • git diff: Unified diff format
  • JavaScript/CSS: Browser-based rendering
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. 1mo ago First seen · 60 lines · 16 tokens per session scan A 1d091839f271

Subscribe to this mod's changes

preview-diff is a skill published in the GitHub repository veelenga/preview-skills (9 stars, last pushed 5d ago), licensed MIT. It adds 16 tokens to every session and 407 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

github-renovate-prs

Inspect, triage, approve, and merge GitHub Renovate pull requests with gh. When no repository is provided, use the default preset repository set, build a candidate execution plan, and execute only after explicit user confirmation. Use when the user asks to check, batch-handle, approve, or merge Renovate PRs.

flc1125/skills · 73 tokens

github-create-pr

Create GitHub pull requests from a local branch using a reviewable workflow for branch checks, diff analysis, PR title/body writing, and gh CLI creation. Use when opening a PR, drafting or improving a PR description, preparing a branch for review, or adding reviewers on GitHub.

flc1125/skills · 61 tokens

github-release-notes-writer

Draft or update user-focused GitHub Release Notes from verified tags, commits, pull requests, existing releases, and supplied changelog baselines. Use when preparing prerelease or stable release notes, turning GitHub's generated What's Changed list into a curated narrative, documenting upgrades or breaking changes, or…

flc1125/skills · 84 tokens

github-release-pr-writer

Draft or update GitHub release pull request descriptions from verified tags, commits, merged pull requests, and the release diff. Use when a PR prepares a version, aligns release metadata, promotes a prerelease, or needs a reviewer-focused release summary, exact change inventory, breaking-change section, or migration…

flc1125/skills · 80 tokens

gitlab-create-mr

Create GitLab merge requests from a local branch using a reviewable workflow for branch checks, GitLab host detection, diff analysis, title and description writing, and glab mr create. Use when opening a GitLab merge request, drafting or improving merge request copy, preparing a branch for review, or working across…

flc1125/skills · 79 tokens

glab-cli

GitLab CLI (glab) reference and workflow for repository, merge request, issue, CI/CD, release, and API operations across GitLab.com and self-managed or dedicated instances. Use when Codex needs to run or explain glab commands, usually by relying on the current glab context first, and only falling back to git remote -v…

flc1125/skills · 95 tokens