spec-generator

spec-generator is a skill for Claude Code from catlog22/Claude-Code-Workflow. It costs 47 tokens per session (4,232 once invoked), scanned A, original, MIT.

A document-generation workflow for turning an idea into a product brief, product requirements document, architecture plan, epics, and issues. A product requirements document describes what a product should do and the constraints it must meet.

In plain words
What is it for?
Use it to create product specifications, expand requirements, define data models, document architecture decisions, and break work into epics and issues.
Why use it?
It organizes discovery and requirements before implementation begins. This reduces missing details and gives later planning or execution workflows a shared specification to use.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Codex; mentions Gemini CLI.

Good fit Use it to create product specifications, expand requirements, define data models, document architecture decisions, and break work into epics and issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/catlog22/claude-code-workflow/spec-generator
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.

Any agent
npx skills add catlog22/Claude-Code-Workflow --skill spec-generator
Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

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-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/catlog22/claude-code-workflow/spec-generator/github.svg)](https://agentmods.dev/skills/catlog22/claude-code-workflow/spec-generator)
Your own site
<a href="https://agentmods.dev/skills/catlog22/claude-code-workflow/spec-generator"><img src="https://agentmods.dev/badge/skills/catlog22/claude-code-workflow/spec-generator/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-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/catlog22/claude-code-workflow/spec-generator"><img src="https://agentmods.dev/badge/skills/catlog22/claude-code-workflow/spec-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,232 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.00047 $0.04232
Opus 5.5 $0.00019 $0.01693
Sonnet 5.5 $0.00009 $0.00846
Haiku 4.5 $0.00005 $0.00423

Measured 1mo ago against content hash 4912ef2e16ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spec-generator 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.

.claude/skills/spec-generator/SKILL.md · 339 lines

How it starts

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

Spec Generator

Structured specification document generator producing a complete specification package (Product Brief, PRD, Architecture, Epics) through 6 sequential phases with multi-CLI analysis and interactive refinement. Document generation only - execution handoff to existing workflows (lite-plan, plan, req-plan).

Architecture Overview

Phase 0:   Specification Study (Read specs/ + templates/ - mandatory prerequisite)
           |
Phase 1:   Discovery               -> spec-config.json + discovery-context.json
           |                           (includes spec_type selection)
Phase 1.5: Req Expansion           -> refined-requirements.json (interactive discussion + CLI gap analysis)
           |                           (-y auto mode: auto-expansion, skip interaction)
Phase 2:   Product Brief            -> product-brief.md + glossary.json  (multi-CLI parallel analysis)
           |
Phase 3:   Requirements (PRD)      -> requirements/  (_index.md + REQ-*.md + NFR-*.md)
           |                           (RFC 2119 keywords, data model definitions)
Phase 4:   Architecture            -> architecture/  (_index.md + ADR-*.md, multi-CLI review)
           |                           (state machine, config model, error handling, observability)
Phase 5:   Epics & Stories         -> epics/  (_index.md + EPIC-*.md)
           |
Phase 6:   Readiness Check         -> readiness-report.md + spec-summary.md
           |                           (terminology + scope consistency validation)
           ├── Pass (>=80%): Handoff to execution workflows
           ├── Review (60-79%): Handoff with caveats
           └── Fail (<60%): Phase 6.5 Auto-Fix (max 2 iterations)
                 |
Phase 6.5: Auto-Fix               -> Updated Phase 2-5 documents
                 |
                 └── Re-run Phase 6 validation

Key Design Principles

  1. Document Chain: Each phase builds on previous outputs, creating a traceable specification chain from idea to executable stories
  2. Multi-Perspective Analysis: CLI tools (Gemini/Codex/Claude) provide product, technical, and user perspectives in parallel
  3. Interactive by Default: Each phase offers user confirmation points; -y flag enables full auto mode
  4. Resumable Sessions: spec-config.json tracks completed phases; -c flag resumes from last checkpoint
  5. Template-Driven: All documents generated from standardized templates with YAML frontmatter
  6. Pure Documentation: No code generation or execution - clean handoff to existing execution workflows
  7. Spec Type Specialization: Templates adapt to spec type (service/api/library/platform) via profiles for domain-specific depth
  8. Iterative Quality: Phase 6.5 auto-fix loop repairs issues found in readiness check (max 2 iterations)
  9. Terminology Consistency: glossary.json generated in Phase 2, injected into all subsequent phases

Read the full file on GitHub · 339 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 · 339 lines · 47 tokens per session scan A 4912ef2e16ba

Subscribe to this mod's changes

spec-generator is a skill published in the GitHub repository catlog22/Claude-Code-Workflow (2,124 stars, last pushed 4mo ago), licensed MIT. It adds 47 tokens to every session and 4,232 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

spawn-agent

Spawn worker agents (Gemini CLI or Codex CLI) to keep main context clean. Use for implementation, codebase research, context gathering, or any scoped work that would pollute the orchestrator's context.

khanhbkqt/spawn-agent · 46 tokens

newsroom-style

Apply AP Style and common newsroom conventions when writing or editing news articles, briefs, and headlines. Use when drafting publishable copy, editing contributor submissions, or converting informal notes into news-ready language.

jamditis/mooc-starter-kit · 43 tokens

beat-brief

Draft a short daily beat briefing from a folder of incoming source documents. Use when the reporter wants a five-bullet summary of the day's material with attribution flags and follow-up actions.

jamditis/mooc-starter-kit · 40 tokens

first-skill

Minimal skill template that students copy and customize to create their first Claude Code skill. Use this as the starting point when building a new custom skill for a specific beat or workflow.

jamditis/mooc-starter-kit · 39 tokens

skill-dispatcher

Universal MCP skill dispatcher for AI coding agents. Loads Claude Code, OpenCode, Cursor, Gemini-style, command, plain markdown, and GitHub-hosted skills on demand. Includes agent routing, active skill lifecycle tracking, external repo import, nested skill discovery, origin filtering, and hardened parsing for secure…

farhanic017/dynamic-skill-loader · 68 tokens

audit

Audit local Claude Code transcript usage and summarize likely token hotspots. Use when the user asks where Claude Code tokens are going or wants evidence before optimizing.

ictechgy/context-guard · 29 tokens