speckit-specify
它能做什么
这个技能把对某个功能的通俗描述转换为书面规格文档。适合使用 Spec Kit 方法的产品负责人和开发者。
适用场景
- ✓你有一个功能想法,想把它写成清晰规格的时候。
- ✓现有的功能规格需要补充新细节的时候。
- ✓你想从一段简单描述开始 Spec Kit 工作流的时候。
技能链接
https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-specify/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请根据这段描述编写功能规格:用户可以通过电子邮件自行重置密码。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能获取你的功能描述,检查为此步骤设置的钩子,然后编写或更新规格文件。之后,规格会用于接下来的规划步骤。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Pre-Execution Checks
Check for extension hooks (before specification):
- Check if
.specify/extensions.ymlexists in the project root. - If it exists, read it and look for entries under the
hooks.before_specifykey - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
- Filter out hooks where
enabledis explicitlyfalse. Treat hooks without anenabledfield as enabled by default. - For each remaining hook, do not attempt to interpret or evaluate hook
conditionexpressions:- If the hook has no
conditionfield, or it is null/empty, treat the hook as executable - If the hook defines a non-empty
condition, skip the hook and leave condition evaluation to the HookExecutor implementation
- If the hook has no
- When constructing slash commands from hook command names, replace dots (
.) with hyphens (-). For example,speckit.git.commit→/speckit-git-commit. - For each executable hook, output the following based on its
optionalflag:- Optional hook (
optional: true):## Extension Hooks **Optional Pre-Hook**: {extension} Command: `/{command}` Description: {description} Prompt: {prompt} To execute: `/{command}` - Mandatory hook (
optional: false):## Extension Hooks **Automatic Pre-Hook**: {extension} Executing: `/{command}` EXECUTE_COMMAND: {command} Wait for the result of the hook command before proceeding to the Outline.
- Optional hook (
- If no hooks are registered or
.specify/extensions.ymldoes not exist, skip silently
Outline
The text the user typed after /speckit.specify in the triggering message is the feature description. Assume you always have it available in this conversation even if $ARGUMENTS appears literally below. Do not ask the user to repeat it unless they provided an empty command.
Given that feature description, do this:
Generate a concise short name (2-4 words) for the feature:
- Analyze the feature description and extract the most meaningful keywords
- Create a 2-4 word short name that captures the essence of the feature
- Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
- Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
- Keep it concise but descriptive enough to understand the feature at a glance
- Examples:
- "I want to add user authentication" → "user-auth"
- "Implement OAuth2 integration for the API" → "oauth2-api-integration"
- "Create a dashboard for analytics" → "analytics-dashboard"
- "Fix payment processing timeout bug" → "fix-payment-timeout"
Branch creation (optional, via hook):
If a
before_specifyhook ran successfully in the Pre-Execution Checks above, it will have created/switched to a git branch and output JSON containingBRANCH_NAMEandFEATURE_NUM. Note these values for reference, but the branch name does not dictate the spec directory name.If the user explicitly provided
GIT_BRANCH_NAME, pass it through to the hook so the branch script uses the exact value as the branch name (bypassing all prefix/suffix generation).Create the spec feature directory:
Specs live under the default
specs/directory unless the user explicitly providesSPECIFY_FEATURE_DIRECTORY.Resolution order for
SPECIFY_FEATURE_DIRECTORY:- If the user explicitly provided
SPECIFY_FEATURE_DIRECTORY(e.g., via environment variable, argument, or configuration), use it as-is - Otherwise, auto-generate it under
specs/:- Check
.specify/init-options.jsonforbranch_numbering - If
"timestamp": prefix isYYYYMMDD-HHMMSS(current timestamp) - If
"sequential"or absent: prefix isNNN(next available 3-digit number after scanning existing directories inspecs/) - Construct the directory name:
<prefix>-<short-name>(e.g.,003-user-author20260319-143022-user-auth) - Set
SPECIFY_FEATURE_DIRECTORYtospecs/<directory-name>
- Check
Create the directory and spec file:
mkdir -p SPECIFY_FEATURE_DIRECTORY- Copy
.specify/templates/spec-template.mdtoSPECIFY_FEATURE_DIRECTORY/spec.mdas the starting point - Set
SPEC_FILEtoSPECIFY_FEATURE_DIRECTORY/spec.md - Persist the resolved path to
.specify/feature.json:{ "featu
- If the user explicitly provided
常见问题
我需要提供什么?
你想要的功能的通俗描述。
它会创建分支吗?
在这一步不会。分支创建由另一个 Spec Kit 技能负责。
规格之后是什么?
依次是计划、任务清单,然后是构建步骤。
详情
作者的原始描述
Create or update the feature specification from a natural language feature description.
repo: unoplatform/uno
热度
- GitHub 星标
- 10k
- 排名
- #12006
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …