用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/reynldi/skills --skill spec-generate命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Default output style for installed skills: write documents and user-facing responses in Simplified Technical English (ASD-STE100) with simple words, short sentences, active voice, and clear structure. Use when the user wants simple text or invokes /simplified-english.
Write a short PRD that starts with the problem — introduction with 5W1H, success metrics, user stories, and a requirements table with acceptance criteria. Then give it to the /development-workflow build pipeline. Stage P5 of /product-workflow. Simple English, no product experience needed. Use when the user asks for a PRD, a product spec, a feature spec, a pitch, or invokes /product-prd.
Skeptical review of one PRD before it goes to publish or to build — find the gaps, the parts that do not belong, the words with more than one meaning, and the risks; then close each gap by asking the user one question at a time. Runs after /product-prd, and before /product-publish-prd or /development-workflow. Simple English, no product experience needed. Use when the user asks to verify, review, or challenge a PRD, when a publish gate fails, or when the user invokes /product-prd-verification.
基于 SOC 职业分类
正在显示 SKILL.md
| name | spec-generate |
| description | Trace a feature through the codebase and generate it as an product spec or technical spec. |
| disable-model-invocation | true |
Generate product or technical spec by tracing it through the code. This is extraction, not evaluation: document what exists. No critique, no best-practice commentary, no "should", no severity labels. One exception: internal contradictions (two places in the codebase or its docs disagreeing with each other) are facts and are recorded as such. Judging code against external best practice is not. Where code and docs disagree, code wins.
Context budget: apply the "Risk and token budget" protocol in ../development-workflow/SKILL.md; load more only when it changes the current decision.
Discover. Enumerate every flow of the feature by hunting each category of the discovery checklist below through the codebase. Done when every category is either populated with named flows or explicitly marked absent.
Scope lock. Present in one message: a one-sentence restatement of the feature, the discovered flow list grouped by category, and two run options: (a) one combined document or separate product/technical files, (b) detail all discovered flows or only the ones the user names. Done when the user confirms the flow list and both options. Do not trace before this.
Trace. Follow each confirmed flow from entry point to exit (response, persistence, event, external call). Record every file, symbol, branch, and error path on the route. Stop at the codebase boundary: name third-party calls, never descend into their internals. Done when every confirmed flow has an unbroken route from entry to exit.
Cross-check. Map each claim in the supporting docs to the trace, and run the consistency sweep: compare contract vs implementation, naming and taxonomy across layers, and security enforcement across entry points. Done when every doc claim is marked confirmed, contradicted, or out of scope, and every contradiction found in the sweep is recorded factually with both sides cited.
Write. Before writing, read the template files in this skill folder:
templates/PRODUCT-SPEC.md, templates/TECHNICAL-SPEC.md, and, when the
trace touches endpoints/schemas/events, templates/CONTRACT-SPEC.md. The
generated documents must follow those templates' section structure and
intent. Do not invent a different section hierarchy unless the user provides
a replacement template.
Fill the templates into the following output structure:
{target path asked by user}/
{feature name}/
- {feature name}-product-spec.md
- {feature name}-technical-spec.md
- {contract name}-contract.md
Overview before flows in both. Section names come from the feature's own flows, never generic tier labels. Every claim carries a file path. If the trace touched no endpoint or schema, omit the contract section entirely; never write "N/A". Done when the linkage rule holds: every node in the overview chart maps to exactly one flow section or is marked trivial (passthrough, no internal branching), and every endpoint in the trace appears in the contract section.
Hunt every category. A category with no hits is reported as absent, not skipped.
Write every section as narration: walk the reader through the flow the way a senior engineer explains it to a new teammate, cause to effect. "When a user submits the login form, the request reaches AuthController, which asks TokenService to verify the credentials. If they match, a session is created and the client receives a JWT."
Use bullet points or numbered lists in the output as necessary to breakdown some point need to point out. No file paths inside prose; Name a class or function only when the reader needs the anchor, not for every step. Short sentences, active voice, one flow per section, no filler.