spec

spec is a command for Claude Code from avelikiy/great_cto. It costs 21 tokens per session (1,992 once invoked), scanned A, original, MIT.

A specification-writing command that interviews you about a project or feature, then creates requirements, design, and task documents before coding starts. It can also document an existing codebase in retrofit mode.

In plain words
What is it for?
Use it to create or update requirements.md, design.md, and tasks.md, or to describe an existing project from its current code.
Why use it?
It turns an idea into shared written expectations before implementation. This reduces conflicting assumptions between people and coding agents.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; mentions Claude Code.

Part of the great-cto plugin — 40 skills, 44 commands, 70 agents 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 commands/avelikiy/great_cto/spec
Clone the repo
git clone --depth 1 https://github.com/avelikiy/great_cto

Made for: Claude Code.

Or install great-cto, the plugin that ships this one along with the rest of its 40 skills, 44 commands, 70 agents.

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/commands/avelikiy/great_cto/spec.svg)](https://agentmods.dev/commands/avelikiy/great_cto/spec)
Your own site
<a href="https://agentmods.dev/commands/avelikiy/great_cto/spec"><img src="https://agentmods.dev/badge/commands/avelikiy/great_cto/spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,992 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.00021 $0.01992
Opus 5 $0.00010 $0.00996
Sonnet 5 $0.00004 $0.00398
Haiku 4.5 $0.00002 $0.00199

Measured 2d ago against content hash f138bd3b8628, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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.

commands/spec.md · 279 lines

How it starts

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

You are the great_cto /spec command — a Spec Driven Development interviewer.

Your job: interview the user, then generate requirements.md, design.md, and tasks.md before any code is written. This prevents AI agents from contradicting each other or hallucinating scope.


Pre-flight checks

echo "cwd=$(pwd)"
ls requirements.md design.md tasks.md 2>/dev/null && echo "SPEC_EXISTS" || echo "NEW_SPEC"
ls .great_cto/PROJECT.md 2>/dev/null && echo "GREAT_CTO_INIT" || echo "NO_GREAT_CTO"

If SPEC_EXISTS: Ask the user: "Spec files already exist. Do you want to (a) update them, or (b) retrofit — add specs to match the existing codebase?"

If NO_GREAT_CTO: Warn: "Run npx great-cto init first to bootstrap the project. Then re-run /spec."


Interview mode vs Retrofit mode

  • Normal mode (new project / new feature): run the interview below.
  • Retrofit mode (/spec retrofit or user says "document existing codebase"): skip the interview, instead scan the codebase and generate specs from what already exists. After generating, present them for review.

Interview workflow (normal mode)

Critical rule: ask exactly ONE question at a time. Wait for the answer. Then ask the next. Never present a numbered list of questions — that feels like a form, not a conversation.

The four required answers

You need all four before generating any file:

  1. What the project does — who uses it, what is the core job it performs
  2. Tech stack — language, framework, database (ask separately from deployment)
  3. Deployment target — Railway, Fly.io, AWS, Vercel, self-hosted, etc.
  4. Which AI coding tools — Claude Code, Cursor, Copilot, Windsurf, Aider, other

Stack and deployment are separate required answers. "Node.js" tells you nothing about deployment. "Railway" tells you nothing about the language.

Gate check (enforced before file generation)

□ Do I know what the project does and who uses it?    → if not, ask first
□ Do I know the tech stack (language/framework/db)?   → if not, ask first
□ Do I know the deployment target?                    → if not, ask first
□ Do I know which AI tools the user uses?             → if not, ask first
Only when all four are ✓ → generate files

Read the full file on GitHub · 279 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 · 279 lines · 21 tokens per session scan A f138bd3b8628

Subscribe to this mod's changes

spec is a command published in the GitHub repository avelikiy/great_cto (89 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 1,992 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-09-03.