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.
npx agentmods add skills/veelenga/preview-skills/preview-diffnpx skills add veelenga/preview-skills --skill preview-diffgit clone --depth 1 https://github.com/veelenga/preview-skillsWrote 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.
[](https://agentmods.dev/skills/veelenga/preview-skills/preview-diff)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00016 | $0.00407 |
| Opus 5 | $0.00008 | $0.00204 |
| Sonnet 5 | $0.00003 | $0.00081 |
| Haiku 4.5 | $0.00002 | $0.00041 |
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 4d 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.
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
What ships with it
10 files 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.
- config.sh 953 B runs code
- lib/browser-utils.sh 9.5 KB runs code
- lib/content-utils.sh 6.7 KB runs code
- lib/html-generator.sh 14 KB runs code
- run.sh 7.5 KB runs code
- templates/scripts/common-ui.js 5.1 KB runs code
- templates/scripts/diff-renderer.js 17 KB runs code
- templates/scripts/utils.js 1.8 KB runs code
- templates/styles/common.css 1.6 KB
- templates/styles/layout.css 14 KB
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.
- 4d ago First seen · 60 lines · 16 tokens per session scan A 1d091839f271
preview-diff is a skill published in the GitHub repository veelenga/preview-skills (8 stars, last pushed 24d ago), licensed MIT. It adds 16 tokens to every session and 407 once invoked, about $0.0001 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.
Other skills, from other repositories
experts
Assemble a panel of experts to assess a problem from multiple professional perspectives, surface agreement and disagreement, and deliver a chaired recommendation with clear tradeoffs. Use when the user wants multi-expert judgment, a second opinion, design critique, option comparison, or a recommendation backed by…
create-plan
Create and maintain repository-aware technical plans, implementation plans, refactor proposals, design drafts, and migration plans. Use when Codex is asked to investigate a codebase and propose a solution before implementation; write or update a durable plan file; produce a 方案、实施计划或重构计划; split engineering work into…
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.
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…
google-fonts-curator
Recommend high-taste Google Fonts for websites based on brand tone, page type, and visual direction. Use when the user needs font selection, font pairing, or aesthetic judgment within the Google Fonts ecosystem for landing pages, brand sites, editorial pages, portfolios, or digital products.
programmer-motivator
Give calm, technically grounded encouragement to programmers when the user is stuck on a bug, frustrated by debugging, tired, discouraged, blaming themselves after a mistake, asking for motivation or emotional support while coding, wanting someone to stay with them through a hard problem, celebrating a breakthrough…