spec

spec is a skill for Claude Code, Codex from ao92265/claude-code-playbook. It costs 67 tokens per session (513 once invoked), scanned A, original, MIT.

A short planning format for turning a vague coding request into a clear specification covering the current situation, goal, limits, and checks for success.

In plain words
What is it for?
Use it before multi-file features, refactors, or other non-trivial coding work that needs a shared scope.
Why use it?
It prevents unnecessary changes to working code and makes the expected validation explicit before implementation begins.

Skill for Claude CodeCodex

Part of the playbook plugin — 49 skills, 4 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/ao92265/claude-code-playbook/spec
Any agent
npx skills add ao92265/claude-code-playbook --skill spec
Clone the repo
git clone --depth 1 https://github.com/ao92265/claude-code-playbook

Made for: Claude Code, Codex.

Or install playbook, the plugin that ships this one along with the rest of its 49 skills, 4 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 spec

README.md
[![agentmods](https://agentmods.dev/badge/skills/ao92265/claude-code-playbook/spec.svg)](https://agentmods.dev/skills/ao92265/claude-code-playbook/spec)
Your own site
<a href="https://agentmods.dev/skills/ao92265/claude-code-playbook/spec"><img src="https://agentmods.dev/badge/skills/ao92265/claude-code-playbook/spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 513 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.00067 $0.00513
Opus 5 $0.00034 $0.00257
Sonnet 5 $0.00013 $0.00103
Haiku 4.5 $0.00007 $0.00051

Measured 5d ago against content hash 1fdd4cefc3fb, 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 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/spec/SKILL.md · 48 lines

What it actually says

Spec

Turns a vague request into a four-part specification before any code is written. Prevents the two recurring failures: vague scope (agent rewrites working modules) and missing validation (green CI theater).

When to use

  • Before non-trivial implementation (multi-file, refactor, new feature).
  • When a request reads like a conversation ("improve the API") instead of a spec.

Skip for: one-line fixes, lookups, trivial edits.

The four parts (ALL required)

Fill every section. A blank section means STOP and ask — do not guess.

  1. Context — What exists right now. Exact file paths, current behavior, relevant constraints. No "the codebase" — name the files.
  2. Objective — What the change must accomplish, NOT what the code should look like. Describe the outcome, let the implementation follow.
  3. Boundaries — What must NOT change. Files off-limits, behaviors to preserve, external interfaces/schemas frozen. Always include an explicit "do not modify outside X" line.
  4. Validation — How to confirm it works. Exact test/build command + expected result. New behavior requires new tests.

Template

Context: <files + current behavior + constraints>

Objective: <outcome to achieve — not code shape>

Boundaries: Do not modify <files>. Do not change <behavior/schema>.

Validation: Run <command>. <expected pass condition>. Add tests for <new behavior>.

Rules

  • Objective describes outcome, never implementation detail ("validate disposable emails", not "add a regex").
  • Boundaries names real paths from the repo — verify they exist before listing them.
  • Validation command must be runnable and its pass/fail observable. No "make sure it works".
  • Respects existing repo caps (e.g. bugfix ~50-line / one-concern limits) — fold them into Boundaries.

Output

The filled spec, ready to hand to an executor or run inline. No preamble. If a section can't be filled from available context → single batched question, then fill and proceed.

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 · 48 lines · 67 tokens per session scan A 1fdd4cefc3fb

Subscribe to this mod's changes

spec is a skill published in the GitHub repository ao92265/claude-code-playbook (10 stars, last pushed 18d ago), licensed MIT. It adds 67 tokens to every session and 513 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens