git-investigate

git-investigate is a skill for Claude Code from sd0xdev/sd0x-harness. It costs 53 tokens per session (547 once invoked), scanned A, original, MIT.

A Git-history investigation workflow for tracing code changes, finding when a bug was introduced, and identifying its likely root cause.

In plain words
What is it for?
Use it to inspect a line or function with blame, follow its changes over time, and explain what a relevant commit changed or missed.
Why use it?
It replaces guesswork with evidence from commit history, authorship records, and differences between versions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Codex.

Part of the sd0x-dev-flow plugin — 98 skills, 16 agents, 5 hooks 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/sd0xdev/sd0x-harness/git-investigate
Any agent
npx skills add sd0xdev/sd0x-harness --skill git-investigate
Clone the repo
git clone --depth 1 https://github.com/sd0xdev/sd0x-harness

Made for: Claude Code.

Or install sd0x-dev-flow, the plugin that ships this one along with the rest of its 98 skills, 16 agents, 5 hooks.

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-investigate

README.md
[![agentmods](https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/git-investigate.svg)](https://agentmods.dev/skills/sd0xdev/sd0x-harness/git-investigate)
Your own site
<a href="https://agentmods.dev/skills/sd0xdev/sd0x-harness/git-investigate"><img src="https://agentmods.dev/badge/skills/sd0xdev/sd0x-harness/git-investigate.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 547 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.00053 $0.00547
Opus 5 $0.00026 $0.00273
Sonnet 5 $0.00011 $0.00109
Haiku 4.5 $0.00005 $0.00055

Measured 2d ago against content hash c6c7bea9d22e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

git-investigate 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 2d 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/git-investigate/SKILL.md · 82 lines

How it starts

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

Git Investigate Skill

Trigger

  • Keywords: code history, git blame, track changes, who wrote this, when was it changed, root cause, code archaeology

When NOT to Use

  • Code review (use codex-review)
  • Feature development (use feature-dev)
  • Just want to read code (use Read directly)

Command

/git-investigate src/service/xxx.ts:123      # Specific line
/git-investigate processToken                 # Function name
/git-investigate "error message"              # Keyword

Workflow

Locate code -> git blame -> find commit -> trace history -> analyze changes -> report

Investigation Framework

Question Method
Who wrote it? git blame
When was it changed? git log --follow
Why was it changed? commit message + PR
What was missed? git diff compare original vs problematic version

Common Patterns

Pattern Symptom Root Cause
Type removed Enum value deleted Assumed no longer needed
Condition simplified If conditions reduced Missed during refactoring
Rename Partially unchanged Incomplete search-and-replace
Boundary ignored Only handles main flow Edge cases not considered

Output

## Git Investigation Report
- **Target**: <file/feature>
- **Timeline**: <commit range>
- **Root cause**: <analysis>
- **Introduced by**: <commit hash + author>

Verification

  • Report includes: investigation target, author info, timeline, original vs problematic code
  • Root cause has clear analysis
  • Fix recommendation is specific and actionable

References

  • references/commands.md - Git command reference + report template

Examples

Input: Who changed this line of code?
Action: git blame -> find commit -> trace PR -> output report

Read the full file on GitHub · 82 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. 2d ago First seen · 82 lines · 53 tokens per session scan A c6c7bea9d22e

Subscribe to this mod's changes

git-investigate is a skill published in the GitHub repository sd0xdev/sd0x-harness (188 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 547 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-09-03.