Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

git-where

A Claude Code skill: git blame for why, not who.

git blame tells you who last touched a line. git-where reconstructs why the line exists — from commit, PR, issue, and doc history — cites the evidence, and rules on whether the reason still holds. It is the read-side companion to git-why, the CLI that records the why in the first place: record once with git-why, recover instantly with git-where.

This is a skill, not a CLI — a procedure the model follows. There is no where binary. Install it and Claude runs the archaeology when you ask "why is this here?" or "is this safe to delete?"

The one rule

A WHY is quoted from history, or it is "not recoverable" — never authored from plausibility. A confident, invented reason is worse than no reason: it licenses a deletion (or a keep) the evidence doesn't support. The skill's output contract forces every sentence of a recovered WHY to carry a citation, and forces NOT RECOVERABLE when history is silent.

What it does

  • Walks a line's lineage to its birth commit (git log -L), then pickaxes the token (git log -S/-G) because a value's meaning often predates the line it sits on.
  • Excavates the PR and issue thread, then sweeps docs of record (DECISIONS.md, .planning/, ADRs, CLAUDE.md) — ranked above the README.
  • Emits a fixed verdict block — WHY / EVIDENCE / STILL LIVE? / VERDICT / CONFIDENCE — where DELETE-CANDIDATE requires recovered intent and a cited "no longer live."
  • Optional receipts: for a high-stakes delete, the citations emit as machine-checkable claims a second, model-free pass can re-run.

Install

It's a personal skill — available in every repo you open:

# bash/zsh (idempotent)
mkdir -p ~/.claude/skills
rm -rf ~/.claude/skills/git-where && cp -r skills/git-where ~/.claude/skills/git-where
# PowerShell (idempotent)
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\skills" | Out-Null
if (Test-Path "$env:USERPROFILE\.claude\skills\git-where") { Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\skills\git-where" }
Copy-Item -Recurse "skills/git-where" "$env:USERPROFILE\.claude\skills\git-where"

Then, inside any repository, just ask: "why does this line exist?", "is this guard safe to remove?", "who added this and why?"

Pairs with

  • git-why — the write side. Record a WHY as a Why: commit trailer or a git note; git-where's first step reads it back before digging.

License

MIT

About

git blame for WHY, not who — a Claude Code skill that recovers the intent behind a line of code and refuses to invent one. The recover-side companion to git-why.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors