tdd-author

tdd-author is a skill for Claude Code, Codex from cahenesy/throughline. It costs 59 tokens per session (9,722 once invoked), scanned A, original, MIT.

A skill that compares an updated PRD, or product requirements document, with its previous version and existing TDDs, or technical design documents. It decides which design documents are needed and writes them to the project's documentation.

In plain words
What is it for?
Reviewing PRD changes, deciding the number and scope of TDDs, and authoring the resulting documents in docs/tdd/ after each PRD update.
Why use it?
It prevents design records from becoming disconnected from changing requirements. It also keeps technical design separate from the later build task list.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the throughline plugin — 6 skills, 2 agents, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/cahenesy/throughline/tdd-author
Any agent
npx skills add cahenesy/throughline --skill tdd-author
Clone the repo
git clone --depth 1 https://github.com/cahenesy/throughline

Made for: Claude Code, Codex.

Or install throughline, the plugin that ships this one along with the rest of its 6 skills, 2 agents, 2 hooks.

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 tdd-author

README.md
[![agentmods](https://agentmods.dev/badge/skills/cahenesy/throughline/tdd-author.svg)](https://agentmods.dev/skills/cahenesy/throughline/tdd-author)
Your own site
<a href="https://agentmods.dev/skills/cahenesy/throughline/tdd-author"><img src="https://agentmods.dev/badge/skills/cahenesy/throughline/tdd-author.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,722 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00059 $0.09722
Opus 5 $0.00030 $0.04861
Sonnet 5 $0.00012 $0.01944
Haiku 4.5 $0.00006 $0.00972

Measured 5d ago against content hash 9f33c262fd5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd-author 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.

skills/tdd-author/SKILL.md · 602 lines

How it starts

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

TDD authoring

Run once after a PRD update. YOU decide how many TDDs to write, and their scope, based on what changed. Persist each to docs/tdd/NNNN-<slug>.md.

Relationship to superpowers (read first)

This skill IS the technical-design step for throughline — the governance-producing equivalent of superpowers:writing-plans. When the user invokes /tdd-author, do NOT also invoke superpowers:brainstorming or writing-plans; this skill owns the phase and its output is the TDD/ADR design-of-record (see [[ADR 0001]] in docs/adr/). If a docs/superpowers/plans/* (or specs/*) file or other prior design notes exist, READ and fold in their substance rather than redoing the work; they are transient input, never authoritative, never relocated. The canonical record is docs/tdd/ + docs/adr/. A throughline TDD is a DESIGN, not a step-by-step build script — the bite-sized failing-test-first task breakdown is /build-tdds's job, so do not reproduce it here.

0. Resume check

Resolve the plugin tree from the first set of CLAUDE_PLUGIN_ROOT / GROK_PLUGIN_ROOT (env names; fail closed via tl_plugin_root), then source the draft helper: _tl_src="${CLAUDE_PLUGIN_ROOT:-${GROK_PLUGIN_ROOT:-}}"; . "${_tl_src}/scripts/lib/plugin-root.sh" then source "$(tl_plugin_root)/scripts/lib/drafts.sh". If sourcing fails (non-zero exit — the helper file is missing or broken), warn the user that draft persistence is unavailable and proceed in degraded mode WITHOUT it (the design pass still works; FR-46's recovery guarantees do not apply this run). Do not invoke any tl_draft_* function in degraded mode. Otherwise resolve the draft path once: dpath="$(tl_draft_path tdd-author)".

  • If that command exits non-zero — neither CLAUDE_PLUGIN_DATA nor GROK_PLUGIN_DATA is set and writable, and tl_drafts_dir has printed a diagnostic to stderr — enter the same degraded mode: warn the user and proceed without persistence.
  • Otherwise pick exactly one of three mutually exclusive cases:
    1. tl_draft_exists tdd-author is true → a parseable draft is present. Run tl_draft_summary tdd-author and present its output to the user via a structured multiple-choice question with options Resume from draft / Discard and start fresh. PRD-drift check: compare git log -1 --format=%h -- docs/PRD.md (the short SHA of the PRD's last-touching commit — NOT git rev-parse --short HEAD docs/PRD.md, which parses the path as a revision and exits 128) to the draft's prd_rev_at_start; if they differ, add this line to the resume prompt: PRD has advanced since this draft was started (<old> → <new>). Your interview answers may no longer apply. — the user decides resume vs. discard with the drift surfaced. On resume, run tl_draft_read tdd-author and use its interview and draft_doc as your starting state (do NOT re-elicit anything already in interview); the draft already exists, so do NOT call tl_draft_init. If the user resumes DESPITE drift, re-run step 1's PRD-delta logic from the NEW PRD SHA and re-present the step-3 PLAN before authoring — the drift may change the TDD set. On discard, tl_draft_discard tdd-author.
    2. tl_draft_exists tdd-author is false BUT [ -f "$dpath" ] is true → a file is present but does not parse. Warn "found a draft at $dpath but it is not parseable — ignoring" and proceed as for no draft. Do NOT call tl_draft_init here; lazy init at step 5 overwrites the bad file atomically. (tl_draft_exists returns non-zero for BOTH "no file" AND "file present but unparseable", so the explicit [ -f "$dpath" ] test is what disambiguates them — without it this warning path is unreachable and a corrupt draft would be silently treated as "no draft".)
    3. Neither → no draft. Simply proceed; do NOT call tl_draft_init here.

Read the full file on GitHub · 602 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 First seen · 602 lines · 59 tokens per session scan A 9f33c262fd5a

Subscribe to this mod's changes

tdd-author is a skill published in the GitHub repository cahenesy/throughline (2 stars, last pushed 19d ago), licensed MIT. It adds 59 tokens to every session and 9,722 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

audit-context

Evaluates ambient context artifacts (CLAUDE.md, memory, local skills, settings hooks) for compatibility with swarm governance. Returns a classified report so users can address interference before launching a team.

DheerG/swarms · 42 tokens

agentic-workflow-audit

Use when reviewing or auditing an existing agent / LLM-pipeline architecture — e.g. 'is my workflow actually decomposed or secretly a mega-agent?', 'are my task boundaries and success criteria right?' — even without the word 'audit'. | 要檢視/review/稽核既有 agent 或 LLM pipeline 的架構,或問「有沒有拆好」「是不是變成 mega agent」「task…

s0912758806p/agentic-sop-to-work · 144 tokens

writing-mode

Writing mode operational spec for the team lead. Returns lead identity, facilitator identity, ownership boundaries, editorial baseline, suggest-members guidance, and phase arc for writing-mode teams.

DheerG/swarms · 37 tokens

general-mode

General mode operational spec for the team lead. Returns lead identity, facilitator identity, suggest-members guidance, and phase arc for general-purpose teams. The silent fallback when outcomes fit no specific mode, and a wrapper base for custom workflows — it has no shortcut command.

DheerG/swarms · 55 tokens

citation-receipts

Systematic per-citation verification protocol for academic writing. MUST be used whenever writing content that cites sources — papers, blog posts, SOTAs, or any document making factual claims about external work. Triggers (FR + EN) on any writing task involving references, citations, or bibliographic claims, or when…

roomi-fields/paper-trail · 174 tokens

charter

Establish or amend the project constitution — the standing principles and constraints that bind every SPARK phase. Use once at project start to give the team its ground rules, or any time a project-wide decision (stack choice, quality bar, non-negotiable) changes and should apply to all future features.

a-lottes/aSPARK · 64 tokens