agentdiff-context

Instructions for using AgentDiff, a tool that records which agents changed files and why, during development and code review.

In plain words
What is it for?
Checking file history before editing, preparing pull-request summaries, reviewing agent-written code, and recording intent before a substantial commit.
Why use it?
They provide context about a change, including its intent, authoring agent, files read, and risk indicators, so reviews are easier to trace.

Skill for Claude CodeCodex

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/codeprakhar25/agentdiff/agentdiff-context
Any agent
npx skills add codeprakhar25/agentdiff --skill agentdiff-context
Clone the repo
git clone --depth 1 https://github.com/codeprakhar25/agentdiff

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 529 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.00053 $0.00529
Opus 5 $0.00026 $0.00264
Sonnet 5 $0.00011 $0.00106
Haiku 4.5 $0.00005 $0.00053

Measured yesterday against content hash 69188d306cc5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agentdiff-context 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 yesterday.

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.

templates/skills/agentdiff-context/SKILL.md · 75 lines

How it starts

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

AgentDiff Context

When To Use

Use this skill when working in a repository that has AgentDiff initialized and the task involves:

  • editing an existing file that may have AI attribution
  • reviewing a PR or writing a PR summary
  • explaining why a file or line range changed
  • recording agent intent before a commit
  • deciding which files deserve review attention first

Workflow

  1. Before editing a known file, check its trace context:
agentdiff context path/to/file --json
  1. For PR review or summary work, inspect structured report context:
agentdiff report --format json --context
agentdiff report --format markdown --context
  1. Use the context to answer:
  • What intent produced this change?
  • Which agent/model touched it?
  • Which files were read to make the change?
  • Which trace IDs explain the relevant file/ranges?
  • Are there flags like security, refactor, or risky?
  1. Before committing substantial agent work, record context through AgentDiff MCP when available. Include concise values:
{
  "prompt": "short user request or task summary",
  "model_id": "model name",
  "agent": "cursor",
  "files_read": ["src/api.rs", "src/config.rs"],
  "intent": "security hardening",
  "trust": 80,
  "flags": ["security"]
}

Rules

  • Do not paste full prompts into commit messages or PR summaries. Use AgentDiff's stored prompt excerpt/hash.
  • Keep intent short and review-useful, for example security hardening, bug fix, test coverage, or refactor.
  • If agentdiff context returns no traces, say so and continue with normal code reading.
  • Do not treat AgentDiff attribution as proof of correctness. It is context for review, not validation.
  • If context conflicts with code reality, trust the code and mention the mismatch.

Output Guidance

When summarizing AgentDiff context to a user, prefer this shape:

AgentDiff context for `path/to/file`:
- Last traced intent: ...
- Agent/model: ...
- Relevant ranges: ...
- Files read: ...
- Review note: ...

Read the full file on GitHub · 75 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. yesterday First seen · 75 lines · 53 tokens per session scan A 69188d306cc5

Subscribe to this mod's changes

agentdiff-context is a skill published in the GitHub repository codeprakhar25/agentdiff (43 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 53 tokens to every session and 529 once invoked, about $0.0003 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

unity-mcp-orchestrator

Orchestrate Unity Editor via MCP (Model Context Protocol) tools and resources. Use when working with Unity projects through MCP for Unity - creating/modifying GameObjects, editing scripts, managing scenes, running tests, or any Unity Editor automation. Provides best practices, tool schemas, and workflow patterns for…

CoplayDev/unity-mcp · 72 tokens

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens

signing-entitlements

Inspect signing, entitlements, hardened runtime, and Gatekeeper issues for macOS apps. Use when asked to diagnose code signing failures, missing entitlements, sandbox problems, notarization prerequisites, or trust-policy launch errors.

robinebers/openusage · 49 tokens

macos-swiftpm

Build, run, and test SwiftPM macOS packages and executables. Use when the repo is package-first or has no Xcode project.

robinebers/openusage · 35 tokens

macos-test-triage

Triage macOS tests across Xcode and SwiftPM. Use when narrowing failures, explaining assertions or crashes, or separating setup from regressions.

robinebers/openusage · 36 tokens

fix-codesign-error

Slash command that inspects a macOS signing or entitlement failure and explains the minimum fix path. Invoke explicitly with /fix-codesign-error — this skill never self-triggers.

robinebers/openusage · 42 tokens