spec

A planning workflow that turns a vague feature request into a written specification and an implementation plan before code changes begin.

In plain words
What is it for?
Use it to explore possible approaches, define what is out of scope, write `.agent/plans/spec.md` and `plan.md`, and obtain approval before implementation.
Why use it?
It prevents unclear requirements and unapproved work from leading to wasted implementation. A built-in gate blocks editing until the plan is approved.

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

Made for: Claude Code, Codex.

Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,168 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.00076 $0.02168
Opus 5 $0.00038 $0.01084
Sonnet 5 $0.00015 $0.00434
Haiku 4.5 $0.00008 $0.00217

Measured 2d ago against content hash 839e145a22d2, 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 · 187 lines

How it starts

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

/spec

Goal

Turn a fuzzy request into two committed artifacts — a spec (what/why) and a plan (how, in waves) — before any implementation edit, then hand the plan to the user for approval. Approval is what unlocks editing: plan-gate.py writes the plan-approval flag, and spec-gate.py (a PreToolUse gate) stops asking once that flag exists.

This skill supplies the methodology; the enforcement is a tool boundary. You cannot prompt your way past spec-gate — you produce the artifacts and get the plan approved, or you flip the mode. That separation is the point.

Steps

1. Brainstorm

Explore the request before committing to a shape:

a. Restate the request in one sentence and name the success criterion. b. Surface the 2-3 plausible approaches and the tradeoff between them; pick one and say why. If the request is ambiguous, ask — don't guess. c. List what's explicitly out of scope (prevents scope creep later).

--interview — opt-in deep-interview submode

The default brainstorm is a single pass. /spec <slug> --interview replaces step 1b's one-shot "ask if ambiguous" with a structured question loop for requests fuzzy enough that a wrong guess commits the whole spec to the wrong shape. It is opt-in by design: simple requests keep the single pass, and the enforcement story is untouched — the spec-gate tool boundary neither knows nor cares which submode produced the artifacts.

  1. Unknowns table. List every unknown in the request; mark each decision-changing (Y/N) — would different answers produce different specs? N-unknowns are implementation details; leave them to the plan.
  2. Batch-question the Y rows only — at most 4 questions per round, each naming the options and your recommended default.
  3. Re-score after the answers. Answers resolve rows and surface new unknowns; add those to the table and mark them Y/N. This is the decision-tree pruning: each round should shrink the Y set.
  4. Terminate on either condition (whichever comes first):
    • the table has zero open decision-changing unknowns, or
    • 3 rounds have run. Unresolved rows carry into spec.md under ## Open questions — named and deferred beats silently guessed.

Read the full file on GitHub · 187 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. 2d ago First seen · 187 lines · 76 tokens per session scan A 839e145a22d2

Subscribe to this mod's changes

spec is a skill published in the GitHub repository joymin5655/Agent (2 stars, last pushed 8d ago), licensed MIT. It adds 76 tokens to every session and 2,168 once invoked, about $0.0004 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

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

shell-scripting

Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.

alibaba/anolisa · 60 tokens

agent-vitals

Introspect the user's local AI agent infrastructure in real time. Use proactively: before starting tasks, before scheduling cron/timer work, when stuck, after long tasks, or when claiming something works. Exposes tools: vitalssummary, shadowlist, shadowstale, burnoutsummary, burnoutstucksessions.

anirudhprashant/agent-vitals · 68 tokens

docs

Access and update the user's Docs vaults. Use whenever the user asks to read, find, create, update, or store a note, document, plan, or HTML artifact; when a Docs @-mention appears in context; or when an answer should link to a document the user can open in Docs.

get-bb/bb · 64 tokens

bb-cli

Use this when controlling bb. The bb CLI inspects and manages threads, environments, projects, machines, providers, skills, plugins, settings, terminals, and other BB services.

get-bb/bb · 39 tokens

memory

Use durable BB memory when prior project knowledge or cross-project user preferences can improve the current task, and save durable new learning through the bb memory CLI.

get-bb/bb · 32 tokens