why — Claude Code skill for code decision rationale
The skill investigates why code took its current shape by checking Git history and available MCP sources, then returns cited findings about decisions and tradeoffs.
npx skills add cursor/plugins --skill why -a claude-codeWhat why does
Ask why a design was chosen, what led to a regression, or where a threshold came from. The skill anchors the question to code and its history, then runs parallel investigations across available sources such as issue trackers, long-form docs, team chat, and observability data. Its response brings together the rationale and tradeoffs with citations.
The investigation depends on relevant MCP servers being available; source history is checked through git and gh. This skill focuses on decision context, not runtime behavior. Its companion how skill covers what code does and how it works. A missing connected source leaves a gap in the investigation, so it should not be treated as evidence. The source text is truncated, so further workflow details are omitted.
What it helps with
- trace why a particular implementation was chosen
- find the decision history behind a regression
- check what evidence supports a code threshold
- connect issue discussions to changes in Git
Example prompts for the agent
- Why does this code handle timeouts this way?
- Investigate what led to this regression and cite the sources.
- Why did we choose this threshold? Check Git history and available MCPs.
How to install why
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill why -a claude-code2Manually: put the files in place
~/.claude/skills/why/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/why/
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill why -a codex2Manually: put the files in place
.agents/skills/why/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cursor/plugins --skill why -a cursor2Manually: put the files in place
.cursor/skills/why/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cursor/plugins why2Manually: put the files in place
.github/skills/why/SKILL.md1Skills CLI (Vercel)
npx skills add cursor/plugins --skill why -a gemini-cli2Platform CLI
gemini skills install https://github.com/cursor/plugins --path pstack/skills/whyManually: put the files in place
.devin/skills/why/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cursor/plugins --skill why -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set18
The whole set →Similar
Questions about why
How do I install why in Claude Code?
Run npx skills add cursor/plugins --skill why -a claude-code. The install list repeats that command; the skill file path is ~/.claude/skills/why/SKILL.md.
What does the why skill do?
It investigates the rationale and context behind code decisions using Git history and available MCP sources. The response includes cited findings.
How is why different from how?
why investigates the forces behind a design. Its companion how skill explains what code does and how it works.