git-blame
Show line-by-line authorship information for a file. Returns the commit hash, author, and date for each line.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Git Blame Skill
This skill shows line-by-line authorship information for a file, revealing who last modified each line and when.
Usage
The git-blame skill analyzes a file and returns authorship information for each line, with optional line range filtering.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| path | string | Yes | - | File path to blame |
| start_line | int | No | 1 | Starting line number (1-indexed) |
| end_line | int | No | - | Ending line number (inclusive) |
Example Usage
Blame an entire file:
Show blame for /src/main.go
Blame specific lines:
Show blame for lines 10-20 of /src/auth.go
Result Format
The blame result includes:
For each line:
- Line number (1-indexed)
- Commit hash that last modified this line
- Author name
- Author email
- Timestamp of the modification
- Line content
Summary statistics:
- Unique authors count
- Unique commits count
Line Information Fields
| Field | Description |
|---|---|
| line_number | 1-indexed line number |
| commit_hash | Hash of commit that last changed this line |
| author | Name of the author |
| author_email | Author's email address |
| author_time | When the line was last modified |
| content | The actual line content |
Use Cases
- Find code ownership: Identify who wrote specific code
- Track bug origins: Find when a problematic line was introduced
- Review history: Understand how code evolved
- Contact experts: Find who to ask about specific code
- Code review: See recent changes in context
Best Practices
- Use line ranges for large files to focus on relevant sections
- Cross-reference commit hashes with git-log for full context
- Check unique authors to understand code ownership patterns
- Use for debugging to find when issues were introduced
- Combine with git-log to trace the full history of changes
Interpreting Results
- Multiple unique commits suggests the code evolved over time
- Single commit for all lines indicates recently added code
- Single author suggests concentrated ownership
- Many authors suggests collaborative development
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!