incremental-diff-ingestion

incremental-diff-ingestion is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 24 tokens per session (1,239 once invoked), scanned A, original, MIT.

A code-review method that gives an agent only the changed lines from a Git diff, plus a small amount of surrounding code. Git is a version-control system that records changes to files.

In plain words
What is it for?
Use it for pull-request reviews, recent-commit audits, security checks on changes, and release-note preparation.
Why use it?
Reading whole files can hide the important changes among large amounts of unchanged code and use unnecessary context.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument; mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it for pull-request reviews, recent-commit audits, security checks on changes, and release-note preparation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/incremental-diff-ingestion
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 alivirgo/Major-AI-Skills --skill incremental-diff-ingestion
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

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 incremental-diff-ingestion

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/incremental-diff-ingestion"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/incremental-diff-ingestion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,239 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00024 $0.01239
Opus 5 $0.00012 $0.00620
Sonnet 5 $0.00005 $0.00248
Haiku 4.5 $0.00002 $0.00124

Measured today against content hash 295391f9b634, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

incremental-diff-ingestion scanned grade A with 1 finding 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 today.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

stat_res = subprocess.run(
skills/incremental-diff-ingestion/SKILL.md · 109 lines

How it starts

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

Incremental Git Diff Ingestion (Delta-Only Code Review)

Overview

When tasked with reviewing a Pull Request, auditing recent changes, or generating release notes ("Review the latest commit for potential security regressions"), unoptimized agents dump the full contents of all modified files into the prompt context.

If a developer changed 15 lines across 8 large backend files, ingesting the full files burns 35,000+ tokens on unchanged legacy code. The model’s attention becomes diluted across thousands of lines of irrelevant code rather than focusing sharply on the modified logic.

The Incremental Git Diff Ingestion Protocol feeds strictly the Unified Diff Delta (git diff -U3), exposing the exact additions (+) and deletions (-) with 3 lines of surrounding context - reducing context consumption by 90%.


Full-File Ingestion vs. Incremental Unified Diff

┌─────────────────────────────────────────────────────────────┐
│                 Code Review Token Economics                 │
│                                                             │
│  Full File Ingestion (8 Files - 32,000 Tokens):             │
│  • Reads all 8 full files (4,000 lines of unchanged code)   │
│  • High token cost, slow turn latency (12s)                 │
│  • Review gets distracted commenting on old untouched code  │
│                                                             │
│  Incremental Unified Diff (`git diff -U3` - 450 Tokens):    │
│  diff --git a/src/auth.ts b/src/auth.ts                     │
│  @@ -42,6 +42,7 @@ export function verifyToken(token: string) │
│     const payload = jwt.verify(token, SECRET);              │
│  +  if (await isRevoked(payload.jti)) return null;          │
│     return payload;                                         │
│  ↳ 450 clean tokens (98.6% Reduction!), 100% Focus on Delta │
└─────────────────────────────────────────────────────────────┘

The Master Git Diff Commands

Use these precise CLI commands in agent execution pipelines:

Read the full file on GitHub · 109 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. today Changed · -26 tokens per session 295391f9b634
  2. 6d ago First seen · 109 lines · 50 tokens per session scan A 9382b067ed4d

Subscribe to this mod's changes

incremental-diff-ingestion is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 1,239 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.