spec

A technical-specification helper that writes an RFC, a document explaining a proposed technical change and the decision behind it. It records alternatives, trade-offs, migration, and rollback plans before coding starts.

In plain words
What is it for?
Use it for complex or specially flagged features that need options, risks, a chosen approach, and a change plan before implementation.
Why use it?
It makes important design decisions reviewable and documents how to introduce or undo a non-trivial feature.

Skill for Claude CodeCodex

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/pillip/claude-dev-kit/spec
Any agent
npx skills add pillip/claude-dev-kit --skill spec
Clone the repo
git clone --depth 1 https://github.com/pillip/claude-dev-kit

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,964 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.00047 $0.01964
Opus 5 $0.00023 $0.00982
Sonnet 5 $0.00009 $0.00393
Haiku 4.5 $0.00005 $0.00196

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

Security

Grade A, and why

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 2d 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/spec/SKILL.md · 151 lines

How it starts

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

Kit Preamble — spec

Kit Script Root

Kit root: ${CLAUDE_PLUGIN_ROOT}

  • Absolute path above → plugin install (substituted at load time; no project scripts/ dir): prefix every kit script command with it, e.g. bash <kit-root>/scripts/checkpoint.sh …. Absolute paths also work from worktrees.
  • Literal ${…} placeholder above → standalone layout: run commands as written.

Project Context Detection

Run these checks silently at the start. Use results to adapt behavior:

  • [ -f issues.md ] — if true, this project uses the sprint system. Respect issue numbering and STATUS.md.
  • [ -f docs/sprint_state.md ] — if true and Status shows running, a sprint is active. Be aware of parallel work in worktrees.
  • [ -f docs/prd_digest.md ] — if true, read it for quick project context before starting.

Kit Rules

  • Verify gh auth status before any GitHub operation. Goal: produce a reviewable SPEC document that captures the decision behind a non-trivial feature before code is written. Two callers expect this skill:
  • The user directly: /spec ISSUE-NNN or /spec (ad-hoc).
  • /implement in sprint mode: auto-invokes this skill for issues flagged Spec-Required: true.

Algorithm

Phase 1 — Resolve target

  1. Parse $ARGUMENTS:

    • If contains ISSUE-NNN: this is an issue-linked SPEC. Set mode=linked, issue_id=ISSUE-NNN.
    • If empty (or only --rewrite): this is an ad-hoc SPEC. Set mode=adhoc.
    • Check for --rewrite flag; if present, set rewrite=true.
  2. Determine SPEC number:

    • mode=linked: spec_num = the numeric part of issue_id (e.g., ISSUE-007 → SPEC-007).
    • mode=adhoc: scan docs/specs/ for existing SPEC-NNN.md files, take the max NNN, increment by 1. If no specs exist, start at SPEC-001.
  3. Compute target path: docs/specs/SPEC-<NNN>.md.

  4. Check existence:

    • If file exists AND rewrite=false: refuse with message:
      docs/specs/SPEC-NNN.md already exists.
      Re-run with --rewrite to regenerate (the previous file will be overwritten).
      
      STOP.
    • If file exists AND rewrite=true: proceed; warn that the previous version will be overwritten.
    • If file does not exist: proceed.

Read the full file on GitHub · 151 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. 2d ago First seen · 151 lines · 47 tokens per session scan A 0f160267448c

Subscribe to this mod's changes

spec is a skill published in the GitHub repository pillip/claude-dev-kit (11 stars, last pushed 16d ago), licensed MIT. It adds 47 tokens to every session and 1,964 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-30.

Related

Other skills, from other repositories

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

peer-review

Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating…

xintaofei/codeg · 71 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

taiyi-integration

TaiyiForge 第9阶段 — 闭环归档,CHANGELOG.md。四端通用。.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-ui-design

TaiyiForge 第 4 阶段 — UI/UX 契约,产出 UI-DESIGN.md。四端通用。.

Dong90/oh-my-taiyiforge · 35 tokens