planning-with-files
Optional persistent file-based planning for multi-phase or long-running work that benefits from recovery across sessions or…
Investigate motivation, design rationale, and historical decisions behind code using relevant evidence. Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, or postmortems.
$ npx -y skills add khaneliman/khanelinix --skill why --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/whyContext preview
The summary Claude sees to decide when to auto-load this skill.
Investigate motivation, design rationale, and historical decisions behind code using relevant evidence. Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, or postmortems.
name: why description: "Investigate motivation, design rationale, and historical decisions behind code using relevant evidence. Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, or postmortems."
Investigate the intent and constraints behind existing code. Identify why code took its current shape, what alternatives were rejected, and what edge cases or incidents forced specific defenses.
Companion to `how` (runtime behavior) and `blast-radius` (downstream impact).
an assumed story.
code comments.
separate direct facts from inference.
Parse user question and gather initial git context:
git blame -L <start>,<end> <file> git log --follow -p -20 -- <file> gh pr view <number> --json title,body,author,comments,reviews
Record file paths, line ranges, symbols, commit SHAs, and linked ticket numbers.
Start with sources likely to answer the question. A commit or linked design record may be sufficient. Use other tools only when they resolve a material gap or contradiction, or the user requests broader coverage. Tool availability alone does not justify a query.
For independent searches that benefit from delegation, use [investigator-prompt.md](references/investigator-prompt.md). Keep simple investigations in the parent. Potential sources include:
1. **Source control**: Commits, PR descriptions, review comments, tests ([code-archaeology.md](references/sources/code-archaeology.md)). 2. **Connected systems**: Issue trackers, design documents, team chat, observability, error tracking, and product analytics, when the session has a tool for them. Use that tool's own search and filters. 3. **Defensive code**: Consult [incident-postmortem.md](references/sources/incident-postmortem.md) when investigating defensive checks.
Stop when the evidence sufficiently answers the question. Report the sources actually consulted and material limits; do not inventory or query unrelated systems to satisfy a coverage template.
Answer a simple question directly with citations and any material uncertainty. For a complex investigation, use [synthesizer-prompt.md](references/synthesizer-prompt.md) to organize:
evidence.
justifications.
Run packages directly with: Or install from the packages output. For example:
Optional persistent file-based planning for multi-phase or long-running work that benefits from recovery across sessions or…
Audit coding-agent sessions and mine cross-harness history for recurring corrections, skill-routing gaps, and harness faults. Use…
Design and audit agent instructions, skills, plugins, subagents, prompts, hooks, and provider configuration. Use for AI-tool…
Sketch interfaces, state, and module structure before code. Use for explicit design-led implementation or as a caller-owned…
Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena,…
Bevy workflows for ECS, migrations, first-party UI/input/rendering/assets/shaders, plugin selection, scenes, scheduling, hot…