trace-change-why

Traces the rationale behind code changes from session transcripts and git history.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/psw7205/skills --skill trace-change-why-psw7205
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: trace-change-why
Source: https://github.com/psw7205/skills/tree/main/skills/trace-change-why
Command: npx skills add https://github.com/psw7205/skills --skill trace-change-why-psw7205

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When reviewing code, you often see what changed but not why. This Skill reconstructs the intent behind a change—its trigger, reasoning, and decision context—by searching Claude session transcripts, git blame, and commit history, so you stop guessing at the motivation behind unfamiliar diffs. ## Core Features & Use Cases - Transcript-Based Intent Recovery: Searches Claude session transcripts for the Edit/Write calls that produced a change, then reads the surrounding user/assistant messages to recover the original request and reasoning. - Git History Fallback: When no session is found, falls back to git log, git blame, and code-context inference, explicitly labeling conclusions as verified facts versus inference. - Read-Only Investigation: Operates strictly as an analysis tool with no file modifications, and uses a helper script that handles session directory path encoding, multi-session matches, and large transcript files. - Use Case: You open a diff and wonder why a batch loader replaced eager loading. Ask why the change was made, and the Skill locates the session where the change happened, quotes the original request, and explains the design decision. ## Quick Start Ask why a specific file or line was changed, for example by saying "why was this function changed in src/api/loader.ts?"

Frequently Asked Questions about trace-change-why

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find out why a line of code was changed?▼

Point to the file or line and ask why it changed. The Skill searches Claude session transcripts for the Edit or Write call that made the change, then reads the surrounding conversation to recover the original request and reasoning.

How to trace code change intent from Claude session transcripts?▼

The included find-session.sh script searches Claude transcript directories for the target filename, prints matching sessions with tool-call and context lines, and the Skill then reads the user and assistant messages around those matches.

What happens if no session transcript exists for a change?▼

The Skill falls back to git log, git blame, and code-context analysis to infer a plausible reason. Any conclusion not directly confirmed by a transcript or commit message is explicitly labeled as inference rather than fact.

Does this tool modify my code while investigating?▼

No. The Skill is strictly read-only and forbids Edit and Write tool usage during investigation. It only reports findings, and any actual code modification requires a separate explicit request.

Why does git blame show the wrong commit after a rebase?▼

Rebase and squash operations rewrite history, so blame loses the original commit. The Skill compensates using git blame with -C -C flags to track moved code and git log -p --follow to trace changes across history rewrites.