- Home
- Skills
- Code Quality & Review
- Line History Explainer — Who Changed This and Why
More screenshots
Works with the AI Agents you already use
Line History Explainer — Who Changed This and Why
Before you change a line you did not write, find out why it is that way.
$5
Line History Explainer — Who Changed This and Why
Example session with this skill installed
Why does line 3 of config.txt look the way it does? Show me the history of lines 2-4 in the demo repository.
- Read your context and instructions
- Compiled the line history explainer
Summary
Lines 2-4 of config.txt come from 3 commits. Line 3, the timeout, was raised twice: first for slow uploads, then to 60 after the March outage.
$ python3 scripts/line_history_explainer.py blame config.txt --lines 2-4 --repo demo-repo
config.txt lines 2-4 at working tree: 3 lines from 3 commits
lines commit date author summary
2 44fc972 2026-01-05 09:00:00 +0000 Test User Add settings file
3 12a60e5 2026-03-20 11:15:00 +0000 Dev Two Raise timeout to 60 after the March outage
4 76dbc40 2026-02-10 14:00:00 +0000 Dev Two Retry failed calls three times
$ python3 scripts/line_history_explainer.py trace config.txt --lines 3 --repo demo-repo
config.txt lines 3 at HEAD: 3 commits changed them, oldest first
commit date author summary
44fc972 2026-01-05 09:00:00 +0000 Test User Add settings file
b525f13 2026-01-12 10:30:00 +0000 Dev Two Raise timeout to 30 for slow uploads
12a60e5 2026-03-20 11:15:00 +0000 Dev Two Raise timeout to 60 after the March outage
Next steps
- Run
followto see the history across the rename from settings.txt to config.txt. - Run
searchto find when a piece of text appeared or went away.
Connects securely to your tools. The creator never sees your data.
About this skill
Before you change a line you did not write, find out why it is that way. git blame often points to a rename or a reformat, and git log on a path goes quiet at a rename. Line History Explainer asks git the right questions, groups the answers, and tells you plainly when there is no history to read.
What it does
checktells you whether the file is tracked, ignored, untracked, missing or staged without a commit, and stops the other commands when there is no historyblamegroups a line range by the commit that last changed it: commit, date, author, summarytracelists every commit that changed a line range, oldest first, so the summaries read as the story of the linesearchfinds the commits that added or removed a text or a regular expression, labelledadded,removedorchangedfollowlists the history across renames with the old and the new pathwhocounts the lines each author owns nowreportputs check, blame, trace and who on one page, as text, Markdown or JSON- Author mails are hidden unless you pass
--show-mail - Exit codes for scripts: 0 done, 1 nothing found, 2 bad input, 3 not tracked, 4 git failed
Honest limits
Git records who committed a change, not who decided it; blame reads the working tree by default, so an edited line shows as Not committed yet; search sees renames only with --follow; in a shallow clone the history ends at the first commit that was fetched.
What is inside
SKILL.md, README.md, LICENSE, scripts/line_history_explainer.py, tests/test_explainer.py (50 tests, each in a throw-away repository), and examples/ with a script that builds a demo repository with a fixed history, and the saved outputs.
Requirements and safety
Python 3.9+ (tested with Python 3.9.6 and 3.10.4), git on the PATH, tested on macOS with git 2.16.3 and 2.50.1. Standard library only. The tool runs only read-only git commands (blame, log, ls-files, check-ignore, rev-parse, show), makes no network calls, needs no credentials and never commits, checks out, resets or pushes.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Only works on git-tracked files. Cannot retrieve history beyond the depth of a shallow clone. Results depend entirely on the quality of existing commit messages.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 10 days ago
- Software
Git