Add git-blame-historic-context skill#4373
Conversation
07f2227 to
ff73770
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a new Claude command and detailed documentation for the 'git blame historic context' skill, which assists developers in understanding the rationale behind unusual code by tracing it back to its originating PR. The feedback focuses on improving the automation of the gh pr view command by removing unnecessary repository flags that would require manual variable substitution, allowing the CLI to infer the context automatically.
9b89fe4 to
8cb5c1d
Compare
4cc1201 to
88c64b3
Compare
|
I tried it with: services/crates/configs/src/shared.rs Lines 171 to 172 in 88c64b3 and got: I was expecting this to dig a bit deeper to be fair, but in this case, that's ok. Then I tried with: services/contracts/src/codegen.rs Lines 112 to 158 in 88c64b3 and got: Again, I'd expect it to go deeper, but since this was yet another refactor, I'll also give the benefit of the doubt. I also tried: but with lines selected and it didn't work — IMO, this should work Finally, I tried it with services/crates/autopilot/src/maintenance.rs Lines 50 to 56 in 88c64b3 and I got: Which, once again, I'd expect it to go deeper. So, my point is: this is not "historical context", this is "latest change context"; either rename the skill or make it recurse. For this case, I'd got for the first |
What this is
A standalone procedure for using
git blameto recover historic context before flagging unusual-looking code. Often, certain decisions led to sub-optimal-looking code, and those decisions are codified in git history rather than the code itself. This skill formalises the lookup + decision rubric.Ships with
/blame-context <path>:<line>, a slash command that wraps the procedure end-to-end. Use either the slash command or the procedure manually.Why split out
Extracted from #4351 because the procedure is reusable beyond PR review — order-debug sessions and ad-hoc code investigations both want the same lookup play. Splitting keeps each consumer's surface focused.
Files
docs/skills/git-blame-historic-context.md— the procedure + decision rubric..claude/commands/blame-context.md— slash command wrapping the procedure.Reviewing this in isolation
The skill body is self-contained. The "Used by" footer links to
../COW_PR_REVIEW_SKILL.md, which lands with #4351; that link will 404 until that PR merges. Nothing else here depends on #4351.How to try it
Worked sample output for both is in the skill file's Examples section.