spec-forge
Skill8 starsChanged 4 months agoMITView on GitHub
Professional specification system for Codex. Use when the user asks to create, improve, review, audit, analyze, or propagate product/software documentation, including requirements documents to hand to an implementation team or vendor, SRS/functional/non-functional requirements, PRDs and business cases, ideas, technical designs, architecture/RFC docs, feature specs, test cases, documentation audits, document landscape analysis, and full idea-to-spec chains. The chain's spine is a delivery-grade requirements spec followed by a technical design, handed off to code-forge for implementation: [idea] -> [decompose] -> [prd] -> srs -> tech-design -> review.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- AlpayC/claude-skill-settheir own version, first seen Sep 14, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- AlpayC/claude-skill-set★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- analyzeSkill
- auditSkill
- decomposeSkill
- ideaSkill
- prd-generationSkill
- propagateSkill
- reviewSkill
- srs-generationSkill
- tech-design-generationSkill
- test-cases-generationSkill
- test-plan-generationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
42 rules. About 0 are common, 25 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈25
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Use this skill when the user asks for any of the following:
- Very specific: line 37
Start or refine an idea before specs: use skills/idea/SKILL.md
- Very specific: line 39
Write a PRD, business case, or product definition — "is this worth building": use skills/prd-generation/SKILL.md
- Very specific: line 40
Write the requirements a team will be held to — a requirements spec, an SRS, functional/non-functional requirements, a requirements …
- Very specific: line 41
Write a technical design, architecture doc, design doc, or RFC: use skills/tech-design-generation/SKILL.md
- Very specific: line 47
Run the full chain for a feature: orchestrate [idea] -> [decompose] -> [prd] -> srs -> tech-design -> review -> handoff to code-forge
- Distinctive: line 49
Routing the ambiguous "write me a requirements document": When the user says "需求文档", "requirements doc", or "spec" without qualifying it, …
- Distinctive: line 83
Read this root file first.
- Very specific: line 84
Read only the child SKILL.md matching the user's request.
- Very specific: line 85
When a child skill references skills/shared/project-context.md, read it if the workflow needs code/project awareness.
- Very specific: line 86
When a child skill references skills/shared/doc-first.md, apply it before generating or editing docs.
- Very specific: line 87
When a child skill invokes the script layer, read skills/shared/scripts.md once to resolve <sf_scripts>.
- Distinctive: line 88
Read generation references, templates, or checklists only when that child skill explicitly needs them.
- Distinctive: line 90
Do not bulk-load every child skill.
- Distinctive: line 96
Treat docs as current truth, not history.
- Very specific: line 97
Do not create parallel versions such as prd-v2.md, new-tech-design.md, or addendum files.
- Distinctive: line 98
Keep traceability stable: preserve existing requirement IDs, feature names, component names, and section titles unless the user explicitly …
- Distinctive: line 99
When changing upstream docs, identify downstream impact.
- Distinctive: line 100
Every finding in review, audit, analyze, or propagate output must cite concrete files/sections.
- Distinctive: line 101
Prefer project-local conventions and existing docs over generic templates.
- Distinctive: line 102
Ask only necessary questions.
- Distinctive: line 138
Prefer the fast path (run the script, use its JSON) over re-deriving the same facts by hand.
- Distinctive: line 161
Run when the demand itself is unvalidated: the user is exploring, the problem is fuzzy, or there is no evidence anyone needs this.
- Distinctive: line 164
If a ready or graduated idea already exists, reuse it.
- Distinctive: line 167
Run when the scope plausibly covers several independently specifiable sub-features.
- Distinctive: line 172
Run for a new product, a new product line, or anything needing a go/no-go decision, budget approval, or stakeholder alignment before …
- Very specific: line 179
If docs/{name}/prd.md exists, trace every capability into requirements.
- Distinctive: line 180
Never skip this stage to reach the tech design faster.
- Very specific: line 186
Every component must trace to the FR-*/NFR-* requirements it satisfies, and every requirement must be satisfied by at least one component.
- Distinctive: line 197
Test cases, audit, analyze, and propagate are on-demand outputs, not stages in the default chain.
- Very specific: line 205
Use for early exploration, demand validation, competitive research, and anti-pseudo-requirement checks.
- Very specific: line 213
Use for deciding whether a project is one feature or several independently specifiable sub-features.
- Distinctive: line 223
Read by stakeholders *before* commitment and largely frozen once the decision is made.
- Distinctive: line 253
Use for architecture/design docs, RFCs, API design, data model design, deployment, observability, security, performance, alternatives, and …
- Very specific: line 261
Use for test case generation, coverage matrices, test strategy, testable unit extraction, and code/spec-driven QA planning.
- Distinctive: line 268
Use after spec generation to check completeness, specificity, internal consistency, traceability, and actionability.
- Distinctive: line 276
Use when auditing one project that has docs and code.
- Distinctive: line 283
Use for docs-only or cross-repo document landscapes.
- Distinctive: line 290
Use after upstream document changes.
- Very specific: line 302
Test cases: docs/{name}/test-cases.md or the path specified by the child skill
- Distinctive: line 307
If existing project conventions differ, follow the existing convention and state the location you used.
- Very specific: line 312
Before finishing a spec-forge task:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Spec-Forge Orchestrator
Spec-forge is a documentation and specification workflow suite. This root skill is the Codex-facing orchestrator: decide which child skill to load, keep the document chain coherent, and avoid loading large generation references until they are needed.
Trigger Patterns
Use this skill when the user asks for any of the following:
- Start or refine an idea before specs: use
skills/idea/SKILL.md - Split a large project into sub-features: use
skills/decompose/SKILL.md - Write a PRD, business case, or product definition — "is this worth building": use
skills/prd-generation/SKILL.md - Write the requirements a team will be held to — a requirements spec, an SRS, functional/non-functional requirements, a requirements document to hand to an implementation team or vendor: use
skills/srs-generation/SKILL.md - Write a technical design, architecture doc, design doc, or RFC: use
skills/tech-design-generation/SKILL.md - Generate test cases, QA coverage, or a test case matrix: use
skills/test-cases-generation/SKILL.md - Review spec-forge documents for quality and consistency: use
skills/review/SKILL.md - Audit project docs against code: use
skills/audit/SKILL.md - Analyze a document ecosystem for themes, conflicts, gaps, redundancy, or staleness: use
skills/analyze/SKILL.md - Propagate an upstream doc change downstream: use
skills/propagate/SKILL.md - Run the full chain for a feature: orchestrate
[idea] -> [decompose] -> [prd] -> srs -> tech-design -> review -> handoff to code-forge
Routing the ambiguous "write me a requirements document". When the user says "需求文档", "requirements doc", or "spec" without qualifying it, the deciding question is whether the decision to build has already been made. If it has — the user knows what they want and needs it specified precisely enough to implement against — route to SRS. If it has not — the user is making a case, seeking approval, or sizing an opportunity — route to PRD. When genuinely unclear, ask that one question rather than guessing; producing the wrong document wastes the entire generation.
Also treat slash-like requests as aliases:
| User request | Route |
/spec-forge <name> | Full chain |
/spec-forge:idea <name> or /idea <name> | Idea |
/spec-forge:decompose <name> or /decompose <name> | Decompose |
/spec-forge:tech-design <name> or /tech-design <name> | Tech Design |
/spec-forge:prd <name> or /prd <name> | PRD |
/spec-forge:srs <name> or /srs <name> | SRS |
/spec-forge:test-cases <target> or /test-cases <target> | Test Cases |
/spec-forge:review <name> or /review <name> | Review |
/spec-forge:audit [path] or /audit [path] | Audit |
/spec-forge:analyze [path] or /analyze [path] | Analyze |
/spec-forge:propagate ... or /propagate ... | Propagate |
The commands/*.md files are compatibility command definitions from the original
Claude-oriented implementation. In Codex, prefer reading the child skills/*/SKILL.md
files directly. Use commands/spec-forge.md only as an additional orchestration
reference if you need more detail about the full chain.
Progressive Loading
Keep context small.
- Read this root file first.
- Read only the child
SKILL.mdmatching the user's request. - When a child skill references
skills/shared/project-context.md, read it if the workflow needs code/project awareness. - When a child skill references
skills/shared/doc-first.md, apply it before generating or editing docs. - When a child skill invokes the script layer, read
skills/shared/scripts.mdonce to resolve<sf_scripts>; do not read the scripts' source unless you need to debug them. - Read generation references, templates, or checklists only when that child skill explicitly needs them.
Do not bulk-load every child skill. Do not read every reference folder just because the suite is complex.
Global Rules
- Preserve the user's requested language. If the user writes in Chinese, respond and write user-facing explanations in Chinese unless the target document convention requires English.
- Treat docs as current truth, not history. Before generating a new spec, scan for existing related docs and decide whether to reuse, edit, or create.
- Do not create parallel versions such as
prd-v2.md,new-tech-design.md, or addendum files. Edit the canonical file in place unless no canonical document exists. - Keep traceability stable: preserve existing requirement IDs, feature names, component names, and section titles unless the user explicitly asks to rename them.
- When changing upstream docs, identify downstream impact. Either update affected downstream docs or recommend/run the propagate workflow.
- Every finding in review, audit, analyze, or propagate output must cite concrete files/sections. Do not invent issues.
- Prefer project-local conventions and existing docs over generic templates.
- Ask only necessary questions. If existing docs or code provide the answer, use them and state the assumption.
Shared Project Context
For generation workflows that need grounding in the actual codebase, use:
skills/shared/project-context.md
Apply it before SRS, PRD, tech-design, decompose, and test-cases work when the project exists. It produces a concise summary of:
- Project profile
- Language, framework, database, auth, testing, and CI signals
- Existing documents and upstream specs
- Architecture and module boundaries
- Existing test infrastructure when relevant
For the full chain, scan project context once and reuse the summary across stages instead of repeatedly rescanning the same repository.
Script Layer
spec-forge ships a small layer of deterministic Python 3 (standard-library-only)
helpers under skills/shared/scripts/ that absorb the mechanical, token-heavy
bookkeeping the skills used to do by hand — project + document scanning
(sf-scan.py), configuration/directory resolution (sf-config.py), document
structure/ID validation (sf-verify-doc.py), and traceability/coverage math
(sf-trace.py). The division of labour: the scripts keep the record-keeping;
the model keeps the reasoning (requirement quality, architecture trade-offs,
conflict judgement). Every skill that calls a script keeps a silent manual
fallback for when python3 is unavailable.
How to locate and invoke the scripts, and which one does what:
skills/shared/scripts.md
Prefer the fast path (run the script, use its JSON) over re-deriving the same facts by hand. Never restate a script's algorithm in prose — the script is the single source of truth so the two cannot drift.
Document Discipline
For any document creation or edit, apply:
skills/shared/doc-first.md
Minimum pre-write checklist:
- List relevant existing docs under
docs/,specs/,design/,architecture/,ideas/, and the project root. - Grep for the feature name, domain terms, requirement IDs, component names, and aliases.
- Decide for each topic: reuse existing content, extend existing content, or create new content.
- Preserve stable IDs and terminology.
- Note downstream docs that will need updates.
Full Chain
The chain has one mandatory spine — a delivery-grade requirements specification, then a technical design — with everything else conditional on what the project actually needs. When the user asks for /spec-forge <name> or "run the full spec-forge chain", execute this sequence:
- Idea (conditional): Use
skills/idea/SKILL.md.- Run when the demand itself is unvalidated: the user is exploring, the problem is fuzzy, or there is no evidence anyone needs this.
- Skip when the user already knows what they want built.
- Goal: validate demand and produce
ideas/{name}/draft.md. - If a ready or graduated idea already exists, reuse it. If the idea is still exploring/refining, warn the user before continuing.
- Decompose (conditional): Use
skills/decompose/SKILL.md.- Run when the scope plausibly covers several independently specifiable sub-features.
- Skip for a single coherent feature.
- Multi-split output:
docs/project-{name}.mdwith a first-lineFEATURE_MANIFESTblock.
- PRD (conditional): Use
skills/prd-generation/SKILL.md.- Run for a new product, a new product line, or anything needing a go/no-go decision, budget approval, or stakeholder alignment before commitment.
- Skip when the decision to build is already made and the work is a well-understood feature — go straight to the SRS. A PRD written after the decision is ceremony.
- Output:
docs/{name}/prd.md— business case and product definition.
- SRS (mandatory): Use
skills/srs-generation/SKILL.md.- This is the spine of the chain. It is the delivery contract: the document an implementation team — an external vendor, another team, or code-forge — is held to.
- Output:
docs/{name}/srs.mdwithFR-*/NFR-*requirements, input field rules, state machines, permission matrix, error catalogue, acceptance criteria, and change control. - If
docs/{name}/prd.mdexists, trace every capability into requirements. If onlyideas/{name}/draft.mdexists, derive scope and requirements from it. If neither exists, work from the user's request and state the assumptions explicitly. - Never skip this stage to reach the tech design faster. A design built on unstated requirements produces code whose correctness nobody can settle.
- Tech Design (mandatory): Use
skills/tech-design-generation/SKILL.md.- Single feature output:
docs/{name}/tech-design.md. - Multi-split output: one tech design per sub-feature.
- Also generates one implementation-facing feature spec under
docs/features/per component in §8.1, plusdocs/features/overview.mdwith the dependency graph and execution order. - Every component must trace to the
FR-*/NFR-*requirements it satisfies, and every requirement must be satisfied by at least one component.
- Single feature output:
- Review (mandatory): Use
skills/review/SKILL.md.- Review the SRS, the tech design, and any
docs/features/*.md. - Auto-fix only where the review skill permits it. Leave review comments where domain knowledge is missing.
- Review the SRS, the tech design, and any
- Handoff: Report the handoff command rather than running it.
/code-forge:plan @docs/features/when feature specs were generated./code-forge:plan @docs/{name}/tech-design.mdfor a single-component design.- Implementation and test generation belong to code-forge. spec-forge owns requirements and design; code-forge owns implementation and verification. Tests are derived from the SRS acceptance criteria by
code-forge:tdd— spec-forge does not produce a separate test document in the chain.
Test cases, audit, analyze, and propagate are on-demand outputs, not stages in the default chain.
Single-Skill Routes
Idea
Read skills/idea/SKILL.md.
Use for early exploration, demand validation, competitive research, and
anti-pseudo-requirement checks. Output lives in top-level ideas/{idea-name}/,
not under docs/.
Decompose
Read skills/decompose/SKILL.md.
Use for deciding whether a project is one feature or several independently
specifiable sub-features. If multi-split, generate docs/project-{name}.md.
PRD — the business case
Read skills/prd-generation/SKILL.md.
Answers "is this worth building, for whom, and at what priority". Market context, competitive landscape, demand validation, feasibility go/no-go, personas, user stories, capability scope, success metrics, milestones, risks. Read by stakeholders before commitment and largely frozen once the decision is made. Optional: skip it when the decision to build is already settled.
Deliberately not in the PRD: field-level rules, state machines, error codes, Given/When/Then acceptance criteria, solution architecture. Those are the SRS's and tech design's job. A PRD row that needs more than two sentences is a system behavior in the wrong document.
SRS — the delivery contract
Read skills/srs-generation/SKILL.md.
Answers "exactly what must be built, and how do we settle whether it was".
This is the document an implementation team — an external vendor, another team,
or code-forge — is held to, and the mandatory spine of the chain. Formal
FR-*/NFR-* requirements with main/alternative flows, input field rules,
state machines including illegal-transition handling, permission matrix,
error catalogue with degradation behavior, machine-verifiable acceptance
criteria, interface and data requirements, traceability, and acceptance and
change control.
Unlike the PRD, it keeps evolving through delivery — which is exactly why the two are separate files. A requirement change must not require touching market sizing, and internal go/no-go reasoning must not ship to an implementation vendor.
Tech Design
Read skills/tech-design-generation/SKILL.md.
Use for architecture/design docs, RFCs, API design, data model design, deployment, observability, security, performance, alternatives, and generated feature specs.
Test Cases
Read skills/test-cases-generation/SKILL.md.
Use for test case generation, coverage matrices, test strategy, testable unit
extraction, and code/spec-driven QA planning. Honor --formal when requested.
Review
Read skills/review/SKILL.md.
Use after spec generation to check completeness, specificity, internal consistency, traceability, and actionability. Findings first; fixes only where allowed.
Audit
Read skills/audit/SKILL.md.
Use when auditing one project that has docs and code. It checks documentation quality, completeness, consistency, staleness, and alignment with the codebase.
Analyze
Read skills/analyze/SKILL.md.
Use for docs-only or cross-repo document landscapes. It maps themes, conflicts, gaps, redundancies, and stale areas without assuming a single codebase.
Propagate
Read skills/propagate/SKILL.md.
Use after upstream document changes. It finds downstream docs affected by changed concepts and updates them surgically or reports unresolved stale references.
Output Locations
Default locations:
- Ideas:
ideas/{name}/ - PRD (business case, optional):
docs/{name}/prd.md - SRS (delivery contract, mandatory):
docs/{name}/srs.md - Tech design:
docs/{name}/tech-design.md - Feature specs:
docs/features/*.md - Test cases:
docs/{name}/test-cases.mdor the path specified by the child skill - Project manifest:
docs/project-{name}.md - Audit report:
{target-docs-path}/audit-report.md - Analysis report:
{target-root}/analysis-report.md
If existing project conventions differ, follow the existing convention and state the location you used.
Completion Criteria
Before finishing a spec-forge task:
- Confirm the requested document or report exists, or explain why it could not be written.
- Mention the exact files changed or generated.
- For generation tasks, note whether project context and existing docs were scanned.
- For review/audit/analyze tasks, summarize findings by severity and cite the report path.
- For chain tasks, summarize which stages completed, which conditional stages were skipped and why, and state the
/code-forge:planhandoff command. - For a full chain, confirm the SRS exists and passed its structural gate. The SRS is the chain's spine; a chain that reached a tech design without one is incomplete, not merely abbreviated.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

