implement

An implementation command that carries out every task listed in tasks.md, a file describing the work needed for a feature.

In plain words
What is it for?
Running planned feature work, processing project checklists, and waiting for required preparation steps before implementation.
Why use it?
It turns an approved task list into actual project changes and checks registered pre-implementation hooks first.

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/implement
Clone the repo
git clone --depth 1 https://github.com/Linfee/spec-kit-cn
Per session 15 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,087 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.00015 $0.03087
Opus 5 $0.00008 $0.01543
Sonnet 5 $0.00003 $0.00617
Haiku 4.5 $0.00002 $0.00309

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

Security

Grade A, and why

implement 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/implement.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

用户输入

$ARGUMENTS

在继续之前, 你必须考虑用户输入(如果非空).

执行前检查

检查扩展钩子(实现前):

  • 检查项目根目录下是否存在 .specify/extensions.yml
  • 如果存在, 读取该文件并查找 hooks.before_implement 键下的条目
  • 如果 YAML 无法解析或无效, 静默跳过钩子检查并正常继续
  • 过滤掉 enabled 显式为 false 的钩子. 没有 enabled 字段的钩子默认视为已启用.
  • 对于每个剩余的钩子, 不要尝试解释或评估钩子的 condition 表达式:
    • 如果钩子没有 condition 字段, 或该字段为 null/空, 则将钩子视为可执行
    • 如果钩子定义了非空的 condition, 则跳过该钩子, 将条件评估留给 HookExecutor 实现
  • 对于每个可执行的钩子, 根据其 optional 标志输出以下内容:
    • 可选钩子 (optional: true):
      ## 扩展钩子
      
      **可选前置钩子**: {extension}
      命令: `/{command}`
      描述: {description}
      
      提示: {prompt}
      执行方式: `/{command}`
      
    • 强制钩子 (optional: false):
      ## 扩展钩子
      
      **自动前置钩子**: {extension}
      正在执行: `/{command}`
      EXECUTE_COMMAND: {command}
      
      等待钩子命令的结果后再继续执行大纲。
      
  • 如果没有注册钩子或 .specify/extensions.yml 不存在, 静默跳过

执行大纲

  1. 从仓库根目录运行 {SCRIPT} 并解析 FEATURE_DIR 和 AVAILABLE_DOCS 列表. 所有路径必须是绝对路径. 对于参数中的单引号(如 "I'm Groot"), 使用转义语法: 例如 'I'''m Groot' (或者尽可能使用双引号: "I'm Groot").

  2. 检查清单状态(如果 FEATURE_DIR/checklists/ 存在):

    • 扫描 checklists/ 目录中的所有清单文件

    • 对于每个清单, 统计:

      • 总项目数: 匹配 - [ ]- [X]- [x] 的所有行
      • 已完成项目: 匹配 - [X]- [x] 的行
      • 未完成项目: 匹配 - [ ] 的行
    • 创建状态表:

      | Checklist | Total | Completed | Incomplete | Status |
      |-----------|-------|-----------|------------|--------|
      | ux.md     | 12    | 12        | 0          | ✓ PASS |
      | test.md   | 8     | 5         | 3          | ✗ FAIL |
      | security.md | 6   | 6         | 0          | ✓ PASS |
      
    • 计算整体状态:

      • PASS: 所有清单的未完成项目数均为 0
      • FAIL: 一个或多个清单存在未完成项目
    • 如果任何清单未完成:

      • 显示包含未完成项目数量的表格
      • 停止并询问: "部分清单尚未完成. 你是否仍要继续实现? (yes/no)"
      • 等待用户响应后再继续
      • 如果用户说 "no"、"wait" 或 "stop", 停止执行
      • 如果用户说 "yes"、"proceed" 或 "continue", 继续到步骤 3
    • 如果所有清单都已完成:

      • 显示表格, 表明所有清单都已通过
      • 自动继续到步骤 3
  3. 加载并分析实现上下文:

    • 必需: 读取 tasks.md 获取完整的任务列表和执行计划
    • 必需: 读取 plan.md 获取技术栈、架构和文件结构
    • 如存在: 读取 data-model.md 获取实体和关系
    • 如存在: 读取 contracts/ 获取 API 规范和测试需求
    • 如存在: 读取 research.md 获取技术决策和约束
    • 如存在: 读取 quickstart.md 获取集成场景

Read the full file on GitHub · 202 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 · 202 lines · 15 tokens per session scan A 6d8bab308362

Subscribe to this mod's changes

implement is a command published in the GitHub repository Linfee/spec-kit-cn (695 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 3,087 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.