spec

spec is a command for Claude Code from owainlewis/youtube-tutorials. It costs 0 tokens per session (672 once invoked), scanned A, original, MIT.

A command that creates a written specification for an AI-assisted coding task. The specification records the problem, expected result, relevant files, constraints, tasks, and checks.

In plain words
What is it for?
Use it before asking an AI agent to build a feature. It creates a structured file under .ai/specs with implementation tasks and verification steps.
Why use it?
It turns a feature request into a shared plan before implementation, making the work and its completion criteria clearer.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md.

Good fit Use it before asking an AI agent to build a feature. It creates a structured file under .ai/specs with implementation tasks and verification steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/owainlewis/youtube-tutorials/spec
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.

Clone the repo
git clone --depth 1 https://github.com/owainlewis/youtube-tutorials

Made for: Claude Code.

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/owainlewis/youtube-tutorials/spec/github.svg)](https://agentmods.dev/commands/owainlewis/youtube-tutorials/spec)
Your own site
<a href="https://agentmods.dev/commands/owainlewis/youtube-tutorials/spec"><img src="https://agentmods.dev/badge/commands/owainlewis/youtube-tutorials/spec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spec

Your own site · 80×15
<a href="https://agentmods.dev/commands/owainlewis/youtube-tutorials/spec"><img src="https://agentmods.dev/badge/commands/owainlewis/youtube-tutorials/spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 672 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.00672
Opus 5.5 $0.00000 $0.00269
Sonnet 5.5 $0.00000 $0.00134
Haiku 4.5 $0.00000 $0.00067

Measured 1mo ago against content hash 9b2aa8eb869c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

tutorials/spec-driven-development/resources/commands/spec.md · 113 lines

How it starts

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

Spec

Generate a specification for AI-assisted implementation.

Feature

$ARGUMENTS

Instructions

Read CLAUDE.md first. Ask only if blocked.

Create .ai/specs/<feature-slug>.md:

# Feature Name

## Why

[1-2 sentences: Problem solved. Why now.]

## What

[Concrete deliverable. How you'll know it's done.]

## Context

**Relevant files:**
- `path/to/file.ts` — [what it does]
- `path/to/other.ts` — [why it matters]

**Patterns to follow:**
- [Existing convention to match, with example file]

**Key decisions already made:**
- [Tech choices, libraries, approaches locked in]

## Constraints

**Must:**
- [Required patterns/conventions]

**Must not:**
- [No new dependencies unless specified]
- [Don't modify unrelated code]
- [Don't refactor existing code]

**Out of scope:**
- [Adjacent features explicitly not included]

## Tasks

Break into tasks that:
- Can each be completed in one session
- Have a clear verify step
- Are safe to commit independently

### T1: [Noun phrase — what gets built]

**Do:** [Specific changes]

**Files:** `path/to/file`, `path/to/test`

**Verify:** `command` or "Manual: [check]"

### T2: [Title]
...

## Done

[End-to-end verification after all tasks]

- [ ] `build/test command passes`
- [ ] Manual: [what to verify in UI/API]
- [ ] No regressions in [related area]

Guidelines

Sizing tasks:

  • Group changes that must ship together (schema + types + migration = 1 task)
  • Split at natural commit boundaries
  • If a task might hit context limits, it's too big

Writing good verify steps:

  • Prefer commands over manual checks
  • Manual checks should be specific: "Click X, see Y" not "verify it works"
  • Include the unhappy path when relevant

Context section tips:

  • List only files the agent will actually touch or need to reference
  • "Patterns to follow" with a concrete example file beats abstract description
  • Capture decisions so the agent doesn't re-litigate them

When to skip sections:

  • Trivial features (< 3 files): inline everything, skip Context
  • Bug fixes: Why + What + single Task may suffice
  • Spikes/exploration: just Why + What + time box

Read the full file on GitHub · 113 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. 1mo ago First seen · 113 lines · 0 tokens per session scan A 9b2aa8eb869c

Subscribe to this mod's changes

spec is a command published in the GitHub repository owainlewis/youtube-tutorials (408 stars, last pushed 27d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 672 tokens. 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.