diff-files

A file-comparison helper that shows how two files, or selected line ranges, differ.

In plain words
What is it for?
Use it to compare old and new versions, review changes between source files, and understand what changed in specific parts of a file.
Why use it?
It removes the need to inspect files manually to find additions, deletions, and changed code. If the files or ranges are unclear, it asks which ones to compare.

Skill for Claude CodeCodex

Part of the grepika plugin — 9 skills, 3 commands, 2 agents shipped together

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/adamthewilliam/grepika/diff-files
Any agent
npx skills add adamthewilliam/grepika --skill diff-files
Clone the repo
git clone --depth 1 https://github.com/adamthewilliam/grepika

Made for: Claude Code, Codex.

Or install grepika, the plugin that ships this one along with the rest of its 9 skills, 3 commands, 2 agents.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 815 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.00048 $0.00815
Opus 5 $0.00024 $0.00407
Sonnet 5 $0.00010 $0.00163
Haiku 4.5 $0.00005 $0.00081

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

Security

Grade A, and why

diff-files 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 3d 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/grepika/skills/diff-files/SKILL.md · 116 lines

How it starts

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

File Comparison Skill

You are a file comparison specialist. Compare two files and explain the differences clearly.

Input

Files to compare: $ARGUMENTS

Expected formats:

  • file1.ts file2.ts - Compare two different files
  • file1.ts:10-50 file2.ts:10-50 - Compare specific line ranges
  • src/old.ts src/new.ts - Full paths work too

If no files provided or format unclear, ask the user which files they want to compare.

Pre-check

If any tool returns "No active workspace", call mcp__grepika__add_workspace with the project root first, then retry the tool.

Comparison Workflow

  1. Parse the input

    • Extract file paths from arguments
    • Identify any line range specifications
    • Handle both relative and absolute paths
  2. Get file outlines first (optional, for large files)

    • Use mcp__grepika__outline to understand each file's structure
    • Identify key sections to focus the comparison
  3. Run the diff

    • Use mcp__grepika__diff with the two file paths
    • The tool returns a unified diff format
  4. Analyze the differences

    • Categorize changes: additions, deletions, modifications
    • Identify the nature of changes: refactoring, bug fixes, feature additions
    • Note any structural changes (renamed functions, moved code)
  5. Get context if needed

    • Use mcp__grepika__get to read surrounding code for complex changes
    • Understand the purpose of each change

Output Format

## File Comparison

### Files Compared
- **File A**: [path] ([line count] lines)
- **File B**: [path] ([line count] lines)

### Summary
[1-2 sentence overview of what changed and why]

### Change Statistics
| Type | Count |
|------|-------|
| Lines added | [count] |
| Lines removed | [count] |
| Lines modified | [count] |

### Detailed Changes

#### [Change Category 1] (e.g., "Function Signature Changes")
| Location | Change | Impact |
|----------|--------|--------|
| [line] | [what changed] | [what this affects] |

#### [Change Category 2] (e.g., "New Logic Added")
[description of changes]

### Semantic Analysis
- **Type of change**: [refactor / bugfix / feature / breaking change]
- **Risk level**: [low / medium / high]
- **Backward compatible**: [yes / no / partial]

### Notable Observations
- [anything unusual or worth highlighting]
- [patterns in the changes]

Read the full file on GitHub · 116 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. 3d ago First seen · 116 lines · 48 tokens per session scan A 90ab1c3526d5

Subscribe to this mod's changes

diff-files is a skill published in the GitHub repository adamthewilliam/grepika (134 stars, last pushed 21d ago), licensed MIT. It adds 48 tokens to every session and 815 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-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens