factory-why
Trace the historical rationale and decision archaeology behind existing code, config, or architecture before changing it. Use for /factory-why, 'why was this…
от watt-mind★ 25 звёзд на GitHub
Установить factory-why в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Why (decision archaeology)
Trace why a design choice, workaround, guard, or convention exists before deleting or rewriting it. Chesterton's fence applies: do not remove a load-bearing check without knowing what broke without it.
This skill is read-only. Never edit product files during archaeology.
Workflow
1. Check checkout freshness
Before trusting working-tree history or code lines, compare HEAD with origin/<base> (git fetch --quiet, git rev-list --count HEAD..origin/<base>, git status --porcelain). If dirty, behind, or ahead, inspect commits and files on origin/<base> directly (git show origin/<base>:<path>) and cite origin/<base>@<sha> in your answer.
2. Locate the artifact
Use codegraph_explore (when .codegraph/ exists) or rg -n (excluding .git, node_modules, .nuxt, build outputs) to find the exact symbol, constant, comment, or config line in question.
3. Trace git history
Run focused git archaeology on the specific lines or identifier rather than reading full history:
- Pickaxe string/symbol additions and removals:
git log -S "<symbol>" --oneline origin/<base> -- <path> - Regex history for callers or patterns:
git log -G "<regex>" -n 15 --oneline origin/<base> - Line-range evolution (follows moves and edits cleanly):
git log -L <start>,<end>:<path> origin/<base> - Inspect introducing and modifying commits:
git show <sha>
Skip formatting-only or pure rename commits (--follow, -w) when tracing behavioral intent.
4. Read the decision record
Commits tell what changed; external records usually hold why:
- Linked PRs and reviews:
gh pr list --search "<sha>" --state all --json number,title,urlandgh pr view <num> --comments - Issue trackers: Look up referenced
ISSUE-ID/#Nviafactory ticket get <ID>(for Linear or GitHub Issues) orgh issue view <N> - Repo decision logs & docs: Check
docs/product-decisions.md,docs/, ADRs, inlineWHY:/HACK:comments, and regression tests added in the introducing commit (tests often preserve the exact failure scenario).
5. Report cleanly
Apply ../factory-unslop/SKILL.md rules and separate facts from inference:
- What introduced it: Commit
<sha>, PR#<num>, issue<ISSUE-ID>, and date/author context when relevant. - Problem it solved / constraint it preserves: Directly quoted or observed evidence from commits, PR reviews, issues, or tests.
- Still load-bearing vs stale: Which assumptions in that history still hold on
origin/<base>and which changed since then (for example, an upstream SDK upgrade or removed flag). - Unknowns: If commit and issue history never recorded why, say "not recorded in git or issue history" and clearly label any hypothesis as inferred.
Pair with ../factory-how/SKILL.md when the user also needs the current runtime flow, or ../factory-teach/SKILL.md for a progressive walkthrough.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл factory-why?
Trace the historical rationale and decision archaeology behind existing code, config, or architecture before changing it. Use for /factory-why, 'why was this built this way', or before refactoring load-bearing design choices.
Как установить скилл factory-why?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл factory-why запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…