kolea: Command for Claude Code

.claude/commands/spec.md

spec is a command for Claude Code from robconery/kolea. It costs 27 tokens per session (970 once invoked), scanned C, original, MIT.

A command that turns user stories in STORIES.md into executable behavior-driven development (BDD) specifications. BDD specs are tests written around expected user behavior, and they start as pending tests by default.

In plain words
What is it for?
Use it to create or review spec files from user stories, or to get help writing stories when STORIES.md is missing.
Why use it?
It creates a clear testing step from agreed requirements while checking that the project and feature specification exist first. It does not implement the feature or change its requirements.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter.

This is robconery/kolea's own configuration. It tells Claude Code how to work on kolea 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 kolea configures →

Reuse

Borrowing it

Nothing to install: this file belongs to robconery/kolea. 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/robconery/kolea/main/.claude/commands/spec.md
Clone the repo
git clone --depth 1 https://github.com/robconery/kolea

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/robconery/kolea/spec/github.svg)](https://agentmods.dev/commands/robconery/kolea/spec)
Your own site
<a href="https://agentmods.dev/commands/robconery/kolea/spec"><img src="https://agentmods.dev/badge/commands/robconery/kolea/spec/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

Your own site · 80×15
<a href="https://agentmods.dev/commands/robconery/kolea/spec"><img src="https://agentmods.dev/badge/commands/robconery/kolea/spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 970 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00027 $0.00970
Opus 5.5 $0.00011 $0.00388
Sonnet 5.5 $0.00005 $0.00194
Haiku 4.5 $0.00003 $0.00097

Measured 2mo ago against content hash 6a79bf47e589, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

spec scanned grade C with 1 finding 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.

Tells the agent never to refusehighAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

3. **Stories check.** If `docs/STORIES.md` is missing or empty, do NOT refuse —
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • spec — 100% identical, 0 lines differ
  • spec — 100% identical, 0 lines differ
.claude/commands/spec.md · 80 lines

How it starts

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

spec

Turn docs/STORIES.md into executable spec files using the bdd-specs skill. This command is the bridge between agreed stories and red specs that /build-loop will turn green.

Scope

  • IN: generating spec files from finalized stories; helping author stories when none exist yet; reporting on existing specs.
  • OUT: writing implementation code (/build-loop); changing requirements (/explore, /design); ordering tasks (/plan).

Preflight (refuse early)

  1. Require project info. If docs/PROJECT.md is missing or still a stub (mostly TODOs), refuse and tell the user: No PROJECT.md — run /explore first to define what we're building.
  2. Require a spec. If docs/SPEC.md is missing or a stub, refuse: No SPEC.md — run /design first so there's something to spec against.
  3. Stories check. If docs/STORIES.md is missing or empty, do NOT refuse — instead, help create them: invoke the user-stories skill to author docs/STORIES.md from SPEC.md before continuing.

Behavior

  1. Read docs/PROJECT.md, docs/SPEC.md, docs/STORIES.md, docs/ARCHITECTURE.md (for context), and any existing spec files (e.g. tests/**/*.spec.ts, specs/**/*.ts, **/__tests__/**).
  2. If specs already exist for a story, LEAVE THEM ALONE. Do not overwrite, edit, rename, or reorganize. Report what was found and tell the user you can overwrite on explicit request.
  3. For stories with no corresponding spec file, delegate to the bdd-specs skill to generate them. Pass the story id(s) so output aligns 1:1 with docs/STORIES.md (Story → Feature, AC → Scenario, each Then → one Specification).
  4. Every newly generated spec is pending by default — use the runner's skip / todo / pending marker (it.todo, it.skip, test.todo, etc., depending on whether the project uses bun:test or Jest). They must not accidentally pass; they must be visibly pending until /build-loop implements them.
  5. Specs must align to stories, but names should read naturally:
    • File name: a readable kebab-case slug from the story title — no story-NNN prefix. e.g. atomic-create-user-order-entitlements.spec.ts.
    • Outer describe: the human-readable feature, no id. e.g. describe("Feature: atomic create of user, order, entitlements", …).
    • Traceability: put a single comment at the top of the file with the story id, e.g. // STORY-007 — Atomic create of user, order, entitlements. That comment is the only place the id appears.
  6. Never invent acceptance criteria. If a story is underspecified, stop and send the user back to refine it via the user-stories skill.

Read the full file on GitHub · 80 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. 2mo ago First seen · 80 lines · 27 tokens per session scan C 6a79bf47e589

Subscribe to this mod's changes

spec is a command published in the GitHub repository robconery/kolea (11 stars, last pushed 28d ago), licensed MIT. It adds 27 tokens to every session and 970 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (tells the agent never to refuse). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.