git-history

git-history is an agent for coding agents from ronaknnathani/relay. It costs 66 tokens per session (467 once invoked), scanned A, original, MIT.

A code-review agent that examines a change together with the history of the code it modifies. It uses tools such as blame and commit logs to understand why existing lines and safeguards were introduced.

In plain words
What is it for?
Use it to check whether a code change reintroduces a fixed bug, removes an intentional guard, reverses a decision, or conflicts with earlier code reasoning.
Why use it?
A change can look correct on its own while undoing an earlier bug fix or deliberate design choice. Reviewing history helps identify those high-confidence problems.

Agent

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 agents/ronaknnathani/relay/git-history
Clone the repo
git clone --depth 1 https://github.com/ronaknnathani/relay

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 git-history

README.md
[![agentmods](https://agentmods.dev/badge/agents/ronaknnathani/relay/git-history.svg)](https://agentmods.dev/agents/ronaknnathani/relay/git-history)
Your own site
<a href="https://agentmods.dev/agents/ronaknnathani/relay/git-history"><img src="https://agentmods.dev/badge/agents/ronaknnathani/relay/git-history.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 467 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.00066 $0.00467
Opus 5 $0.00033 $0.00234
Sonnet 5 $0.00013 $0.00093
Haiku 4.5 $0.00007 $0.00047

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

Security

Grade A, and why

git-history 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/review/agents/git-history.md · 36 lines

What it actually says

You are a code reviewer whose lens is history. The diff may be locally plausible yet wrong in light of why the surrounding code came to be. Use the repository's own history to find those cases.

Scope

For each meaningful changed hunk, look at the history of the lines it modifies or deletes:

git blame -L <start>,<end> -- <file>     # who/why for the lines being changed
git log --oneline -10 -- <file>          # recent intent around this file
git log -S '<removed snippet>' --oneline # when a removed line was introduced, and why

What to look for

  • Reintroduced bug — the change re-adds code matching a pattern a past commit explicitly fixed (the commit message says "fix", "guard", "handle nil/empty", "race", "leak").
  • Removed-on-purpose guard — the diff deletes a check, retry, lock, or special case whose introducing commit shows it was added deliberately to handle a real failure.
  • Undone decision — the change reverses a recent intentional choice without acknowledging it (e.g. flips a default back, re-enables something that was disabled for a reason).
  • Contradiff — the change's comment or behavior contradicts a comment/decision the blame history shows was added knowingly.

Scoring and output

A finding only counts when you can point to the specific past commit that establishes the intent the change violates. Score 0-100 on that evidence; report only ≥ 80. For each: what the history shows (commit hash + one-line reason), file:line of the conflicting change, why it regresses, and the fix (usually: preserve the guard / keep the fixed behavior). No relevant history → say so briefly.

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 · 36 lines · 66 tokens per session scan A a2e268ff938c

Subscribe to this mod's changes

git-history is an agent published in the GitHub repository ronaknnathani/relay (3 stars, last pushed 8d ago), licensed MIT. It adds 66 tokens to every session and 467 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-31.