spec

spec is a command for coding agents from juanmhidalgo/claude-plugins. It costs 29 tokens per session (2,124 once invoked), scanned A, original, MIT.

A guided workflow for turning unclear or wide-ranging feature requests into a written specification before coding.

In plain words
What is it for?
Use it to investigate repository context, identify the feature's scope, and prepare a specification for review.
Why use it?
It helps clarify the work's scope and requirements before implementation begins, reducing misunderstandings and rework.

Command

Part of the feature-dev plugin — 2 skills, 6 commands, 12 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/juanmhidalgo/claude-plugins/spec
Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Or install feature-dev, the plugin that ships this one along with the rest of its 2 skills, 6 commands, 12 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/juanmhidalgo/claude-plugins/spec.svg)](https://agentmods.dev/commands/juanmhidalgo/claude-plugins/spec)
Your own site
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/spec"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,124 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.00029 $0.02124
Opus 5 $0.00015 $0.01062
Sonnet 5 $0.00006 $0.00425
Haiku 4.5 $0.00003 $0.00212

Measured yesterday against content hash 6f530e7dfc31, 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 yesterday.

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.

feature-dev/commands/spec.md · 167 lines

How it starts

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

Context

  • Branch: !git branch --show-current
  • Recent commits: !git log --oneline -5
  • Additional directories: !jq -r '.permissions.additionalDirectories[]? // empty' .claude/settings.local.json 2>/dev/null || true
  • Parent context file: !test -f ../CLAUDE.md && echo "../CLAUDE.md exists (read for repo catalog)" || echo "no ../CLAUDE.md"

<best_practices> @feature-dev/skills/spec-driven-development/SKILL.md </best_practices>

Recommended: run in plan mode (Shift+Tab to toggle) so you can review the spec before any files are written.

Spec-Driven Development Workflow

You are creating a structured specification for: $ARGUMENTS

Follow the gated workflow. Each phase requires user review before advancing.

Phase 1: Specify

  1. Detect multi-repo scope (runs silently — feeds into step 2). A feature is multi-repo only when the description clearly spans concerns owned by different repos (e.g., "API + UI", "service + worker"). Confirm that first, then corroborate with at least one infrastructure signal:

    • Signal A (required): the feature description spans concerns owned by different repos.
    • Signal B: additionalDirectories (Context block above) lists sibling repos as accessible.
    • Signal C: ../CLAUDE.md exists and catalogs sibling repos with their purpose — read it to learn the repo set.

    Treat as multi-repo only when A AND (B OR C) hold. additionalDirectories alone is a false positive (users grant access for reference, not feature scope). If only one repo is in scope, skip the multi-repo sections (frontmatter repos:, "Cross-Repo Contracts", repo task tags) for the rest of this phase.

  2. Surface assumptions. List 3-5 assumptions you're making about the tech stack, architecture, and scope. For multi-repo features, include the inferred repo set as one of the assumptions (e.g., "Scope: + "). Ask the user to confirm or correct — single round-trip.

Read the full file on GitHub · 167 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. yesterday First seen · 167 lines · 29 tokens per session scan A 6f530e7dfc31

Subscribe to this mod's changes

spec is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 10d ago), licensed MIT. It adds 29 tokens to every session and 2,124 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.