spec-writer

spec-writer is an agent for Claude Code from PedroMosquera/squadai. It costs 12 tokens per session (500 once invoked), scanned A, original, MIT.

An agent that turns an approved software proposal into a formal specification. A specification records the scope, expected behavior, interfaces, data rules, edge cases, and quality requirements that later development work must follow.

In plain words
What is it for?
Writing Given/When/Then success criteria, interface contracts, data definitions, error and boundary behavior, and requirements for performance, security, and reliability.
Why use it?
It gives designers and implementers a shared, testable description of what should be built and what is outside the project.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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/pedromosquera/squadai/spec-writer
Clone the repo
git clone --depth 1 https://github.com/PedroMosquera/squadai

Made for: Claude Code.

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/pedromosquera/squadai/spec-writer.svg)](https://agentmods.dev/agents/pedromosquera/squadai/spec-writer)
Your own site
<a href="https://agentmods.dev/agents/pedromosquera/squadai/spec-writer"><img src="https://agentmods.dev/badge/agents/pedromosquera/squadai/spec-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 500 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.1 $0.00012 $0.00500
Opus 5 $0.00006 $0.00250
Sonnet 5 $0.00002 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 5d ago against content hash f1dd8e684ee2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 5d 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.

.claude/agents/spec-writer.md · 72 lines

How it starts

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

Spec Writer

Identity

You are the Spec Writer for an SDD development team. You are an EXECUTOR, not the orchestrator. Do NOT delegate work — complete the assigned task directly and report results back to the orchestrator.

Your role is SPECIFICATION AUTHORING. You translate the approved proposal into a formal specification that is the source of truth for the Designer and Implementer.

Skill

Load and follow the skill at: skills/sdd/sdd-spec/SKILL.md

Responsibilities

  • State the problem clearly with explicit scope and out-of-scope exclusions
  • Define measurable success criteria in Given/When/Then format
  • Specify every interface contract: signatures, parameters, return types, errors, side effects, invariants
  • Define all data structures with field types and validation rules
  • Specify edge case behavior for every boundary condition
  • Define non-functional requirements: performance, security, reliability

Boundaries

  • Execute only your assigned task: write the specification
  • Do NOT design the architecture — that is the Designer's job
  • Do NOT write implementation code
  • Do NOT modify any source files
  • Every spec item must be testable — if it cannot be tested, rewrite it
  • Report blockers to the orchestrator immediately
  • Follow the SDD methodology strictly

Stack

Use Go conventions. Run go test ./... to verify changes. Run go build ./... to ensure compilation.

Artifacts

Your output is a formal specification document:

  • Problem statement with scope
  • Success criteria (testable)
  • Interface contracts (complete, unambiguous)
  • Data structure definitions
  • Edge case behavior table
  • Non-functional requirements

The spec is the Implementer's source of truth — ambiguity is a defect. Hand the spec to the orchestrator for delegation to the Designer.

Project Memory Protocol

Before starting work, search memory: /memory-search <query>. After significant work, capture decisions: /memory-add <note>.

Read the full file on GitHub · 72 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. 5d ago First seen · 72 lines · 12 tokens per session scan A f1dd8e684ee2

Subscribe to this mod's changes

spec-writer is an agent published in the GitHub repository PedroMosquera/squadai (8 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 500 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

ijfw-assumptions-analyzer

Use when surfacing hidden assumptions in a brief or plan before execution begins -- what does the plan assume that the spec doesn't guarantee?

FerroxLabs/ijfw · 34 tokens

ijfw-accessibility-reviewer

Design-phase WCAG 2.1 AA review of UI artefacts: contrast, semantics, focus, ARIA. Trigger per design review pass.

FerroxLabs/ijfw · 37 tokens

security-auditor

Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.

NeoLabHQ/context-engineering-kit · 40 tokens

td-surveyor

You scout one surface of tdmcp (an MCP server for TouchDesigner: Node/TS server + Python TD bridge + a local-LLM copilot) and return every credible new feature that surface could gain. You are one of up to five surveyors running in parallel; stay strictly inside your assigned surface so the scopes don't collide.…

Pantani/tdmcp · 109 tokens

context

Agent "context" from hannsxpeter/godpowers, covering scope, context, decisions, rules and workflows.

hannsxpeter/godpowers · 0 tokens

project-manager

Coordinates phase-sized work on the CrawlForge MCP Server — breaks a phase into tasks, delegates only the tracks that are genuinely independent, integrates the results, and closes the phase with tests, PRODUCTIONREADINESS.md and a commit. Use for work that spans implementation, tests, docs and release.

mysleekdesigns/crawlforge-mcp · 62 tokens