plan

plan is a command for Claude Code from clxzl/claude-code-best-practice-cn. It costs 9 tokens per session (3,225 once invoked), scanned A, original, MIT.

A command that turns a researched feature request into a detailed planning document. It expects an RPI feature folder with a research report approved to continue, then writes the plan into that folder.

In plain words
What is it for?
Use it after research to create a technical design, API agreements, phased implementation tasks, and structured planning files for a feature.
Why use it?
It organizes requirements, architecture decisions, dependencies, implementation stages, and quality checks before coding begins.

Command for Claude Code

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/clxzl/claude-code-best-practice-cn/plan
Clone the repo
git clone --depth 1 https://github.com/clxzl/claude-code-best-practice-cn

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/clxzl/claude-code-best-practice-cn/plan.svg)](https://agentmods.dev/commands/clxzl/claude-code-best-practice-cn/plan)
Your own site
<a href="https://agentmods.dev/commands/clxzl/claude-code-best-practice-cn/plan"><img src="https://agentmods.dev/badge/commands/clxzl/claude-code-best-practice-cn/plan.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 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,225 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.1 $0.00009 $0.03225
Opus 5 $0.00005 $0.01613
Sonnet 5 $0.00002 $0.00645
Haiku 4.5 $0.00001 $0.00323

Measured 5d ago against content hash 339f1b9ef543, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

development-workflows/rpi/.claude/commands/rpi/plan.md · 417 lines

How it starts

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

用户输入

$ARGUMENTS

必须解析用户输入以提取特性标识(rpi/ 中的文件夹名称)。

用途

此命令为特性请求创建全面的规划文档。它在特性的 RPI 文件夹中生成详细规格说明、技术设计和实现计划。

前提条件

  • 特性文件夹存在于 rpi/{feature-slug}/
  • 研究已完成并给出 GO 建议(rpi/{feature-slug}/research/RESEARCH.md 存在)

输出位置:所有文件保存到 rpi/{feature-slug}/plan/

这是 RPI 工作流的第 3 步(在研究以 GO 批准之后)。

概述

  1. 加载上下文:读取研究报告和项目规范(如果存在)
  2. 理解需求:解析功能范围和需求
  3. 分析技术需求:审查架构和依赖
  4. 设计架构:创建高层架构和 API 契约
  5. 分解实现:创建分阶段任务分解
  6. 生成文档:创建结构化文档文件
  7. 验证输出:确保所有质量门控通过
  8. 报告完成:提供摘要和后续步骤

阶段

阶段 0:加载上下文

前提条件:已提供特性标识

流程

  1. 验证研究已完成

    • 检查 rpi/{feature-slug}/research/RESEARCH.md 是否存在
    • 验证 GO 建议(如果为 NO-GO 或 CONDITIONAL 则发出警告)
  2. 阅读研究结果

    • 提取产品分析
    • 提取技术发现
    • 提取技术可行性评估
    • 记录风险和约束
  3. 加载项目规范(如果存在):

    • 在仓库中查找规范或原则文档
    • 提取相关约束和偏好

输出

  • 研究摘要
  • 规范上下文(如果找到)
  • 规划约束

验证

  • 研究报告存在
  • GO 建议已确认
  • 已加载规范(如果存在)

阶段 1:理解特性需求

前提条件:阶段 0 完成

流程

  1. 解析特性描述(来自研究报告):

    • 提取特性名称和主要目标
    • 识别目标组件
    • 理解面向用户 vs 技术特性
    • 确定特性复杂度级别
  2. 识别受影响的组件

    • 主要组件(特性所在位置)
    • 次要组件(集成点)
    • 需要的共享工具
    • 外部依赖
  3. 研究现有模式

    • 在代码库中搜索类似特性
    • 审查组件架构和模式
    • 识别可复用的代码和模式

输出

  • 特性范围文档(内部)
  • 受影响组件列表
  • 现有模式目录

验证

  • 特性名称和目标明确定义
  • 目标组件已识别
  • 特性复杂度已评估

阶段 2:分析技术需求

前提条件:阶段 1 完成

流程

  1. 审查组件架构

    • 阅读组件 README 和文档
    • 审查现有代码结构
    • 识别使用的架构模式
  2. 识别技术依赖

    • 内部依赖(其他组件、共享工具)
    • 外部依赖(API、服务、库)
    • 数据库/存储需求
    • 认证/授权需求
  3. 评估集成点

    • 需要创建或修改的 API
    • 需要的数据库 schema 变更
    • 事件/消息流
    • 前后端集成
  4. 评估技术风险

    • 对现有特性的破坏性变更
    • 性能影响
    • 安全问题
    • 数据迁移需求

输出

  • 技术需求文档(内部)
  • 依赖映射
  • 集成点图
  • 风险评估

验证

  • 已理解组件架构
  • 所有依赖已识别
  • 集成点已映射
  • 技术风险已评估

阶段 3:设计特性架构

前提条件:阶段 1-2 完成

代理:senior-software-engineer

流程

  1. 设计高层架构

    • 组件/模块结构
    • 数据流图
    • API 接口
    • 数据库 schema 变更
  2. 定义实现方案

    • 文件结构和组织
    • 代码组织模式
    • 测试策略
    • 错误处理方案
  3. 规划数据库/存储变更(如适用):

    • 新的集合/表
    • Schema 修改
    • 迁移策略
    • 数据验证规则

Read the full file on GitHub · 417 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. 5d ago First seen · 417 lines · 9 tokens per session scan A 339f1b9ef543

Subscribe to this mod's changes

plan is a command published in the GitHub repository clxzl/claude-code-best-practice-cn (127 stars, last pushed 3mo ago), licensed MIT. It adds 9 tokens to every session and 3,225 once invoked, about $0.0000 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.