C31-spec

C31-spec is a skill for Claude Code, Codex from ChianW/C31. It costs 38 tokens per session (1,334 once invoked), scanned A, original, MIT.

A requirements-first development workflow built around a PRD, or product requirements document. The PRD records what should be built before implementation begins.

In plain words
What is it for?
Use it for new projects, features, major changes, or work expected to take more than 30 minutes or change more than three files. It asks questions to define the requirements before code is written.
Why use it?
It reduces rework caused by coding before the goal, scope, and requirements are clear, and requires the result to be checked.

Skill for Claude CodeCodex

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

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/chianw/c31/c31-spec
Any agent
npx skills add ChianW/C31 --skill c31-spec
Clone the repo
git clone --depth 1 https://github.com/ChianW/C31

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/chianw/c31/c31-spec.svg)](https://agentmods.dev/skills/chianw/c31/c31-spec)
Your own site
<a href="https://agentmods.dev/skills/chianw/c31/c31-spec"><img src="https://agentmods.dev/badge/skills/chianw/c31/c31-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,334 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.1 $0.00038 $0.01334
Opus 5 $0.00019 $0.00667
Sonnet 5 $0.00008 $0.00267
Haiku 4.5 $0.00004 $0.00133

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

Security

Grade A, and why

C31-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 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/core/C31-spec/SKILL.md · 165 lines

How it starts

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

Multilingual Triggers

Language Trigger phrases
EN spec, 写需求, PRD, 产品文档, 定义项目
ZH 写需求, 产品需求, PRD
JA 仕様を書く, 要件定義, PRD作成

Output language: Respond automatically in the user's conversation language.

C31-spec — Spec-Driven Development Skill


Philosophy

Process not prose. Verification non-negotiable. Progressive disclosure.

Any new project, feature, or major change starts with a PRD. No exceptions. The PRD is the contract between intent and implementation. Writing it is cheaper than debugging what you should have decided upfront.


When to Activate

  • User says: "I want to build...", "I want to develop...", "This project..."
  • User jumps straight to implementation without defining scope
  • Any task that will take >30 minutes or modify >3 files
  • Any new skill, tool, or workflow

Workflow

1. Detect & Interrupt

If user skips spec and goes straight to code:

"Hold on. Write the PRD first, then write the code. That's the rule."

"Code without a PRD = unconstrained improvisation = rework."

2. Elicit Requirements (Progressive Disclosure)

Ask 5 questions, one at a time, in order:

  1. Goal: What problem does this solve? Who is the user? What is the success criterion?
  2. Command / Interface: How does the user invoke it? CLI command? API endpoint? Chat trigger word?
  3. Structure: What files / modules / tables are needed? What is the core data flow?
  4. Code style: Consistent with existing code conventions? What language / framework?
  5. Boundaries: Explicitly state what is not in scope. Resist scope temptations.

3. Write PRD

PRD template (required fields):

# PRD: [Project Name]

## Goal
- Problem statement (one sentence)
- Success criteria (2-3 verifiable items)

## Command / Interface
- How to trigger:
- Input parameters:
- Output format:

## Structure
- File list:
- Data flow:
- Dependencies:

## Code Style
- Language / Framework:
- Naming conventions:
- Integration points with the existing project:

## Testing
- How to verify "success criteria":
- At least 1 test case:

## Boundaries (explicitly excluded)
- Not doing X:
- Not doing Y:
- If the user requests these later, a new PRD must be opened

Read the full file on GitHub · 165 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 165 lines · 38 tokens per session scan A c31929d64f75

Subscribe to this mod's changes

C31-spec is a skill published in the GitHub repository ChianW/C31 (1 stars, last pushed 10d ago), licensed MIT. It adds 38 tokens to every session and 1,334 once invoked, about $0.0002 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

compare-harnesses

Diff two scaffolded harnesses (ADR-031). Reports manifest meta drift + host list + per-file fingerprint changes (added/removed/changed). Exits 0 IDENTICAL, 1 DRIFT, 2 missing manifest. Use --bundle for the ADR-031 schema-1 JSON envelope.

ruvnet/metaharness · 66 tokens

diag-harness

Kernel-version skew check (ADR-027). Reports manifest surface + manifest kernel + installed kernel + verdict (match/patch-diff/minor-diff/major-diff). Exits 1 on minor/major skew with a copy-pasteable npm install @metaharness/[email protected] next step. Exits 2 if no .harness/manifest.json at path.

ruvnet/metaharness · 85 tokens

oia-manifest

Emit .harness/oia-manifest.json declaring layer alignment with the OIA v0.1 9-layer reference architecture. Self-describes the harness's MCP wiring, witness signing, audit log, identity posture (always 'none' at v0.1). --check verifies an existing manifest, --dry-run prints without writing, --json emits to stdout.

ruvnet/metaharness · 79 tokens

create-harness

Scaffold your own focused AI agent harness — pick host (Claude Code, Codex, pi.dev, Hermes), template, agents, skills, and ship a npm-publishable harness with its own npx CLI. Use when a user asks to "create my own agent harness", "scaffold a harness", "make a custom Claude Code plugin like ruflo", or "build a…

ruvnet/metaharness · 89 tokens

example-harness

Scaffold a ready-made AI agent harness in one command from the 19 published @metaharness/ example packages — 9 host integrations (Claude Code, Codex, Hermes, pi.dev, OpenClaw, RVM, Copilot, OpenCode, GitHub Actions) + 10 vertical pods (devops, research, trading, support, legal, coding, education, sales, gaming…

ruvnet/metaharness · 90 tokens

repo-genome

7-section readiness scorecard for a LOCAL repo. Reports repo type + agent topology + MCP risk + test confidence + release readiness + recommended harness plan + scorecard. Exit 0 ready, 1 needs-work, 2 blocked. --json for the 6-field scorecard, --bundle for the ADR-031 schema-1 envelope.

ruvnet/metaharness · 73 tokens