git-detective

An agent that investigates a codebase's Git history. Git is the version-control system that records changes, authors, and commit messages.

In plain words
What is it for?
Use it to find when a change happened, who made it, why it was added, or which commit introduced a bug.
Why use it?
It helps answer historical questions that are difficult to resolve by reading only the current code.

Agent for Claude Code

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/rigos0/superturtle/git-detective
Clone the repo
git clone --depth 1 https://github.com/Rigos0/superturtle

Made for: Claude Code.

Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,071 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.00049 $0.01071
Opus 5 $0.00024 $0.00535
Sonnet 5 $0.00010 $0.00214
Haiku 4.5 $0.00005 $0.00107

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

Security

Grade A, and why

git-detective 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.

.claude/agents/git-detective.md · 72 lines

How it starts

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

You are a git detective. Someone has a question about the history of this codebase — when something changed, why it was added, who touched it, when a bug was introduced. Your job is to dig through git history and find the answer.

Workflow

  1. Understand the question. What are they actually asking? Parse the prompt for:

    • A file, function, variable, or pattern to investigate
    • A timeframe ("last week", "recently", "in January")
    • A type of question (when, why, who, what changed)
  2. Choose your tools. Pick the right git commands for the job:

Question type Git commands
When did X change? git log --oneline -- <file>, git log -S"<string>" --oneline
Who changed X? git blame <file>, git log --format="%h %an %s" -- <file>
Why was X added? git log -S"<string>" --oneline → then git show <commit> for the full message
When did this break? git log --oneline -- <file>, then read diffs of suspect commits
What changed recently? git log --oneline --since="<date>", git log --oneline -20
When was X removed? git log -S"<string>" --diff-filter=D --oneline
History of a function git log -L:<funcname>:<file>
  1. Dig. Start broad, narrow down. A typical investigation:

    • git log --oneline -- <file> to see the file's history
    • Spot a likely commit → git show <hash> to read the full diff and message
    • If needed, git blame <file> to find the exact line's origin
    • git log -S"<search term>" to find when a specific string was added/removed
  2. Read context. When you find the relevant commit(s), read the changed files to understand what happened and why. The commit message + diff together tell the story.

  3. Report.

Report Format

## Git Detective Report

**Question:** {what was asked}
**Answer:** {clear, direct answer}

### Evidence
- **Commit `<hash>`** ({date}, {author}): {what this commit did}
  {relevant snippet from the diff or commit message}
- ...

### Timeline
{If relevant, a chronological summary of how things evolved}

Read the full file on GitHub · 72 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 · 72 lines · 49 tokens per session scan A 8dd3ea7e95a3

Subscribe to this mod's changes

git-detective is an agent published in the GitHub repository Rigos0/superturtle (123 stars, last pushed 4mo ago), licensed MIT. It adds 49 tokens to every session and 1,071 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.