claude-code/skills/gen-spec/SKILL.md
Generates a technical spec with objective, Definition of Done (3–7 binary checks), scope, anti-scope, technical decisions, and applicable patterns. Grounded in the project's real patterns from .vibeflow/. Auto-splits specs that exceed budget or DoD limits. Use when requirements are clear and you're ready to define the implementation contract.
npx skillsauth add pe-menezes/vibeflow gen-specInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
What it does: Produces a technical spec in .vibeflow/specs/<slug>.md with objective, Definition of Done (3–7 binary checks), scope, anti-scope, technical decisions, and applicable patterns. Reads .vibeflow/ to ground the spec in your project. Can take a PRD path (from discover) or a short feature description.
Examples:
/vibeflow:gen-spec .vibeflow/prds/login-flow.md — Generate spec from an existing PRD./vibeflow:gen-spec adicionar endpoint POST /auth/login que retorna JWT — Generate spec from a one-line description (uses .vibeflow/ patterns).Detect the language of the user's input ($ARGUMENTS or conversation). Write ALL output in that same language. Technical terms in English are acceptable regardless of the detected language.
Use WebSearch and WebFetch only when local context (.vibeflow/, codebase
files, git history) is insufficient. Prefer local knowledge first:
patterns, conventions, and existing code. Typical valid uses: researching
unknown frameworks/libraries found in the codebase, checking official docs
for unfamiliar APIs.
Generate a complete spec for: $ARGUMENTS
If $ARGUMENTS is a path to a .md file inside .vibeflow/prds/,
read the PRD. Use the PRD as the basis for the spec — the problem,
audience, solution, scope, and anti-scope are already defined. Focus
on translating to technical decisions, binary DoD, and applicable patterns.
Check if .vibeflow/ exists. If it does:
.vibeflow/index.md for project contextSuggested budget: ≤ N line in index.md — use that as the
budget for this spec. If not present, default to ≤ 6 files..vibeflow/conventions.md for coding standards## Pattern Registry YAML block from
index.md (between <!-- vibeflow:patterns:start/end --> markers).
Cross-reference the registry's tags and modules against the feature
description/scope to identify relevant patterns. Load only the top 3-5
matching pattern docs from .vibeflow/patterns/. If no Pattern Registry
exists in index.md, fall back to reading all pattern docs.Activation: This gate runs ONLY when the input is a PRD — either a .md
file path or a text input longer than 3 lines. If the input is a short
description (≤ 3 lines), skip this gate entirely and proceed to step 2.
After reading the PRD (step 0) and loading .vibeflow/ context (step 1),
run these 5 sanity checks before generating the spec:
.vibeflow/conventions.md and loaded patterns. Does it
conflict with existing architecture, naming conventions, or established
patterns? Does it duplicate something that already exists?.vibeflow/index.md
(stack, dependencies, structure), is the proposed solution feasible
without major stack changes?If all 5 checks pass: proceed silently to spec generation. No delay.
If any check fails: STOP and ask the user up to 2 targeted questions about the failing checks. After the user responds, proceed with spec generation — do not loop or ask more questions.
Example questions:
.vibeflow/conventions.md establishes Y. Which
should the spec follow?".vibeflow/ does NOT exist:
any types introduced", "Error handling follows project conventions").
Functional checks alone are not sufficient..vibeflow/patterns/
must be followed. If the feature introduces a NEW pattern, note it.- .vibeflow/specs/<feature>-part-N.mdBe opinionated. Cut scope aggressively. Challenge vague requirements. If something is unclear, state your assumption and flag it with a TODO.
After drafting the spec, check if it exceeds limits:
.vibeflow/index.md or default ≤ 6)If EITHER condition is true, do not save the spec. Instead:
Dependencies field listing which specs must come before it<feature>-part-1.md, <feature>-part-2.md, etc.Do NOT produce a single large spec and leave splitting to someone else. The architect owns the split decision.
Save the spec to: .vibeflow/specs/<feature-slug>.md
Create the .vibeflow/specs/ directory if it doesn't exist.
After saving, suggest: "Spec saved to .vibeflow/specs/<feature-slug>.md.
Run /vibeflow:implement .vibeflow/specs/<feature-slug>.md to implement with guardrails (budget, DoD, patterns).
Or /vibeflow:prompt-pack .vibeflow/specs/<feature-slug>.md if you want a
self-contained prompt for a separate session/agent."
If this command is modified, update MANUAL.md to reflect the changes.
testing
Updates .vibeflow/ with corrections, new conventions, architectural decisions, or new patterns from natural language feedback. Also imports from external repos via --from <url|path>. Use to keep .vibeflow/ accurate as the project evolves.
development
Compiles statistics from audit reports: PASS/PARTIAL/FAIL rates, most violated patterns, most failing DoD checks, and quality trends. Use after running several audits to spot improvement areas.
data-ai
Fast-tracks small tasks into a prompt pack in one command. Skips discover, generates an ephemeral spec in memory. Use for well-defined tasks that fit in ≤4 files.
development
Generates a self-contained prompt pack from a spec. Embeds real code patterns from .vibeflow/ so any coding agent follows the project's conventions. Use when handing off implementation to a separate session or agent.