to-spec

to-spec is a command for Claude Code from JobsHwang/skills. It costs 25 tokens per session (393 once invoked), scanned A, original, MIT.

A command that turns agreed product requirements or a PRD into an actionable technical delivery contract. This contract describes the software behaviour and boundaries needed to build the change, based on the existing repository.

In plain words
What is it for?
Use it to define observable behaviour, interfaces, data flow, errors, compatibility expectations, and relevant repository constraints before development begins.
Why use it?
It connects product decisions to implementation work while recording assumptions and open questions instead of silently guessing about them.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions AGENTS.md.

Good fit Use it to define observable behaviour, interfaces, data flow, errors, compatibility expectations, and relevant repository constraints before development begins.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jobshwang/skills/to-spec
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.

Clone the repo
git clone --depth 1 https://github.com/JobsHwang/skills

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/jobshwang/skills/to-spec"><img src="https://agentmods.dev/badge/commands/jobshwang/skills/to-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 393 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.00025 $0.00393
Opus 5 $0.00013 $0.00197
Sonnet 5 $0.00005 $0.00079
Haiku 4.5 $0.00003 $0.00039

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

Security

Grade A, and why

to-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 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.

adapters/opencode/commands/to-spec.md · 28 lines

What it actually says

The user explicitly invoked /to-spec.

Invocation arguments: $ARGUMENTS

To Spec

Produce a technical delivery contract, not an implementation transcript.

  1. Use the current conversation or supplied PRD as the product source. Do not repeat requirement discovery unless one unresolved decision would invalidate the design.
  2. Inspect the repository, its AGENTS.md or equivalent instructions, existing implementation seams, build configuration, and relevant tests before designing.
  3. Resolve durable coding-spec roots in this order:
    • an explicit project convention or configured path;
    • .agents/spec;
    • .trellis/spec;
    • docs/spec.
  4. Read only the relevant durable specs. If an existing project uses .trellis/spec, keep it canonical; do not create .agents/spec beside it. For a new project with no established root, .agents/spec is the neutral default.
  5. Use references/spec-template.md selectively and consult references/delivery-surfaces.md only for surfaces present in the change.
  6. Ground decisions in repository evidence. State assumptions and open questions instead of inventing facts.
  7. Specify observable behavior, boundaries, contracts, data flow, errors, compatibility, migration, and proportionate verification. Avoid line-by-line implementation instructions.

Write beside the source PRD when possible. Otherwise use .scratch/<feature>/spec.md. Working PRDs and delivery specs stay under .scratch; durable coding conventions stay in the resolved spec root. Never migrate or duplicate a Trellis spec tree silently.

Do not implement. Report the path and the main design decisions. Suggest slice-spec only when the work is too large for one coherent delivery session, crosses several independently risky seams, or needs staged rollout.

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 · 28 lines · 25 tokens per session scan A bcfc806de3ca

Subscribe to this mod's changes

to-spec is a command published in the GitHub repository JobsHwang/skills (2 stars, last pushed 6d ago), licensed MIT. It adds 25 tokens to every session and 393 once invoked, about $0.0001 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.