plan

plan is a command for Claude Code from loulanyue/spec-kit-zh. It costs 14 tokens per session (1,159 once invoked), scanned A, original, MIT.

A command that runs an implementation-planning workflow and creates design documents from a feature specification. Its generated documents and user-facing summaries are written in simplified Chinese.

In plain words
What is it for?
Use it to prepare research, data models, API or other contracts, quick-start instructions, and an implementation plan for a repository feature.
Why use it?
It turns an initial feature request into researched decisions, data descriptions, interface contracts, setup instructions, and an implementation plan before coding begins.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to prepare research, data models, API or other contracts, quick-start instructions, and an implementation plan for a repository feature.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/loulanyue/spec-kit-zh/plan
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.

Clone the repo
git clone --depth 1 https://github.com/loulanyue/spec-kit-zh

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plan

README.md
[![agentmods](https://agentmods.dev/badge/commands/loulanyue/spec-kit-zh/plan.svg)](https://agentmods.dev/commands/loulanyue/spec-kit-zh/plan)
Your own site
<a href="https://agentmods.dev/commands/loulanyue/spec-kit-zh/plan"><img src="https://agentmods.dev/badge/commands/loulanyue/spec-kit-zh/plan.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00014 $0.01159
Opus 5 $0.00007 $0.00580
Sonnet 5 $0.00003 $0.00232
Haiku 4.5 $0.00001 $0.00116

Measured 9d ago against content hash e0eca379d2e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

plan 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 9d 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/plan.md · 105 lines

What it actually says

用户输入

$ARGUMENTS

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

语言要求

  • 所有面向用户的生成制品与摘要,包括 plan.mdresearch.mddata-model.mdquickstart.md、合同描述和完成报告,都必须使用简体中文。
  • 文件路径、命令、ID 和代码/配置键在需要时保持机器可读原样。

概述

  1. 设置:从仓库根目录运行 {SCRIPT} 并解析 JSON 输出,获取 FEATURE_SPEC、IMPL_PLAN、SPECS_DIR 和 BRANCH 的路径。对于参数中的单引号(例如 "I'm Groot"),使用转义语法:例如 'I'\''m Groot'(或尽量使用双引号)。

  2. 加载上下文:读取 FEATURE_SPEC 和 /memory/constitution.md 的内容。加载已复制的 IMPL_PLAN 模板。

  3. 执行规划工作流:按照 IMPL_PLAN 模板的结构执行:

    • 填写“技术上下文”(将未知项标记为 "NEEDS CLARIFICATION")
    • 根据章程内容填写“宪章检查”部分
    • 评估门禁(如果存在无合理解释的违反项则报错退出)
    • 第 0 阶段:生成 research.md(解决所有 "NEEDS CLARIFICATION" 项)
    • 第 1 阶段:生成 data-model.mdcontracts/ 目录和 quickstart.md
    • 第 1 阶段:运行 agent 脚本以更新 agent 上下文
    • 重新评估设计完成后的“宪章检查”
  4. 停止并报告:在完成第 2 阶段规划后结束命令。报告当前分支、IMPL_PLAN 路径以及已生成的制品。

阶段步骤

第 0 阶段:提纲与研究

  1. 从上方“技术上下文”中提取未知项

    • 每一个 NEEDS CLARIFICATION → 研究任务
    • 每一个依赖项 → 最佳实践任务
    • 每一个集成项 → 模式任务
  2. 生成并分派研究任务

    针对技术上下文中的每一个未知项:
      任务:"研究 {unknown} 在 {feature context} 中的应用"
    针对每一个技术选型:
      任务:"寻找 {tech} 在 {domain} 领域的最佳实践"
    
  3. research.md 中汇总研究结果,采用以下格式:

    • 决策:[选择了什么方案]
    • 理由:[为什么选择该方案]
    • 评估过的替代方案:[还评估了什么其他方案]

产出:完成 research.md 并解决所有 NEEDS CLARIFICATION 标记。

第 1 阶段:设计与契约

前置条件: research.md 已完成。

  1. 从功能规范中提取实体data-model.md

    • 实体名称、字段、关系
    • 来自需求的验证规则
    • 状态转移逻辑(如果适用)
  2. 定义接口契约(如果项目具有外部接口)→ /contracts/ 目录:

    • 识别项目向用户或其他系统暴露的接口
    • 记录适合项目类型的契约格式
    • 示例:库的公共 API、CLI 工具的命令行 Schema、Web 服务的端点、解析器的语法规则、应用程序的 UI 契约
    • 如果项目纯粹是内部的(构建脚本、一次性工具等),则跳过此步
  3. 更新 Agent 上下文

    • 运行 {AGENT_SCRIPT}
    • 这些脚本会自动检测当前使用的 AI Agent
    • 更新相应的 Agent 专用上下文文件
    • 仅添加当前计划中的新技术
    • 保留在标记之间的手动修改内容

产出data-model.md/contracts/*quickstart.md、Agent 专用上下文文件。

关键规则

  • 始终使用绝对路径。
  • 如果门禁检查失败或存在未解决的澄清项,则报错退出。
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. 9d ago First seen · 105 lines · 14 tokens per session scan A e0eca379d2e8

Subscribe to this mod's changes

plan is a command published in the GitHub repository loulanyue/spec-kit-zh (339 stars, last pushed 6d ago), licensed MIT. It adds 14 tokens to every session and 1,159 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.