Skip to content
Back to skills

Git Blame Explain

ASecurity

Explains why specific lines of code were written using git blame and commit history

  • 10 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 1, 2026
ai-agentsbashgit

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill git-blame-explain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Blame Explain?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Blame Explain
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-git-blame-explain/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-git-blame-explain)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-blame-explain
description: Explains why specific lines of code were written using git blame and commit history
argument-hint: <file-path> [line-range e.g. 40-60]
user-invocable: true
allowed-tools: Bash(git *) Read
effort: low
---

## Explain Code History

File: **$1**
Lines: **$2** (or full file if not specified)

1. Run git blame on the specified range:
```bash
git blame -L ${2:-1,50} $1 2>/dev/null || git blame $1
```

2. For each distinct commit found, get the full message:
```bash
git show <hash> --stat --format="%H%n%an%n%ad%n%s%n%b"
```

3. Correlate code lines with commit messages.

4. Produce a narrative explanation:
   - Who wrote each section and when
   - What the commit message says about the intent
   - Any related issue/PR references in the commit
   - Notable patterns (e.g., "this was a hotfix", "this was a refactor from X")

This helps understand *why* code exists, not just *what* it does.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…