factory-why

factory-why is a skill for Claude Code from watt-mind/factory. It costs 47 tokens per session (769 once invoked), scanned A, original, Apache-2.0.

A read-only investigation workflow for finding why an existing code choice, workaround, guard, or architecture was introduced. It uses the current source and focused Git history, where Git records changes to a project over time.

In plain words
What is it for?
Use it before refactoring load-bearing code, deleting safeguards, or answering why a configuration or implementation works the way it does.
Why use it?
It helps avoid removing a check or design choice that protects against a past failure. The workflow also checks whether the local checkout is up to date before treating its history as authoritative.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the core plugin — 38 skills, 22 commands, 5 agents, 1 hook shipped together

Good fit Use it before refactoring load-bearing code, deleting safeguards, or answering why a configuration or implementation works the way it does.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/watt-mind/factory/factory-why
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add watt-mind/factory --skill factory-why
Clone the repo
git clone --depth 1 https://github.com/watt-mind/factory

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 38 skills, 22 commands, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for factory-why

README.md
[![agentmods](https://agentmods.dev/badge/skills/watt-mind/factory/factory-why/github.svg)](https://agentmods.dev/skills/watt-mind/factory/factory-why)
Your own site
<a href="https://agentmods.dev/skills/watt-mind/factory/factory-why"><img src="https://agentmods.dev/badge/skills/watt-mind/factory/factory-why/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for factory-why

Your own site · 80×15
<a href="https://agentmods.dev/skills/watt-mind/factory/factory-why"><img src="https://agentmods.dev/badge/skills/watt-mind/factory/factory-why.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.00769
Opus 5.5 $0.00019 $0.00308
Sonnet 5.5 $0.00009 $0.00154
Haiku 4.5 $0.00005 $0.00077

Measured 11d ago against content hash 39a7274ca622, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

factory-why scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/core/skills/factory-why/SKILL.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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,url and gh pr view <num> --comments
  • Issue trackers: Look up referenced ISSUE-ID / #N via factory ticket get <ID> (for Linear or GitHub Issues) or gh issue view <N>
  • Repo decision logs & docs: Check docs/product-decisions.md, docs/, ADRs, inline WHY: / HACK: comments, and regression tests added in the introducing commit (tests often preserve the exact failure scenario).

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed · -3 tokens per session 39a7274ca622
  2. 13d ago First seen · 51 lines · 50 tokens per session scan A 067d84d18252

Subscribe to this mod's changes

factory-why is a skill published in the GitHub repository watt-mind/factory (24 stars, last pushed today), licensed Apache-2.0. It adds 47 tokens to every session and 769 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-17.

Related

factory-why compared with skills from other repositories

factory-why next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
factory-whywatt-mind/factorySkill24todayApache-2.0A47Claude Code
release-announcementpaperclipai/paperclipSkill118kyesterdayMITA42Claude Code, Codex
agent-sync-coordinatorruvnet/rufloSkill83ktodayMITA19Claude Code
agentic-jujutsuruvnet/rufloSkill83ktodayMITA26Claude Code
agent-performance-optimizerruvnet/rufloSkill83ktodayMITA19Claude Code
agent-refinementruvnet/rufloSkill83ktodayMITA15Claude Code
agent-release-managerruvnet/rufloSkill83ktodayMITA16Claude Code