why

why is a skill for Claude Code, Codex from fjpulidop/specrails-core. It costs 21 tokens per session (726 once invoked), scanned A, original, MIT.

A search tool for decision explanations recorded by architecture, development, and review agents during an OpenSpec implementation pipeline.

In plain words
What is it for?
Use it to list recent explanations or search them by words and tags in the project's agent-memory records.
Why use it?
It helps you understand why implementation decisions were made instead of guessing from the final code.

Skill for Claude CodeCodex

Part of the specrails plugin — 29 skills, 14 agents shipped together

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.

agentmods
npx agentmods add skills/fjpulidop/specrails-core/why
Any agent
npx skills add fjpulidop/specrails-core --skill why
Clone the repo
git clone --depth 1 https://github.com/fjpulidop/specrails-core

Made for: Claude Code, Codex.

Or install specrails, the plugin that ships this one along with the rest of its 29 skills, 14 agents.

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 why

README.md
[![agentmods](https://agentmods.dev/badge/skills/fjpulidop/specrails-core/why.svg)](https://agentmods.dev/skills/fjpulidop/specrails-core/why)
Your own site
<a href="https://agentmods.dev/skills/fjpulidop/specrails-core/why"><img src="https://agentmods.dev/badge/skills/fjpulidop/specrails-core/why.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 726 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.00726
Opus 5 $0.00010 $0.00363
Sonnet 5 $0.00004 $0.00145
Haiku 4.5 $0.00002 $0.00073

Measured 5d ago against content hash 28c9f581ce85, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 5d 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.

specrails-plugin/skills/why/SKILL.md · 107 lines

How it starts

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

/specrails:why — In-Context Help

Searches explanation records written by sr-architect, sr-developer, and sr-reviewer agents during the OpenSpec implementation pipeline.

Records are stored in .claude/agent-memory/explanations/ as Markdown files with YAML frontmatter (agent, feature, tags, date).

Usage:

  • /specrails:why — list the 20 most recent explanation records
  • /specrails:why <query> — search records by keyword or tag

Step 1: Find explanation records

Glob all files matching .claude/agent-memory/explanations/*.md.

If the directory does not exist or contains no files: Print:

No explanation records found yet.

Explanation records are written by the sr-architect, sr-developer, and sr-reviewer agents
when they make significant decisions during feature implementation.

Run `/specrails:implement` on a feature to generate your first explanation records.

Then stop.

Step 2: Handle no-argument mode (listing)

If $ARGUMENTS is empty:

Read each explanation record file. Extract from frontmatter: date, agent, feature, tags. Extract the first sentence of the ## Decision section as the decision summary.

Sort records by date descending. Print the 20 most recent as a Markdown table:

## Recent Explanation Records

| Date | Agent | Feature | Tags | Decision |
|------|-------|---------|------|----------|
| 2026-03-14 | sr-architect | in-context-help | [templates, commands] | Chose flat directory over per-agent subdirectories. |
| ...  | ...   | ...     | ...  | ...      |

Then stop.

If $ARGUMENTS is non-empty, treat the full string as the search query.

For each explanation record file:

  1. Read the full file content
  2. Score the record against the query:
    • Filename contains a query word: +3 points per matching word
    • Frontmatter tags array contains an exact query word: +3 points per matching tag
    • Frontmatter feature contains a query word: +2 points
    • Body text contains a query word: +1 point per occurrence (case-insensitive)
  3. Sum the score

Read the full file on GitHub · 107 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. 5d ago First seen · 107 lines · 21 tokens per session scan A 28c9f581ce85

Subscribe to this mod's changes

why is a skill published in the GitHub repository fjpulidop/specrails-core (9 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 726 once invoked, about $0.0001 per session on Opus 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-08-31.

Related

Other skills, from other repositories

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

peer-review

Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating…

xintaofei/codeg · 71 tokens

scientific-critical-thinking

Evaluate scientific claims and evidence quality. Use for assessing experimental design validity, identifying biases and confounders, applying evidence grading frameworks (GRADE, Cochrane Risk of Bias), or teaching critical analysis. Best for understanding evidence quality, identifying flaws. For formal peer review…

xintaofei/codeg · 63 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

taiyi-integration

TaiyiForge 第9阶段 — 闭环归档,CHANGELOG.md。四端通用。.

Dong90/oh-my-taiyiforge · 27 tokens