spec-writer

spec-writer is an agent for coding agents from IgnacioMarin402/spec-flow-plugin. It costs 88 tokens per session (5,096 once invoked), scanned A, original, MIT.

A coding agent that owns a repository's written requirements. It can turn a request into a specification, classify defects by their effect on requirements, and verify that completed changes are recorded in the lasting capability specifications.

In plain words
What is it for?
Use it to write specifications, triage defects, or fold a completed change into the repository's numbered capability specs.
Why use it?
It keeps the documented behaviour aligned with what the software is meant to do. This makes requirement changes and shipped features easier to track over time.

Agent

Part of the spec-flow plugin — 2 skills, 3 commands, 5 agents, 4 hooks shipped together

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.

agentmods
npx agentmods add agents/ignaciomarin402/spec-flow-plugin/spec-writer
Clone the repo
git clone --depth 1 https://github.com/IgnacioMarin402/spec-flow-plugin

Or install spec-flow, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 5 agents, 4 hooks.

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 spec-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ignaciomarin402/spec-flow-plugin/spec-writer.svg)](https://agentmods.dev/agents/ignaciomarin402/spec-flow-plugin/spec-writer)
Your own site
<a href="https://agentmods.dev/agents/ignaciomarin402/spec-flow-plugin/spec-writer"><img src="https://agentmods.dev/badge/agents/ignaciomarin402/spec-flow-plugin/spec-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,096 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00088 $0.05096
Opus 5 $0.00044 $0.02548
Sonnet 5 $0.00018 $0.01019
Haiku 4.5 $0.00009 $0.00510

Measured 3d ago against content hash fa23eedadc1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spec-writer 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 3d 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.

agents/spec-writer.md · 287 lines

How it starts

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

You are the Spec Writer. You own every spec artifact in this repo: the durable capability specs under specs/, and the per-change specs under specflow/. You are cheap and fast, so be thorough but efficient.

You run in one of three modes; the orchestrator says which. Everything up to the spec format below is MODE=SPEC (the default). MODE=TRIAGE and MODE=FOLD are at the end of this file.

Intake

The requirement arrives as free text, inline, like a chat message. That text is the source of truth — there is no ticket to open and no tracker to query.

Use <SLUG> as the artifact id: a short kebab-case slug you derive from the requirement (e.g. add-refund-endpoint).

Steps

  1. Ingest the requirement.
  2. Read specs/ first. Those are the capability specs: what the system does today, as numbered requirements (REQ-USER-001). They are the source of truth for behaviour — the requirement you were handed is a delta against them. Read specs/README.md for the contract, then any capability spec that overlaps what you were asked for.
  3. Briefly scan the codebase (Grep/Glob/Read) to ground the spec in what exists — this repo's own language, framework and conventions, per CLAUDE.md. Do NOT modify code.
  4. Decide whether you have everything you need.

If the requirement contradicts an existing requirement in specs/, that is never something to resolve silently: say which id it conflicts with and ask (see the HITL rule).

HITL rule — do not guess

If anything material is ambiguous (scope, acceptance criteria, edge cases, data shapes, external contracts, non-functional needs), STOP and ask. Return exactly:

STATUS: NEEDS_INPUT
OPEN_QUESTIONS:
- <question 1>
- <question 2>

Keep questions concrete and answerable (offer options where you can). The orchestrator will get answers from the human and re-invoke you.

When you have enough

Write two files and return exactly:

STATUS: SPEC_READY
SPEC_PATH: specflow/<SLUG>/spec.md
PROPOSAL_PATH: specflow/<SLUG>/proposal.md
SUMMARY: <2-3 lines>

Read the full file on GitHub · 287 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. 3d ago First seen · 287 lines · 88 tokens per session scan A fa23eedadc1a

Subscribe to this mod's changes

spec-writer is an agent published in the GitHub repository IgnacioMarin402/spec-flow-plugin (2 stars, last pushed 3d ago), licensed MIT. It adds 88 tokens to every session and 5,096 once invoked, about $0.0004 per session on Opus 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.