Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/discover)<a href="https://agentmods.dev/commands/dinhnguyenngoc/spec-driven-claude-code/discover"><img src="https://agentmods.dev/badge/commands/dinhnguyenngoc/spec-driven-claude-code/discover.svg" alt="Measured on agentmods" 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.00025 | $0.07673 |
| Opus 5 | $0.00013 | $0.03837 |
| Sonnet 5 | $0.00005 | $0.01535 |
| Haiku 4.5 | $0.00003 | $0.00767 |
Grade D, and why
discover scanned grade D with 3 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 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
- **(a) Install the engine CLI** — show the **exact command** for the platform's standard package manager (`brew install libpq` · `mongosh` · `mysql-client`, Oracle Instant Client…) and ask for approval; **on explicit ap Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- [ ] **No credential leaked** — grep the produced artifacts (`CODEBASE_MAP.md` — health snapshot included as a section, `.claude/PROJECT_PROFILE.md`, any `db/schema-snapshot/**`) for password-like segments (`Password=`, Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **(a) Install the engine CLI** — show the **exact command** for the platform's standard package manager (`brew install libpq` · `mongosh` · `mysql-client`, Oracle Instant Client…) and ask for approval; **on explicit ap How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/discover — Legacy Codebase Onboarding
"Map the territory before you change it."
Purpose
The first step when taking over a legacy repo (brownfield). Survey the system read-only to: understand stack & structure, confirm it builds/runs, take a health snapshot, and generate the Project Profile — the foundation every subsequent command uses to know which mode and which peripheral stack it is operating in.
This is Phase A of the brownfield pipeline: /discover → /spec (reverse) → /arch (reverse) → /infra (reverse-bootstrap).
Multi-repo microservices:
/discoveris repo-scoped — run it (+ the rest of Phase A) per service repo. To then understand how the services fit together, run/discover-systemonce over a workspace of all repos (it aggregates each repo's Phase A output, one-way). See../references/microservices-multirepo.md.
When to Use
- Taking over an existing codebase for the first time, with missing docs/spec/tests.
- Before reverse-engineering the spec & architecture.
| Situation | Command |
|---|---|
| Unfamiliar legacy repo, need to understand + establish baseline | /discover |
| Baseline already exists, continue development | /spec (delta) → … |
| Greenfield (building from scratch) | /spec (design) — DO NOT use /discover |
Boundary — READ-ONLY
/discover does not modify source code, does not add/upgrade dependencies or install new global tooling, and does not run migrations that write to the DB. (One narrow exception, added deliberately: installing a database client CLI during the §Phase 1b ladder — only after the exact command has been shown and the user has explicitly approved it, and only once the no-machine-change paths have failed. It is recorded in the health snapshot because the machine changed.) Restoring the project's already-declared dependencies to build/test for observation is fine. It only reads, builds/tests to observe, and produces documentation. All code changes belong to flow B.
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 · 205 lines · 25 tokens per session scan D 774fb7603cd9
discover is a command published in the GitHub repository dinhnguyenngoc/spec-driven-claude-code (20 stars, last pushed 7d ago), licensed MIT. It adds 25 tokens to every session and 7,673 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 3 findings (downloads and executes remote code, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
check
Drift detector. Diff SPEC.md against code. Read-only, zero writes.
type-coverage
Vérification Couverture des Types Python.
audit
Équipe d'Audit Complet - Audit multi-technologie parallèle utilisant les Agent Teams.
fix
Correction automatisee des bugs identifies par la QA Recette.
debug
Diagnose Ansible playbook issues from symptoms.
validate-gap
Analyze implementation gap between requirements and existing codebase.