Agent skill

What Happened

by entireio in entireio/skills

Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through git blame and deduplicated entire checkpoint explain lookups.

MITAuto-check passedDevelopment

Install What Happened

skills CLI
$ npx skills add entireio/skills --skill what-happened -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install entireio/skills what-happened --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/entireio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/what-happened .claude/skills/what-happened && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
what-happened
GitHub stars
223
Token cost
~3.7k tokens
SKILL.md length
1,954 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through git blame and deduplicated entire checkpoint explain lookups.

  • Works in 4 steps: Resolve the target block → Gather provenance → Explain each unique commit → …
  • The user asks what happened
  • SKILL.md covers Goal, Rules, Workflow and Response format, plus 1 more section
  • Calls git

What it does

What Happened is an agent skill from entireio/skills. Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through git blame and deduplicated entire checkpoint explain lookups. Use when the user asks what happened, says "tell me why" about a code block, is confused about a section of code, asks "wtf is going on", "why is this like this", "why was this changed", or wants provenance for a specific file block.

Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: ✨ Cross-agent skills that help coding agents use Entire context from Checkpoints, sessions, and git history to search past work, explain code, and hand off sessions. The licence is MIT.

When your agent uses it

  • The user asks what happened
  • Says tell me why about a code block
  • Is confused about a section of code
  • Asks wtf is going on

Example prompts

  • “tell me why”
  • “wtf is going on”
  • “why is this like this”
  • “/what-happened”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Resolve the target block
  2. Gather provenance
  3. Explain each unique commit
  4. Add fallback code behavior analysis when needed

What it can do on your machine

Read from SKILL.md and the folder at commit fe5266f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

What Happened loads about 3.7k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 1,954 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from entireio/skills at commit fe5266f, republished under its MIT licence (© entireio). 1,954 words, ~3,715 tokens.

Download SKILL.mdSave it as .claude/skills/what-happened/SKILL.md (or your agent's skills folder).
name
what-happened
description
Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through `git blame` and deduplicated `entire checkpoint explain` lookups. Use when the user asks what happened, says "tell me why" about a code block, is confused about a section of code, asks "wtf is going on", "why is this like this", "why was this changed", or wants provenance for a specific file block.

What Happened

Use this skill when the user wants a provenance-focused explanation for a code block.

Supported inputs:

  • path:line
  • path:start-end
  • path plus a pasted code snippet from that file

If the user asks a vague provenance question without a file path, line range, or pasted snippet, ask for the target code and stop without running commands or using the header.

Goal

Find the most recent change blocks matching the user's target lines, list the matching commit hashes and checkpoint state, then summarize why each block was changed using the best available context. When checkpoint-backed context is unavailable, still explain what the current code does as an explicit fallback and clearly mark that explanation as not checkpoint-backed.

Rules

  1. Do not guess about file contents or line numbers. Resolve the exact target lines before explaining anything.
  2. Use the installed entire binary from PATH, not ./entire from the current repo.
  3. Prefer git blame for provenance and entire checkpoint explain --commit for transcript-backed context. Do not use experimental entire why for this skill.
  4. Use this skill for latest-change provenance on a specific block. For broad original intent of a symbol, file, or feature, prefer the explain skill.
  5. Do not manually hunt through .git/entire-sessions/ or raw transcript files for commit provenance. If entire checkpoint explain cannot provide transcript context, report the exact missing or unavailable state.
  6. If multiple blame blocks match, include all distinct ranges. Deduplicate commit hashes before running entire checkpoint explain; run transcript lookups once per unique commit, not once per range. Also deduplicate checkpoint IDs before expanding checkpoint transcripts; run checkpoint expansion once per unique checkpoint, not once per commit or range.
  7. Distinguish these states explicitly:
    • no checkpoint is referenced for the commit
    • a checkpoint is referenced but is unavailable locally or remotely
    • a checkpoint is available, but full transcript expansion failed and raw transcript expansion was not explicitly requested
    • Entire transcript lookup failed (the entire checkpoint explain command itself errored)
    • the code is untracked, uncommitted, or otherwise has no committed history
    • any other provenance command fails after the target code was resolved
  8. For every resolved code block, include either checkpoint-backed history or a fallback explanation of what the current code does. Label fallback explanations as "not checkpoint-backed" and do not imply intent or historical rationale from checkpoints.
  9. Treat entire checkpoint explain command output as intermediate source material for summarization. Do not paste raw command output or full transcripts into the user response unless the user explicitly asks for raw output. Include only short error excerpts when they help the user fix a failed lookup.
  10. Keep the final explanation concise and block-focused. Do not summarize unrelated parts of the file.

Workflow

1. Resolve the target block

If the user did not provide a file path plus exact line/range or pasted snippet, ask them for the target code and stop. Do not run commands or use the Entire What Happened: header.

If the user gave path:line or path:start-end, use that line or range directly and read only that target from the file before explaining it. If the path does not exist, the file cannot be read, or the line/range is outside the file, say so plainly and stop without using the Entire What Happened: header.

If the user gave a path and a snippet:

  • Pick the most distinctive exact line from the snippet and search the file with fixed-string matching to find candidate locations:
bash
grep -n -F -- "<distinctive snippet line>" "<path>"
  • Read the small candidate windows around each hit, not the whole file unless the file is already small or the search produces too many candidates to inspect efficiently.
  • Find the exact snippet in the candidate window.
  • Convert the match to start-end line numbers.
  • If whitespace differs but the code is otherwise identical, normalize leading indentation and trailing whitespace before deciding the snippet does not match.
  • If the snippet appears multiple times, report the ambiguity and list the candidate ranges instead of picking one silently. Do not use the Entire What Happened: header for this unresolved-input response.
  • If the snippet cannot be found exactly, say so plainly and stop rather than inferring a nearby match. Do not use the Entire What Happened: header for this unresolved-input response.
2. Gather provenance

Only run blame after the target has been resolved to actual line numbers in the current file. Do not run git blame -L against an unresolved pasted snippet, inferred nearby block, symbol name, or approximate range.

Run:

bash
git blame --porcelain -L <start>,<end> -- "<path>"

If the command fails because the file is untracked, mark the whole target range as an untracked file with no committed history, keep the exact snippet for that range, and continue to fallback code behavior analysis.

If blame reports an uncommitted pseudo-commit such as all zeroes or Not Committed Yet, mark those ranges as local uncommitted changes and do not run entire checkpoint explain for them. If other target ranges resolve to real commits, continue with those committed ranges.

Use the output to identify every blame block inside the target range. Group adjacent target lines that resolve to the same commit when they form one contiguous matched block. For each matching block, collect:

  • line range
  • matched code snippet from the current file for that exact range
  • commit hash
  • author/summary when helpful for provenance or fallback context

Collect the unique real commit SHAs across all matching blocks while preserving each distinct range. Exclude untracked and local uncommitted pseudo-commits from this set. Build a map from commit SHA to all target ranges blamed to that commit. Do not run entire checkpoint explain separately for multiple ranges that share the same commit.

If the resolved target spans more than 5 unique real commits, stop before running entire explain. Report the matched ranges and ask the user to narrow the range or confirm the deeper lookup. Do not use the Entire What Happened: header for this confirmation response.

Keep the exact snippets from the target-resolution read so the final answer can show users which code each provenance entry refers to. Only reread a matched block if the snippet for that range was not already captured.

Show full SKILL.md (946 more words)Show less
3. Explain each unique commit

For each unique commit SHA in that map, run exactly once:

bash
entire checkpoint explain --commit <commit-sha> --no-pager

When there are multiple unique commits, run those independent commit lookups in parallel when the agent environment supports parallel tool calls.

Use this output to answer the question and identify the checkpoint state. Do not use --search-all unless the user explicitly asks to widen a failed lookup; it removes branch/depth limits and may be slow.

If this command fails, do not run extra commit metadata lookups and do not scan raw session files. Mark the range for fallback code behavior analysis and report that Entire transcript lookup failed. Include the command error only if it helps the user fix the issue, such as authentication or missing remote configuration.

If the commit view reveals a checkpoint ID but is still not enough to answer the user's question, collect the checkpoint ID for expansion. Deduplicate checkpoint IDs across all commit views before running checkpoint lookups; if several commits reference the same checkpoint, expand that checkpoint once and map the result back to every relevant range.

For each unique checkpoint ID that needs more detail, run:

bash
entire checkpoint explain --checkpoint <checkpoint-id> --full --no-pager

Do not run raw transcript expansion automatically. If --full fails or is insufficient, mark the affected ranges for current-code fallback analysis unless the user explicitly asked for raw transcript detail. Only when explicitly requested, run:

bash
entire checkpoint explain --checkpoint <checkpoint-id> --raw-transcript --no-pager

Use the collected output to answer:

  • what the agent was trying to do
  • why this block changed
  • any constraint, bug, edge case, or refactor pressure that caused the final code

Do not show the raw entire checkpoint explain output by default. Summarize only the relevant parts tied to the target ranges.

If the commit has no checkpoint ID, use only the commit-level context returned by entire checkpoint explain --commit for provenance and mark the range for fallback code behavior analysis. Clearly state "no checkpoint-backed summary; no Entire checkpoint was referenced."

If a checkpoint ID is present but entire checkpoint explain --checkpoint cannot load it, keep the checkpoint ID in the answer and say "checkpoint <id> was referenced, but the checkpoint was not available locally or remotely." Include the command error only if it helps the user fix the issue, such as authentication or missing remote configuration.

If the checkpoint loads but --full fails, say that checkpoint metadata was available but full transcript expansion failed. If raw transcript detail was not explicitly requested, say it was not expanded automatically. Answer checkpoint-backed facts from the entire explain --commit output, and use current-code fallback analysis for anything that output cannot support.

Map each unique commit explanation back to every target range blamed to that commit.

4. Add fallback code behavior analysis when needed

For any resolved range that falls into one of the states listed in Rule 7 where checkpoint-backed context is unavailable, still answer what the current code does.

Use only source-backed analysis:

  • Read the target block and the smallest necessary surrounding scope, such as the enclosing function, type, imports, or constants.
  • Use grep -n -F to inspect direct call sites or definitions only when the block cannot be understood from local context.
  • Explain observable behavior, inputs, outputs, side effects, and important branches.
  • Do not present this as historical intent, checkpoint rationale, or an agent transcript summary.
  • State what cannot be known from current code alone.

Response format

Begin the first successful resolved-code response to this skill invocation with the line:

Entire What Happened:

followed by a blank line, then the content.

  • Apply the header to the first successful resolved-code response of the invocation only. If an earlier unresolved-input response omitted the header and the user later disambiguates the target, include the header on the resolved-code response. Do not re-print it on later follow-up turns within the same invocation.
  • Do not include the header on unresolved-input responses (e.g. snippet not found, ambiguous snippet, invalid path or range). If the target code was resolved but no checkpoint-backed context exists, still use the header and clearly label the answer as current-code fallback analysis rather than a checkpoint summary.
  • After the header, include exactly one short, original, non-lyrical "Tell me why" line randomly chosen from the examples below. Do not quote, paraphrase, or imitate Backstreet Boys lyrics or any other song lyrics.

Allowed examples:

  • Tell me why: the blame points here.
  • Tell me why: the diff left a trail.
  • Tell me why: the context starts here.

Start with a short provenance summary using one status per range from the states in Rule 7:

text
Entire What Happened:

Tell me why: the blame points here.

Matches
- <path>:<start>-<end> -> commit <sha> | checkpoint <id>
  ```<language>
  <matched code snippet>
  ```
- <path>:<start>-<end> -> commit <sha> | no Entire checkpoint
  ```<language>
  <matched code snippet>
  ```
- <path>:<start>-<end> -> commit <sha> | Entire transcript lookup failed
  ```<language>
  <matched code snippet>
  ```
- <path>:<start>-<end> -> commit <sha> | checkpoint <id> unavailable
  ```<language>
  <matched code snippet>
  ```
- <path>:<start>-<end> -> commit <sha> | checkpoint <id> metadata only, transcript expansion failed
  ```<language>
  <matched code snippet>
  ```
- <path>:<start>-<end> -> local uncommitted changes | no committed history
  ```<language>
  <matched code snippet>
  ```
- <path>:<start>-<end> -> untracked file | no committed history
  ```<language>
  <matched code snippet>
  ```

For checkpoint-backed ranges, give one short section per distinct matching block:

text
Why
- <path>:<start>-<end>: <2-4 sentence explanation of why this block changed last time>

For ranges without checkpoint-backed context, use this separate section instead:

text
Current-code fallback (not checkpoint-backed)
- <path>:<start>-<end>: <2-4 sentence explanation of what the current code does, plus any
  limits on what can be inferred without checkpoint history>

Snippet guidance:

  • Prefer the exact matched lines from the file.
  • Keep snippets tight to the matched block; avoid unrelated surrounding code unless needed for readability.
  • If the block is long, include the smallest contiguous excerpt that still lets the user recognize it and say that it was truncated.

When the input was a pasted snippet, include the resolved line range in the answer.

Trigger phrases

This skill should trigger for questions like:

  • "wtf is going on with this code"
  • "tell me why this code is like this"
  • "tell me why this code is like that"
  • "tell me why this was changed"
  • "what happened here"
  • "what happened to this block"
  • "why is this code like this"
  • "why does this code look like this"
  • "why does this look weird"
  • "why was this changed"
  • "why does this exist"
  • "why was this written this way"
  • "what is the history behind this code"
  • "help me understand this block"
  • "what changed here and why"

Especially trigger when the user includes:

  • a single file line like cmd/entire/cli/explain.go:103
  • a file range like cmd/entire/cli/explain.go:103-107
  • a file path plus a pasted code snippet

© entireio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/what-happened of entireio/skills.

Open the folder on GitHubat commit fe5266f

Compare with similar skills

What Happened next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

What Happened compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
What Happened this skillentireio/skills223—~3.7kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost56k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Git Merge Conflict Resolvertailcallhq/forgecode7.6k1 repos~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed
  • Git Branch Naming

    makeplane/plane

    Names a new Git branch with a type prefix, the lowercased work item ID and a short kebab-case description, so the ID can be extracted later from the branch name.

    61k GitHub stars~594 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from entireio/skills

All 12 skills in this repo
  • Review

    entireio/skills

    Review code changes on the current branch using checkpoint transcript context to understand developer intent before auditing the diff.

    223 GitHub stars~1.9k tokensUpdated 12 days ago
    Auto-check passed
  • Address Findings

    entireio/skills

    Address the review findings posted on an Entire trail: fetch the trail's open findings, fix the code, and resolve them on the trail.

    223 GitHub stars~1.6k tokensUpdated 12 days ago
    Auto-check passed
  • Recall

    entireio/skills

    A skill your agent uses when the user describes a task and wants to know whether something similar has been done before, then turn the closest prior session into a task playbook.

    223 GitHub stars~1.6k tokensUpdated 12 days ago
    Auto-check passed
  • Replay

    entireio/skills

    A skill your agent uses when the user wants to step through a feature's checkpoints chronologically, pausing at each step to ask questions.

    223 GitHub stars~1.7k tokensUpdated 12 days ago
    Auto-check passed
  • Search

    entireio/skills

    A skill your agent uses when the user asks to research, investigate, look into, dig into, or search for anything — a topic, feature, bug, decision, or "what do we know about X".

    223 GitHub stars~2.1k tokensUpdated 12 days ago
    Auto-check passed
  • Session Crosslink

    entireio/skills

    A skill your agent uses when an agent session ran outside the repo whose commits should record it — e.g.

    223 GitHub stars~2k tokensUpdated 12 days ago
    Auto-check passed

Works with

Categories

Questions about What Happened

What does What Happened do?

Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through git blame and deduplicated entire checkpoint explain lookups. What Happened is an agent skill from entireio/skills. Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through git blame and deduplicated entire checkpoint explain lookups.

When should I use What Happened?

What Happened fits situations like: the user asks what happened; says tell me why about a code block; is confused about a section of code; asks wtf is going on.

How do I install What Happened in Claude Code?

Run `npx skills add entireio/skills --skill what-happened -a claude-code`. Or copy the skill folder (skills/what-happened in entireio/skills) into .claude/skills/what-happened in your project. Claude Code loads it when a task matches its description.

How do I install What Happened in Codex?

Run `npx skills add entireio/skills --skill what-happened -a codex`. Or copy the skill folder (skills/what-happened in entireio/skills) into .agents/skills/what-happened in your project. Codex loads it when a task matches its description.

Can I use What Happened in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add entireio/skills --skill what-happened -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/what-happened, .gemini/skills/what-happened, .github/skills/what-happened and .opencode/skills/what-happened in your project.

What does What Happened need to run?

Going by SKILL.md and its folder, What Happened needs the command-line tools its instructions call (git).

Does What Happened access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is What Happened safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does What Happened use?

What Happened is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does What Happened use?

About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to What Happened?

Skills that share tags, products or a category with What Happened: Finishing a Development Branch (obra/superpowers, 297k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars) and Create Pull Request (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains What Happened?

entireio (a GitHub organization) maintains it in entireio/skills, which has 223 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 29, 2026.

Source: entireio/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.