spec-writer-setup

spec-writer-setup is a skill for Claude Code, Codex from ivan-szz/spec-writer-skill. It costs 62 tokens per session (5,760 once invoked), scanned A, original, Apache-2.0.

A project scanner and generator for test-driven development (TDD), a method where tests are written before the code they check. It reads a codebase's real testing, style, architecture, and tooling patterns, then adapts TDD agents to them.

In plain words
What is it for?
Use it to scan a project, create a pattern report, and generate customized Red, Green, and Refactor agents that fit the codebase.
Why use it?
It removes the guesswork of applying generic testing instructions to an unfamiliar project. The generated agents can follow the project's existing conventions instead of relying on placeholder examples.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions OpenCode.

Good fit Use it to scan a project, create a pattern report, and generate customized Red, Green, and Refactor agents that fit the codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivan-szz/spec-writer-skill/spec-writer-setup
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 ivan-szz/spec-writer-skill --skill spec-writer-setup
Clone the repo
git clone --depth 1 https://github.com/ivan-szz/spec-writer-skill

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-writer-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivan-szz/spec-writer-skill/spec-writer-setup.svg)](https://agentmods.dev/skills/ivan-szz/spec-writer-skill/spec-writer-setup)
Your own site
<a href="https://agentmods.dev/skills/ivan-szz/spec-writer-skill/spec-writer-setup"><img src="https://agentmods.dev/badge/skills/ivan-szz/spec-writer-skill/spec-writer-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,760 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.00062 $0.05760
Opus 5 $0.00031 $0.02880
Sonnet 5 $0.00012 $0.01152
Haiku 4.5 $0.00006 $0.00576

Measured 8d ago against content hash 3f7d0aa877e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

spec-writer-setup 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 8d 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.

test-driven/skills/spec-writer-setup/SKILL.md · 536 lines

How it starts

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

Context Adapter Skill

Scan a project to extract its idiomatic patterns, then generate customized TDD agents that speak the project's language instead of pseudocode. This bridges the gap between the generic Red/Green/Refactor agents and a real codebase's conventions.

Core Principle

The best TDD agent is one that looks like it was written for your project. Generic agents say "adapt to your stack" — this skill does the adaptation automatically by reading what your project actually does.

Setup

Before doing anything:

  1. Locate the target project. If a path is given, use it. Otherwise, ask the user which project to scan.
  2. Read the base TDD agents. Load tdd-red, tdd-green, and tdd-refactor from the agents/ directory. These are the templates to customize.
  3. Check for prior context. Look for an existing context-report.md in the target project. If found, ask the user whether to re-scan or use the existing report.

Commands

Command Description
scan [path] Gather project context, produce a pattern report
adapt [agent|all] Generate customized TDD agent(s) from the last scan
scan-and-adapt [path] Full pipeline: scan then adapt all three agents

Routing

  • No argument: ask the user which command and which project path.
  • First word matches a command: load and execute it.
  • adapt without a prior scan: run scan first, then adapt.
  • adapt red or adapt tdd-red: customize only the Red Phase agent.
  • adapt all: customize all three agents.

Phase 1 — Scan

The scan phase reads the target project and extracts a structured context report. This is the foundation for all customization.

1.1 Discovery

Scan the project root for these files, in order of priority:

Documentation & Conventions (read first — highest signal):

File What it reveals
README.md Tech stack, setup commands, project purpose
AGENTS.md, CLAUDE.md, COPILOT.md, .cursorrules, .windsurfrules, .clinerules Existing AI agent instructions and conventions
CONTRIBUTING.md Code style, PR conventions, testing requirements
docs/ directory Architecture decisions, API docs, design docs
specs/ directory Existing specifications and their structure

Read the full file on GitHub · 536 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. 8d ago First seen · 536 lines · 62 tokens per session scan A 3f7d0aa877e2

Subscribe to this mod's changes

spec-writer-setup is a skill published in the GitHub repository ivan-szz/spec-writer-skill (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 62 tokens to every session and 5,760 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.