specify

A command for creating or updating a written feature specification from a natural-language description. A feature specification records what a software change should do.

In plain words
What is it for?
Use it when defining a new feature or revising an existing one from a user’s description. It can also use project-specific pre-checks configured in .specify/extensions.yml.
Why use it?
It turns an informal request into a structured starting point for development and can run configured checks before creating the specification.

Command

Install

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.

agentmods
npx agentmods add commands/linfee/spec-kit-cn/specify
Clone the repo
git clone --depth 1 https://github.com/Linfee/spec-kit-cn
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,950 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce 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

Measured 2d ago against content hash 623c4209144b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

templates/commands/specify.md · 310 lines

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} 字面上显示为空。除非用户提供了空命令, 否则不要要求用户重复输入。

根据该功能描述, 执行以下操作:

  1. 生成简洁的短名称(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"
  2. 创建功能分支, 通过运行带有 --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"

Read the full file on GitHub · 310 lines

Changes

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.

  1. 2d ago First seen · 310 lines · 11 tokens per session scan A 623c4209144b

Subscribe to this mod's changes

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.