VerticalSlices: Agent for Claude Code

.ai/agents/spec-writer.md

Spec Writer is an agent for Claude Code from Cratis/VerticalSlices. It costs 42 tokens per session (1,208 once invoked), scanned A, a copy of Spec Writer, MIT.

A specialist that writes behavior specifications for Cratis vertical slices and for TypeScript and React code. These specifications describe expected behavior in testable scenarios.

In plain words
What is it for?
Use it to create C# scenario tests, constraint tests, read-model tests, and React or TypeScript specifications for a slice.
Why use it?
It helps ensure that each feature's intended behavior is recorded and checked, including backend rules and relevant frontend behavior.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

This is Cratis/VerticalSlices's own configuration. It tells Claude Code how to work on VerticalSlices itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything VerticalSlices configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Cratis/VerticalSlices. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Cratis/VerticalSlices/main/.ai/agents/spec-writer.md
Clone the repo
git clone --depth 1 https://github.com/Cratis/VerticalSlices

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/verticalslices/spec-writer/github.svg)](https://agentmods.dev/agents/cratis/verticalslices/spec-writer)
Your own site
<a href="https://agentmods.dev/agents/cratis/verticalslices/spec-writer"><img src="https://agentmods.dev/badge/agents/cratis/verticalslices/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/verticalslices/spec-writer"><img src="https://agentmods.dev/badge/agents/cratis/verticalslices/spec-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,208 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 100% copy Near-identical to another mod 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.00042 $0.01208
Opus 5.5 $0.00017 $0.00483
Sonnet 5.5 $0.00008 $0.00242
Haiku 4.5 $0.00004 $0.00121

Measured 1mo ago against content hash 92f321d35de7, 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 1mo 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

This is a copy

100% identical to Spec Writer — 52 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.ai/agents/spec-writer.md · 144 lines

How it starts

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

Spec Writer

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

Always read and follow the canonical rules in .ai/rules/:

  • specs.md — folder structure, naming, BDD philosophy
  • specs.csharp.md — the in-process scenario family
  • 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 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)

C# specs — lead with the scenario family

Prefer the four in-process scenario helpers over out-of-process Chronicle host specs:

Tool Use for
CommandScenario<TCommand> State Change — runs authorization + validators + Provide() + Handle() + appended events
EventScenario constraint violations, raw append/sequencing semantics
ReadModelScenario<TReadModel> State View — projection/reducer state from a sequence of events
ReactorScenario<TReactor> Automation / Translation — reactor invocation + side effects

Reserve out-of-process integration specs for host/transport/infra boundaries the scenario helpers can't exercise.

Placement & wrapping

Specs live in the slice folder; every spec file is wrapped in #if DEBUG … #endif:

<Feature>/<Slice>/
├── <Slice>.cs
└── when_<behavior>/
    ├── and_<happy_scenario>.cs
    └── and_<failure_scenario>.cs

Example — CommandScenario

#if DEBUG
namespace MyApp.Projects.Registration.when_registering_a_project;

public class and_all_information_is_valid : Specification
{
    readonly CommandScenario<RegisterProject> _scenario = new();
    readonly ProjectId _id = ProjectId.New();
    CommandResult _result;

    async Task Because() => _result = await _scenario.Execute(new RegisterProject(_id, "Acme"));

    [Fact] void should_succeed() => _result.ShouldBeSuccessful();
    [Fact] async Task should_have_appended_registered_event() =>
        await _scenario.ShouldHaveAppendedEvent<RegisterProject, ProjectRegistered>(_id, e => e.Name == "Acme");
}
#endif

Read the full file on GitHub · 144 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. 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/VerticalSlices (2 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 1,208 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to Spec Writer, differing in 52 lines, and is treated as a copy.

Related

Other agents, from other repositories

Spec Writer

Specialist for writing C# specs (plain calls and focused in-process scenarios) and TypeScript/React specs for vertical slices. Ensures every slice has comprehensive behavior coverage following the project's BDD conventions.

Cratis/AI · 44 tokens

Screenplay Renderer

Capability probe and delivery verifier for accepted Cratis Screenplay models: checks admission, renders with the cratis CLI into a probe destination, builds and tests the generated output, maps results to .play specifications, and classifies model fixes against platform gaps. Never edits .play or Stage-managed files…

Cratis/AI · 74 tokens

Coordinator

General-purpose coordinator agent for Cratis-based projects. Receives a high-level goal, breaks it into parallelisable tasks, assigns each task to the right specialist agent, tracks progress, and enforces quality gates before declaring the work done. Use this agent when a request spans multiple concerns (backend +…

Cratis/AI · 80 tokens

Frontend Developer

Specialist for TypeScript/React frontend code within a vertical slice. Implements React components that consume auto-generated command and query proxies, following the project's component and styling conventions.

Cratis/AI · 37 tokens

Orchestrator

Top-level team orchestrator for Cratis-based projects. Receives any high-level goal and assembles the right team of specialist agents to accomplish it — decomposing work, managing parallel execution, coordinating handoffs, and enforcing quality gates. Use this agent as the entry point whenever multiple agents need to…

Cratis/AI · 94 tokens

Vertical Slice Planner

Orchestrates the implementation of one or more vertical slices. Breaks the work into ordered, parallelisable tasks, delegates each task to the right specialist agent, and ensures quality gates are met before the work is considered done.

Cratis/AI · 49 tokens