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.
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.
npx skills add backnotprop/pstack --skill whygit clone --depth 1 https://github.com/backnotprop/pstackWrote 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.
[](https://agentmods.dev/skills/backnotprop/pstack/why)<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.
<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>- Socket pass
- Snyk warn
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.
| Model | Per session | Once 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 |
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.
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.
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
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/epistemics.md 6.6 KB
- references/investigator-prompt.md 5.4 KB
- references/source-playbook.md 1.3 KB
- references/sources/code-archaeology.md 1.4 KB
- references/sources/databricks.md 6.8 KB
- references/sources/datadog.md 4.9 KB
- references/sources/incident-postmortem.md 372 B
- references/sources/linear.md 2.9 KB
- references/sources/notion.md 2.8 KB
- references/sources/sentry.md 2.0 KB
- references/sources/slack.md 1.3 KB
- references/synthesizer-prompt.md 7.0 KB
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.
- yesterday Changed b12ea2757ff1
- 6d ago Changed 35d0c5266181
- 9d ago Changed · -60 lines 9145d2f5c269
- 13d ago Changed 1f9c0a97e305
- 17d ago Changed · +2 lines 0cf5090e5209
- 1mo ago Changed · -71 lines 7bcccc3b6fe1
- 1mo ago First seen · 230 lines · 89 tokens per session scan A dc8f2d8a7dbe
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.
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…
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…
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…
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…
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…
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…