Input: Who changed this line of code?
Action: git blame -> find commit -> trace PR -> output report
Input: When was this bug introduced?
Action: git log -p -S -> locate introduction point -> analyze cause -> output report
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: sd0xdev-sd0x-dev-flow-git-investigate3description: Git Investigate Skill4---56# Git Investigate Skill78## Trigger910- Keywords: code history, git blame, track changes, who wrote this, when was it changed, root cause, code archaeology1112## When NOT to Use1314- Code review (use codex-review)15- Feature development (use feature-dev)16- Just want to read code (use Read directly)1718## Command1920```bash21/git-investigate src/service/xxx.ts:123 # Specific line22/git-investigate processToken # Function name23/git-investigate "error message" # Keyword24```2526## Workflow2728```29Locate code -> git blame -> find commit -> trace history -> analyze changes -> report30```3132## Investigation Framework3334| Question | Method |35| ------------------ | ----------------------------- |36| Who wrote it? | `git blame` |37| When was it changed?| `git log --follow` |38| Why was it changed?| commit message + PR |39| What was missed? | `git diff` compare original vs problematic version |4041## Common Patterns4243| Pattern | Symptom | Root Cause |44| ------------------ | -------------------- | ----------------------------- |45| Type removed | Enum value deleted | Assumed no longer needed |46| Condition simplified| If conditions reduced| Missed during refactoring |47| Rename | Partially unchanged | Incomplete search-and-replace |48| Boundary ignored | Only handles main flow| Edge cases not considered |4950## Output5152```markdown53## Git Investigation Report54- **Target**: <file/feature>55- **Timeline**: <commit range>56- **Root cause**: <analysis>57- **Introduced by**: <commit hash + author>58```5960## Verification6162- Report includes: investigation target, author info, timeline, original vs problematic code63- Root cause has clear analysis64- Fix recommendation is specific and actionable6566## References6768- `references/commands.md` - Git command reference + report template6970## Examples7172```73Input: Who changed this line of code?74Action: git blame -> find commit -> trace PR -> output report75```7677```78Input: When was this bug introduced?79Action: git log -p -S -> locate introduction point -> analyze cause -> output report80```8182---83> Converted and distributed by [TomeVault](https://tomevault.io/claim/sd0xdev) — claim your Tome and manage your conversions.84<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx skillmds@latest add tomevault-io/sd0xdev-sd0x-dev-flow-git-investigate in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Git Investigate Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.