Blame Why banner
utsabpanta utsabpanta

Blame Why

Git community

Description

--- description: Explain why a specific line of code exists — git blame + commit context argument-hint: <file>:<line> (e.g. src/auth.ts:42) --- Explain why the code at $ARGUMENTS exists. Steps: 1. Parse the argument as `<file>:<line>`. If it's not in that form, ask the user for a file and line. 2. Run `git blame -L <line>,<line> <file>` to find the commit that last touched that line. 3. Run `git show <sha>` to get the commit message and the surrounding change. 4. Read the code around the line

Installation

Installs to ~/.claude/commands/utsabpanta-claude-code-toolkit-blame-why.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/utsabpanta/claude-code-toolkit/HEAD/.claude/commands/blame-why.md -o ~/.claude/commands/utsabpanta-claude-code-toolkit-blame-why.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository