spec-authoring

spec-authoring is a skill for Claude Code, Codex from telus-labs/stagecraft. It costs 68 tokens per session (1,396 once invoked), scanned A, original, MIT.

A skill that converts numbered acceptance criteria into Gherkin scenarios in a feature file. Gherkin is a plain-language format using Given, When, and Then steps to describe expected behavior.

In plain words
What is it for?
Use it during the executable-spec stage to create scenarios from AC-1, AC-2, and similar criteria in a project brief.
Why use it?
It connects a written brief to executable tests, reducing the gap where requirements can be lost or changed without detection. Each acceptance criterion is mapped to one tagged scenario.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it during the executable-spec stage to create scenarios from AC-1, AC-2, and similar criteria in a project brief.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/telus-labs/stagecraft/spec-authoring
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.

Any agent
npx skills add telus-labs/stagecraft --skill spec-authoring
Clone the repo
git clone --depth 1 https://github.com/telus-labs/stagecraft

Made for: Claude Code, Codex.

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-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/telus-labs/stagecraft/spec-authoring.svg)](https://agentmods.dev/skills/telus-labs/stagecraft/spec-authoring)
Your own site
<a href="https://agentmods.dev/skills/telus-labs/stagecraft/spec-authoring"><img src="https://agentmods.dev/badge/skills/telus-labs/stagecraft/spec-authoring.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,396 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00068 $0.01396
Opus 5 $0.00034 $0.00698
Sonnet 5 $0.00014 $0.00279
Haiku 4.5 $0.00007 $0.00140

Measured 7d ago against content hash 2c9dcfa5430d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

spec-authoring 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 7d 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.

skills/spec-authoring/SKILL.md · 131 lines

How it starts

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

Spec authoring — closed-loop AC → Scenario → Test

The brief is in prose. Tests are in code. The gap between them is where regression hides. The executable spec (Gherkin) is the bridge — every brief AC becomes one Scenario, every Scenario must have at least one test. devteam spec verify catches drift; the stage-03b gate records the mapping.

When to use

You're authoring stage-03b. The orchestrator has just finished clarification and your task is to translate the brief's AC-N lines into Gherkin scenarios in pipeline/spec.feature. Tracks: full, quick.

Phase 1 — Load context

Read in order:

  1. pipeline/brief.md — extract every AC-N line. These are your inputs.
  2. pipeline/clarification-log.md (if present) — answers may have refined ACs.
  3. pipeline/design-spec.md (if present) — design hints the Given/When/Then.

Confirm the brief has at least one AC-N line. If it doesn't, stop — go back to PM and tighten the brief first. Don't try to invent ACs from prose.

Phase 2 — Scaffold

devteam spec generate

This writes pipeline/spec.feature with one @AC-N + Scenario: block per AC found in brief.md. The Given/When/Then lines are TODO placeholders. The scaffold makes it harder to forget an AC than to remember it.

If the file already exists, the command refuses to overwrite. Edit by hand or pass --force (rare — usually you've drifted and want verify to tell you exactly what's off).

Phase 3 — Fill in steps

For each scenario:

  • Given — the precondition. State of the system before the user acts. Concrete: "Given a user with email [email protected] exists" — NOT "Given a user".
  • When — the action. The thing that triggers the behaviour. One verb, one object: "When the user submits the sign-in form" — NOT "When the user signs in successfully" (don't smuggle the outcome into the action).
  • Then — the observable outcome. From the outside of the system. "Then a session cookie is set with HttpOnly + SameSite=Strict" — NOT "Then the internal SessionService is called" (internals aren't observable).

Read the full file on GitHub · 131 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. 7d ago First seen · 131 lines · 68 tokens per session scan A 2c9dcfa5430d

Subscribe to this mod's changes

spec-authoring is a skill published in the GitHub repository telus-labs/stagecraft (6 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 1,396 once invoked, about $0.0003 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 skills, from other repositories

intuitive-tests

Use this skill whenever the user asks about unit test best practices, test organization, flat test suites, redundant tests, test refactors, pytest/JUnit/Jest/xUnit layout, test taxonomy, flaky tests, coverage quality, fixtures, mocks, parametrization, pruning existing UTs, or "which tests are worth keeping." It…

MiaoDX/intuitive-flow · 154 tokens

verify

Run the HUMHUM quality gates that are actually touched by the current diff — frontend typecheck + vitest, and Rust fmt/clippy/test — mirroring CI. Use before marking work done, opening a PR, or when asked to "verify", "check", or "run the gates".

edible999999999-jpg/humhum · 62 tokens

test-generation

Generate comprehensive tests for code including unit tests, integration tests, and edge case coverage. Analyzes code to identify testable units and generates tests matching the project's testing framework and conventions.

richardcb/oh-my-gemini · 41 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

build-and-test

How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes.

microsoft/agent-framework · 26 tokens

writing-tests

Write unit tests, component tests, and integration tests for AiderDesk using Vitest and React Testing Library. Use when creating new tests, adding test coverage, configuring mocks, setting up test files, or debugging failing tests.

hotovo/aider-desk · 48 tokens