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 BlackBeltTechnology/pi-agent-dashboard --skill reverse-spec-from-codegit clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboardWrote 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/blackbelttechnology/pi-agent-dashboard/reverse-spec-from-code)<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/reverse-spec-from-code"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/reverse-spec-from-code/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/blackbelttechnology/pi-agent-dashboard/reverse-spec-from-code"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/reverse-spec-from-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00091 | $0.02419 |
| Opus 5 | $0.00046 | $0.01210 |
| Sonnet 5 | $0.00018 | $0.00484 |
| Haiku 4.5 | $0.00009 | $0.00242 |
Grade C, and why
reverse-spec-from-code scanned grade C with 1 finding 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 6d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$d" How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
reverse-spec-from-code
Turn spec-less code into OpenSpec capability specs so kb_search has high-signal,
consistently-formatted behavioral documents to index. Tuned via a blind
generate→judge loop against 6 real specs: requirement coverage 97%, scenario
coverage 91% (see docs/research/reverse-spec-from-code.md for the tuning record
- a model-loss test across opus / deepseek-flash / haiku).
Scratch MUST live OUTSIDE
openspec/(kb indexesopenspec/). Use the gitignored repo-root dir.reverse-spec-scratch/— otherwise every draft polluteskb_searchwith duplicate spec chunks. Promotion MOVES the file intoopenspec/specs/(the only kb-indexed copy).
When to use
- A package/directory under
packages/has behavior but noopenspec/specs/<cap>/spec.md. - You want to enrich
kb_search(it indexesopenspec/markdown) with behavioral specs. - An existing spec is stale and you want a code-current reconciliation (
--refresh).
Skip for a single trivial file, or when the capability already has an accurate spec.
Core principle (the lever that matters)
A capability's contract is not confined to one file. The single biggest
quality driver is making each generator FOLLOW the behavioral contract across
file boundaries: every emitted message/event, registry write, spawned/killed
process, config read, or DOM attribute is a contract with another component and
must be spec'd too. In tuning this moved requirement coverage from 40% to 95% on
the cross-cutting capability. The generator prompt (prompts/generator.md)
enforces this in STEP 1 — do not weaken it.
Fitness, honestly
"Match an existing spec" is a PROXY, not the goal. Real specs drift from code. The goal is a spec that accurately describes current code and is searchable. Target: high requirement coverage + zero code-ungrounded hallucination. Code-current divergence from a stale spec is a win, not a miss.
Procedure
- Resolve target + scope. User names a directory/package (e.g.
packages/server) and optionally a single capability. Confirm the target path exists.
What ships with it
4 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.
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.
- 6d ago First seen · 185 lines · 91 tokens per session scan C d879e801f704
reverse-spec-from-code is a skill published in the GitHub repository BlackBeltTechnology/pi-agent-dashboard (278 stars, last pushed today), licensed MIT. It adds 91 tokens to every session and 2,419 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
goga-review-plan
Verify execution plan completeness and correctness.
goga-accept-manifest-review
Verify each Cell's CODEMANIFEST against the implementation.
goga-change-manifest-reconciler
Reconciliation of CODEMANIFEST specifications with implementation.
goga-change-validator
Final end-to-end validation of the completed change.
goga-accept-report
Generate the final acceptance report with verdict.
goga-change-drift-analyzer
Semantic drift detection after implementation.