diff-analysis

diff-analysis is a skill for Claude Code, Codex from shennawardana23/skillme. It costs 84 tokens per session (1,157 once invoked), scanned A, original, Apache-2.0.

A structured review of only the code changed in a Git diff or pull request. It checks complexity, coding conventions, and security impact together, then produces one risk report with actions tied to file locations.

In plain words
What is it for?
Use it to assess new branches, pull requests, or raw diffs before merging, such as checking removed safeguards, error handling, dependencies, tests, and security concerns.
Why use it?
It helps identify merge risks without spending time reviewing unchanged code, including changes that affect several kinds of risk at once.

Skill for Claude CodeCodex

Part of the skillme plugin — 137 skills, 2 commands 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/shennawardana23/skillme/diff-analysis
Any agent
npx skills add shennawardana23/skillme --skill diff-analysis
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code, Codex.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/diff-analysis.svg)](https://agentmods.dev/skills/shennawardana23/skillme/diff-analysis)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/diff-analysis"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/diff-analysis.svg" alt="Measured on agentmods" height="20"></a>
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,157 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.1 $0.00084 $0.01157
Opus 5 $0.00042 $0.00579
Sonnet 5 $0.00017 $0.00231
Haiku 4.5 $0.00008 $0.00116

Measured 5d ago against content hash 4e6bc5622e5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

diff-analysis 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 5d 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.

skills/diff-analysis/SKILL.md · 79 lines

How it starts

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

Diff Analysis

A diff-shaped review: it only looks at what changed, not the whole file, and produces one risk verdict. Run all three tracks over the same diff, then synthesize — don't review them one after another as separate passes, since a single line often matters to more than one track (a deleted nil-check is both a Track A complexity signal and a Track C security signal).

Track A: complexity

For each changed file:

  1. Cyclomatic complexity change — did the diff add nested conditionals, new loops, new goroutines?
  2. Function length — is any new or modified function longer than ~40 lines?
  3. Removed safety guards — were any validation checks, nil-checks, or early-returns deleted?
  4. New external dependencies — does the diff add new imports? Are they necessary, or does an existing dependency already cover this?

Track B: style and convention

  1. Naming — do new identifiers follow the language's naming convention?
  2. Error handling — are new errors returned/wrapped properly? Any new _ = suppressions?
  3. Documentation — are new exported symbols documented?
  4. Test additions — does the diff include tests for the new behavior?
  5. Dead code — does the diff add unreachable code or unused variables?

Track C: security impact

  1. Removed auth checks — did the diff delete or comment out authentication/authorization code?
  2. New SQL/command strings — does the diff introduce a new string-built query or shell command?
  3. Weakened validation — did any input validation become less strict (a must check turned into a warning, a bound loosened)?
  4. New exposed endpoints — are new routes/handlers added without the same security middleware as their neighbors?
  5. Dependency updates — if a lockfile/go.mod changed, are the new or updated dependencies from a trusted source with no known critical CVEs?

Synthesis

## Risk Level: LOW | MEDIUM | HIGH | CRITICAL

### Risk justification
<One paragraph explaining the overall rating, referencing which track(s) drove it>

## Key Changes
- <What the diff actually does, in plain language>

## Required Actions (must complete before merge)
1. <Specific action with file:line reference>

## Recommended Improvements (should do)
1. ...

## Nice-to-have
1. ...

## Merge verdict: APPROVE | REQUEST_CHANGES | BLOCK

Read the full file on GitHub · 79 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. 5d ago First seen · 79 lines · 84 tokens per session scan A 4e6bc5622e5f

Subscribe to this mod's changes

diff-analysis is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 8d ago), licensed Apache-2.0. It adds 84 tokens to every session and 1,157 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-31.