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.
npx agentmods add commands/linfee/spec-kit-cn/specifygit clone --depth 1 https://github.com/Linfee/spec-kit-cnWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00011 | $0.03950 |
| Opus 5 | $0.00005 | $0.01975 |
| Sonnet 5 | $0.00002 | $0.00790 |
| Haiku 4.5 | $0.00001 | $0.00395 |
Grade A, and why
specify 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.
用户输入
$ARGUMENTS
在继续之前, 你必须考虑用户输入(如果不为空)。
执行前检查
检查扩展钩子(规范创建前):
- 检查项目根目录下是否存在
.specify/extensions.yml - 如果存在, 读取它并查找
hooks.before_specify键下的条目 - 如果 YAML 无法解析或无效, 静默跳过钩子检查并继续正常执行
- 过滤掉
enabled明确为false的钩子。没有enabled字段的钩子默认视为已启用 - 对于每个剩余的钩子, 不要尝试解释或评估钩子的
condition表达式:- 如果钩子没有
condition字段, 或者为 null/空, 将该钩子视为可执行 - 如果钩子定义了非空的
condition, 跳过该钩子并将条件评估留给 HookExecutor 实现
- 如果钩子没有
- 对于每个可执行的钩子, 根据其
optional标志输出以下内容:- 可选钩子 (
optional: true):## 扩展钩子 **Optional Pre-Hook**: {extension} Command: `/{command}` Description: {description} Prompt: {prompt} To execute: `/{command}` - 强制钩子 (
optional: false):## 扩展钩子 **Automatic Pre-Hook**: {extension} Executing: `/{command}` EXECUTE_COMMAND: {command} Wait for the result of the hook command before proceeding to the Outline.
- 可选钩子 (
- 如果没有注册钩子或
.specify/extensions.yml不存在, 静默跳过
大纲
用户在触发消息中 /speckit.specify 之后输入的文本就是功能描述。假设你在这个对话中始终可以获取到它, 即使下面 {ARGS} 字面上显示为空。除非用户提供了空命令, 否则不要要求用户重复输入。
根据该功能描述, 执行以下操作:
-
生成简洁的短名称(2-4 个单词)用于分支:
- 分析功能描述并提取最有意义的关键词
- 创建一个能捕捉功能本质的 2-4 个单词的短名称
- 尽可能使用动名词格式(例如 "add-user-auth", "fix-payment-bug")
- 保留技术术语和缩写(OAuth2, API, JWT 等)
- 保持简洁但足够描述性, 以便一眼就能理解功能
- 示例:
- "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"
-
创建功能分支, 通过运行带有
--short-name(和--json)的脚本来创建。在顺序模式下, 不要传递--number— 脚本会自动检测下一个可用编号。在时间戳模式下, 脚本会自动生成YYYYMMDD-HHMMSS前缀:分支编号模式: 在运行脚本之前, 检查
.specify/init-options.json是否存在并读取branch_numbering值。-
如果是
"timestamp", 在脚本调用中添加--timestamp(Bash)或-Timestamp(PowerShell) -
如果是
"sequential"或不存在, 不添加任何额外标志(默认行为) -
Bash 示例:
{SCRIPT} --json --short-name "user-auth" "Add user authentication" -
Bash(时间戳):
{SCRIPT} --json --timestamp --short-name "user-auth" "Add user authentication" -
PowerShell 示例:
{SCRIPT} -Json -ShortName "user-auth" "Add user authentication" -
PowerShell(时间戳):
{SCRIPT} -Json -Timestamp -ShortName "user-auth" "Add user authentication"
-
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.
- 2d ago First seen · 310 lines · 11 tokens per session scan A 623c4209144b
specify is a command published in the GitHub repository Linfee/spec-kit-cn (695 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 3,950 once invoked, about $0.0001 per session on Opus 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-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.