what-happened

Traces the latest change to a code block using git blame and Entire checkpoint lookups.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/squidllee/skills --skill what-happened-squidllee
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: what-happened
Source: https://github.com/squidllee/skills/tree/main/what-happened
Command: npx skills add https://github.com/squidllee/skills --skill what-happened-squidllee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When you encounter a confusing block of code, it is hard to know why it was written that way. This Skill answers provenance questions by tracing the most recent change to a specific file line, range, or pasted snippet through git blame and Entire checkpoint transcripts, then summarizing why the change was made. ## Core Features & Use Cases - Precise Target Resolution: Accepts path:line, path:start-end, or a file path plus a pasted snippet, resolving exact line numbers before running any provenance commands. - Deduplicated Provenance Lookup: Groups blame blocks by unique commit and checkpoint, running entire checkpoint explain once per unique commit or checkpoint to avoid redundant lookups. - Explicit State Reporting: Distinguishes missing checkpoints, unavailable checkpoints, failed transcript lookups, uncommitted changes, and untracked files, with labeled fallback explanations of current code behavior when checkpoint context is unavailable. - Use Case: You see an odd conditional in cli/explain.go:103-107 and ask "why is this like this". The Skill blames the range, finds the commit, pulls the checkpoint transcript, and explains the bug or constraint that caused the change. ## Quick Start Ask the assistant to explain why the code at a specific file and line range looks the way it does, for example by saying "what happened at cmd/entire/cli/explain.go:103-107".

Frequently Asked Questions about what-happened

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

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

Provide a file path with a line or range, such as path/to/file.go:103-107, and the Skill runs git blame on that range, then uses entire checkpoint explain to summarize why the most recent change was made.

How do I trace the history of a pasted code snippet?▼

Paste the snippet along with its file path. The Skill searches the file with fixed-string grep matching to locate the exact lines, converts the match to a line range, and then runs blame and checkpoint lookups on that range.

What happens if a commit has no Entire checkpoint?▼

The Skill reports that no checkpoint was referenced and falls back to explaining what the current code does, clearly labeling the explanation as not checkpoint-backed rather than implying historical intent.

Can git blame explain uncommitted or untracked code changes?▼

No. Uncommitted pseudo-commits and untracked files have no committed history, so the Skill marks those ranges accordingly and provides only a current-code behavior explanation without running checkpoint lookups.

When should I use the explain skill instead of what-happened?▼

Use what-happened for latest-change provenance on a specific block of code. For broad questions about the original intent of a symbol, file, or feature, the explain skill is the better fit.