duet-agent: Skill for Claude Code

.agents/skills/write-spec/SKILL.md

write-spec is a skill for Claude Code, Codex from dzhng/duet-agent. It costs 176 tokens per session (4,069 once invoked), scanned A, a copy of write-spec, Apache-2.0.

A planning method that breaks a large software feature into small, independently checkable pieces. Each piece has a clear contract, meaning an agreed input, output, and expected behavior.

In plain words
What is it for?
For planning feature work, defining API boundaries, preparing browser-checkable milestones, researching unknown requirements, and creating staged implementation plans.
Why use it?
It makes risky or complicated work easier to review and test before the entire feature is finished.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents); mentions Codex.

This is dzhng/duet-agent's own configuration. It tells Claude Code and Codex how to work on duet-agent 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 duet-agent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dzhng/duet-agent. 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/dzhng/duet-agent/main/.agents/skills/write-spec/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/dzhng/duet-agent

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 write-spec

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dzhng/duet-agent/write-spec"><img src="https://agentmods.dev/badge/skills/dzhng/duet-agent/write-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,069 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 95% 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.00176 $0.04069
Opus 5.5 $0.00070 $0.01628
Sonnet 5.5 $0.00035 $0.00814
Haiku 4.5 $0.00018 $0.00407

Measured 25d ago against content hash db6e9e9d3c6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-spec 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 25d 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

95% identical to write-spec — 12 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.

.agents/skills/write-spec/SKILL.md · 299 lines

How it starts

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

Write Spec

Turn a large feature into a ladder of small contracts. Each rung should be understandable to the human, testable by an agent, and useful before the whole feature is done.

First Principles

  1. Grill before planning. Ask one question at a time until you know the desired outcome, non-goals, review surface, sacred contracts, missing assets, and first useful playable checkpoint. Give your recommended answer with each question so the user can accept, reject, or edit it. Inspect the repo instead of asking questions the code can answer. Close the interview by asking whether the plan must carry backward compatibility or data migrations — the default is neither: hard cutovers, no compat shims, no migration scaffolding, no deploy-order dances. Only the user opting in puts them in the plan.

  2. Slice at API seams. Each slice should behave like a tiny library where possible: named module boundary, typed inputs/outputs, deterministic fixtures, and tests at the seam. If a slice needs three unrelated systems booted before it can be checked, sharpen the seam.

  3. Research the fog. When the feature depends on an unfamiliar domain, high-fidelity visual target, named reference, benchmark, external repo, library, or "how do people usually do this?" question, do targeted online research before finalizing slices. Prefer primary sources: official docs, source repos, papers, case studies, talks, and shipped examples. If a reference implementation exists, add a replication spike before translation or approximation.

  4. Make progress visible. For visual or interactive work, every slice should produce something playable: a route, fixture page, harness, CLI probe, or HTML visualization the human can run, inspect, screenshot, and critique. Tests prove contracts; demos expose taste and intent.

  5. Optimize feedback loops. Slice so the next useful question can be answered quickly. Prefer tiny runnable surfaces, hot-reloadable harnesses, sample fixtures, and self-contained workbenches over plans that require the whole feature to exist before anyone can learn from it. For asset-heavy work, plan an asset app/workbench where humans and artists can add samples, upload replacements, preview them live, and see validation failures fast.

Read the full file on GitHub · 299 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. 25d ago Changed · +19 lines · +1 tokens per session db6e9e9d3c6f
  2. 1mo ago First seen · 280 lines · 175 tokens per session scan A c6d55314ca9c

Subscribe to this mod's changes

write-spec is a skill published in the GitHub repository dzhng/duet-agent (52 stars, last pushed 7d ago), licensed Apache-2.0. It adds 176 tokens to every session and 4,069 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to write-spec, differing in 12 lines, and is treated as a copy.

Related

Other skills, from other repositories