why

why is a skill for Claude Code, Cursor from backnotprop/pstack. It costs 89 tokens per session (2,174 once invoked), scanned A, a copy of why, MIT.

An investigation method for explaining why code or a technical decision ended up the way it is. It looks for evidence in sources such as code history, issue trackers, documents, team messages, monitoring, error reports, and product data.

In plain words
What is it for?
Use it to investigate design choices, recurring bugs, postmortems, or data-based limits. It helps connect a decision to its historical and operational evidence.
Why use it?
Code often shows what happens but not the reason behind it. This helps uncover the original constraints, rejected alternatives, regressions, and intended behavior before making changes.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also shipped in a Cursor plugin. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Part of the pstack plugin — 59 skills, 2 agents shipped together

Good fit Use it to investigate design choices, recurring bugs, postmortems, or data-based limits. It helps connect a decision to its historical and operational evidence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/backnotprop/pstack/why
About the project

pstack is a collection of plain Agent Skills and engineering principles that guide AI-assisted software development across coding agents such as Claude Code, Codex, Pi, Cursor, and OpenCode. It is for developers who want reusable practices for tasks including testing, technical writing, debugging, review, and coordinating agent work. The catalogue entries are the project's skills, agents, and plugin.

backnotprop/pstack · 2,498 stars · on GitHub

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 backnotprop/pstack --skill why
Clone the repo
git clone --depth 1 https://github.com/backnotprop/pstack

Made for: Claude Code, Cursor.

Or install pstack, the plugin that ships this one along with the rest of its 59 skills, 2 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/backnotprop/pstack/why/github.svg)](https://agentmods.dev/skills/backnotprop/pstack/why)
Your own site
<a href="https://agentmods.dev/skills/backnotprop/pstack/why"><img src="https://agentmods.dev/badge/skills/backnotprop/pstack/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 why

Your own site · 80×15
<a href="https://agentmods.dev/skills/backnotprop/pstack/why"><img src="https://agentmods.dev/badge/skills/backnotprop/pstack/why.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,174 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. Third-party audits
  • Socket pass 20 Oct 2026
  • Snyk warn 20 Oct 2026
How audits are shown
Origin 89% copy Near-identical to another mod 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.00089 $0.02174
Opus 5.5 $0.00036 $0.00870
Sonnet 5.5 $0.00018 $0.00435
Haiku 4.5 $0.00009 $0.00217

Measured yesterday against content hash b12ea2757ff1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 yesterday.

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.

Origin

This is a copy

89% identical to why — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/why/SKILL.md · 101 lines

How it starts

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

Why

Investigate the motivation and intent behind code. The companion how skill answers what the code does and how it works. why answers what forces led to its shape.

Each spawn below names a role line in the pstack settings file (~/.cursor/rules/pstack-models.mdc in Cursor, ~/.claude/rules/pstack-models.md in Claude Code, ~/.agents/pstack-models.md in other harnesses) and a default. Set model to that line's value, or to the default if the file or the line is missing. Leave model unset when the value is auto or inherit-parent. If your subagent tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message or your harness's model list. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the poteto-mode skill.

Every spawn is generalPurpose with readonly: false (agent mode). Do not use readonly/Ask mode. It strips MCP access, which disables the MCP-backed investigators and the synthesizer's citation spot-checks. Investigators still shouldn't write anything.

Operating Posture

Operate as a careful, cautious, and precise investigator. Be honest about what you know vs what you're inferring. Read references/epistemics.md for the full confidence framework and phrasing guide. The synthesizer must follow it.

Step 1. Understand the Target and the Question

The target is usually a chunk of code, a pattern, a feature, or a named design decision. The question is usually a design rationale, a tradeoff, a motivating edge case, an external constraint, dead code, or a broad history sweep.

If the target is vague ("why do we do it this way?" with no clear referent), make your best guess from conversation context (open files, recent edits, cursor location, what was just discussed). State your interpretation briefly so the user can redirect if you're off, then proceed.

Step 2. Establish the Code Anchor

Read the full file on GitHub · 101 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. yesterday Changed b12ea2757ff1
  2. 6d ago Changed 35d0c5266181
  3. 9d ago Changed · -60 lines 9145d2f5c269
  4. 13d ago Changed 1f9c0a97e305
  5. 17d ago Changed · +2 lines 0cf5090e5209
  6. 1mo ago Changed · -71 lines 7bcccc3b6fe1
  7. 1mo ago First seen · 230 lines · 89 tokens per session scan A dc8f2d8a7dbe

Subscribe to this mod's changes

why is a skill published in the GitHub repository backnotprop/pstack (2,498 stars, last pushed yesterday), licensed MIT. It adds 89 tokens to every session and 2,174 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to why, differing in 30 lines, and is treated as a copy.

Related

Other skills, from other repositories

email-domain-security

Rigorous, defensible email-spoofability verdict and SPF supply-chain risk analysis computed from published DNS alone. Deepens the record-level SPF/DMARC/DKIM/BIMI/MTA-STS/DNSSEC fetch recipes in the offensive-osint arsenal (§16.14) with the reasoning that section doesn't do: a priority-ordered composite verdict for…

elementalsouls/Claude-OSINT · 362 tokens

exposure-risk-quantification

FAIR-aligned exposure quantification: turns a pile of recon findings into a defensible 0-100 + A-F org risk score (Likelihood x Impact, three ownership-aware factors: exposure/threat/impact), an ownership + proof demotion cap so unproven or weakly-owned findings can't inflate the number, a $-denominated FAIR…

elementalsouls/Claude-OSINT · 235 tokens

osint-methodology

Comprehensive OSINT methodology for external red-team operations and authorized attack-surface assessments. Covers the 6-stage recon pipeline (seed → asset expansion → enrichment → exposure analysis → convergence → operator-armed active validation) with connector-resilience and stage-vs-gating discipline, asset-graph…

elementalsouls/Claude-OSINT · 150 tokens

osint-autopilot

End-to-end external OSINT engagement autopilot. Run the FULL osint-methodology pipeline to completion in ONE go for an authorized domain — engagement folder, Stages 1-5 (seed, expansion, enrichment, exposure, convergence), multi-agent per-host content+JS fan-out, headline verification, auto-generated findings, and a…

elementalsouls/Claude-OSINT · 129 tokens

analyze-tensegrity-system

Analyze a tensegrity system by identifying compression struts and tension cables, classifying type (class 1/2, biological/architectural), computing prestress equilibrium, verifying stability via Maxwell's rigidity criterion, and mapping biological tensegrity (microtubules, actin, intermediate filaments). Use when…

pjt222/agent-almanac · 94 tokens

assess-context

AI context assessment — evaluating problem malleability, mapping structural rigidity versus flexibility, analyzing transformation pressure, and estimating capacity to adapt. Use when a complex task feels stuck and it is unclear whether to push through or pivot, before a significant approach change to assess whether…

pjt222/agent-almanac · 90 tokens