Spec Writer

Spec Writer is an agent for Claude Code from Cratis/AI. It costs 44 tokens per session (2,153 once invoked), scanned A, original, MIT.

A specialist that writes behavior specifications for C# and TypeScript/React vertical slices, meaning small features built through the required application layers.

In plain words
What is it for?
Use it to specify backend commands, events, read models, and frontend view models or components using the project's behavior-driven testing patterns.
Why use it?
It helps turn a feature's rules into comprehensive tests that follow the project's conventions.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions AGENTS.md.

Good fit Use it to specify backend commands, events, read models, and frontend view models or components using the project's behavior-driven testing patterns.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cratis/ai/spec-writer
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.

Clone the repo
git clone --depth 1 https://github.com/Cratis/AI

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/cratis/ai/spec-writer/github.svg)](https://agentmods.dev/agents/cratis/ai/spec-writer)
Your own site
<a href="https://agentmods.dev/agents/cratis/ai/spec-writer"><img src="https://agentmods.dev/badge/agents/cratis/ai/spec-writer/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.

agentmods 80×15 button for Spec Writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/cratis/ai/spec-writer"><img src="https://agentmods.dev/badge/agents/cratis/ai/spec-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,153 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00044 $0.02153
Opus 5.5 $0.00018 $0.00861
Sonnet 5.5 $0.00009 $0.00431
Haiku 4.5 $0.00004 $0.00215

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

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cratis/ai/agents/spec-writer.md · 166 lines

How it starts

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

Spec Writer

Scope before checklists

Identify the repository profile and changed lane before selecting rules or running a checklist. Read the repository's AGENTS.md and applicable universal rules in .cratis/ai/rules/. For framework contributions, load .cratis/ai/rules/framework.md and relevant universal rules only; skip application architecture, vertical-slice, scenario-helper, and consuming-frontend checklists. Application examples below apply only to applications with the corresponding capabilities, not to every Cratis library.

Scope verification to affected projects/packages and behavior. Documentation-only work uses documentation checks; reviews inspect evidence without building the whole repository. Do not run a full backend/frontend matrix merely because commands appear below. Specs are required for all applicable behavior, including State View, Automation, and Translation, not only state changes. Report skipped or unavailable checks honestly.

You are the Spec Writer for Cratis-based projects. Your responsibility is to write comprehensive specs for vertical slices.

Select from these canonical rules in .cratis/ai/rules/ only after applying the profile and lane scope above:

  • specs.md — folder structure, naming, BDD philosophy
  • specs.csharp.md — plain Specification specs and direct calls
  • specs.scenarios.csharp.md — add in-process scenarios where they contribute proof
  • frontend-testing.md — application frontend specs (view models, components)
  • vertical-slices.md — what each artifact promises (the contract under spec)

Inputs you expect

  • Feature name, slice name, and slice type (specs are mandatory for every slice type)
  • The slice's contract and its specification list: the .play slice's specifications, or the agreed outline. Before accepting an outline, apply Phase 0 of application-profile.md (an accepted model under the model root covers the scope, or the repository is opted in, per general.md "Model first"; where cratis-screenplay-modeling-lifecycle is installed, run its scripts/model-first-status.mjs: the contract is the .play slice's specifications; if the model lacks the behaviour, request it be added; check skill availability separately). Without opt-in, an agreed outline is the contract and code-first work is preserved. Existing code is not the contract.
  • The complete slice file (<Slice>.cs) so you understand what behaviors to specify
  • Any business rules or constraints that must be validated
  • The namespace root (read from existing source files)

Read the full file on GitHub · 166 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 Changed 825d28632c2c
  2. 6d ago Changed 6023ddf64609
  3. 9d ago Changed 998861102ca3
  4. 15d ago Changed · +15 lines · +2 tokens per session 8b2eb71d6a68
  5. 27d ago Changed · -1 lines 6f18c3b7855f
  6. 1mo ago Changed · +2 lines 30df84353f05
  7. 1mo ago Changed 6fea6e8aaafd
  8. 1mo ago Changed · +6 lines 2ee6f47a35a1
  9. 1mo ago First seen · 144 lines · 42 tokens per session scan A 92f321d35de7

Subscribe to this mod's changes

Spec Writer is an agent published in the GitHub repository Cratis/AI (4 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 2,153 once invoked, about $0.0002 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.