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.
git clone --depth 1 https://github.com/Habib0x0/spec-driven-pluginWrote 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/habib0x0/spec-driven-plugin/spec-refine)<a href="https://agentmods.dev/commands/habib0x0/spec-driven-plugin/spec-refine"><img src="https://agentmods.dev/badge/commands/habib0x0/spec-driven-plugin/spec-refine/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/commands/habib0x0/spec-driven-plugin/spec-refine"><img src="https://agentmods.dev/badge/commands/habib0x0/spec-driven-plugin/spec-refine.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.00013 | $0.00577 |
| Opus 5.5 | $0.00005 | $0.00231 |
| Sonnet 5.5 | $0.00003 | $0.00115 |
| Haiku 4.5 | $0.00001 | $0.00058 |
Grade A, and why
spec-refine 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/spec-refine Command
Update requirements or design for an existing spec.
Model Override
When this command delegates to agents via the Task tool, check the relevant SPEC_MODEL_* environment variable and pass its value as the model: parameter when set and non-empty. When unset, omit model: and the agent uses its frontmatter default tier.
| Env var | Agent | Default tier | Used in |
|---|---|---|---|
SPEC_MODEL_PLANNER |
spec-planner | reasoning | Requirements / design refinement (steps 4, 5) |
SPEC_MODEL_TASKER |
spec-tasker | standard | Task regeneration cascade (step 6) |
Workflow
1. Identify Current Spec
Look for existing specs in .claude/specs/:
ls .claude/specs/
If multiple specs exist, ask which one to refine. If only one exists, use it automatically.
2. Read Current Spec
Read the current requirements.md and design.md:
.claude/specs/<feature-name>/requirements.md
.claude/specs/<feature-name>/design.md
3. Gather Refinements
Ask the user what needs to change:
- New requirements to add?
- Requirements to modify?
- Requirements to remove?
- Design changes needed?
- New components or APIs?
4. Update Requirements (if changed)
If requirements changed:
- Add new user stories with EARS acceptance criteria
- Update existing stories as needed
- Mark removed requirements as deprecated (don't delete history)
- Update non-functional requirements
- Update out-of-scope section
5. Update Design (if needed)
If requirements changed or design needs updates:
- Review impacted components
- Update architecture diagrams
- Modify data models
- Update API specifications
- Revise sequence diagrams
- Update security/performance considerations
6. Cascade to Tasks
After refining requirements or design:
- Inform user that tasks may need updating
- Suggest running
/spec-tasksto regenerate tasks - Note which existing tasks might be affected
Example Usage
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.
- 2mo ago First seen · 100 lines · 13 tokens per session scan A 7ae6d6936a7a
spec-refine is a command published in the GitHub repository Habib0x0/spec-driven-plugin (10 stars, last pushed 2d ago), licensed MIT. It adds 13 tokens to every session and 577 once invoked, about $0.0001 per session on Opus 5.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.
Other commands, from other repositories
brief
Brief a PR, MR or the current branch with Punchcard — the reviewer's orientation before the review, never a review.
pr
Review a GitHub PR or GitLab MR with Punchcard and post the review into it.
re-review
Round 2+ review — confirm revisions landed, catch regressions, do not re-litigate.
review-spec
Unbiased review of another session's spec or design doc.
scaffold-component
Scaffold a single named component from the architecture blueprint with production-depth code.
design-system
Generate a complete design system from product context and wireframes — no blueprint required.