plan-feature

plan-feature is a skill for Claude Code, Codex from weiyi88/cc-code. It costs 28 tokens per session (7,075 once invoked), scanned A, original, MIT.

A guided planning workflow for adding an incremental feature to an existing product. It compares the requested change with current code and documented requirements before recording the work for implementation.

In plain words
What is it for?
Use it to inspect an existing project, identify what a feature still needs, map affected files and tests, and produce implementation-ready product, interface, and technical plans.
Why use it?
It prevents the coding agent from inventing requirements or silently choosing between conflicting code and documentation. It also breaks unclear decisions into separate questions instead of approving a large list at once.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: names the ExitPlanMode tool; mentions Codex.

Part of the cc-code plugin — 17 skills, 3 agents, 1 hook shipped together

Good fit Use it to inspect an existing project, identify what a feature still needs, map affected files and tests, and produce implementation-ready product, interface, and technical plans.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/weiyi88/cc-code/plan-feature
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.

Any agent
npx skills add weiyi88/cc-code --skill plan-feature
Clone the repo
git clone --depth 1 https://github.com/weiyi88/cc-code

Made for: Claude Code, Codex.

Or install cc-code, the plugin that ships this one along with the rest of its 17 skills, 3 agents, 1 hook.

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-feature

README.md
[![agentmods](https://agentmods.dev/badge/skills/weiyi88/cc-code/plan-feature/github.svg)](https://agentmods.dev/skills/weiyi88/cc-code/plan-feature)
Your own site
<a href="https://agentmods.dev/skills/weiyi88/cc-code/plan-feature"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/plan-feature/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plan-feature

Your own site · 80×15
<a href="https://agentmods.dev/skills/weiyi88/cc-code/plan-feature"><img src="https://agentmods.dev/badge/skills/weiyi88/cc-code/plan-feature.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,075 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.00028 $0.07075
Opus 5.5 $0.00011 $0.02830
Sonnet 5.5 $0.00006 $0.01415
Haiku 4.5 $0.00003 $0.00707

Measured 1mo ago against content hash 1c9339c3014a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plan-feature 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 1mo 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.

skills/plan-feature/SKILL.md · 398 lines

How it starts

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

/cc-code:plan-feature — 增量需求规划器(第一动作即 plan 模式)

⭐⭐⭐ 触发后第一动作 = call EnterPlanMode 工具。 ⚙️ 引擎分支(双端同一条规则):无 EnterPlanMode 工具的引擎(如 Codex)→ 第一动作改跑 Bash mkdir -p .cc_code/.runtime && touch .cc_code/.runtime/plan-lock 开护栏(此后写盘被 gate.sh 拦),出关经主人确认落盘清单后 rm .cc_code/.runtime/plan-lock。 所有体检 / 侦察 / 三件套 / 交谈都在 plan 模式内做,没有 plan 外窗口。 适用场景:MVP 已交付,在既有实现上做功能迭代。 0→1 定全量请用 /cc-code:plan-mvp。

⛔ 六条铁律(违反任一即本次规划无效)

铁律 1:第一动作 call EnterPlanMode

触发后,在 call EnterPlanMode 之前,不许做任何动作:

  • ❌ 不许先 Read Agent.md / status.md
  • ❌ 不许先 codegraph 探测
  • ❌ 不许先输出三件套
  • ❌ 不许先输出「请主人审阅决策清单」
  • ✅ 唯一允许的第一动作:call EnterPlanMode 工具

铁律 2:codegraph 只准校准 L3,永不许生成 L1 / L2 / L4

这是插件信息流铁律,本 skill 最易踩的坑 —— 迭代场景下代码已存在,AI 会本能地"读代码推需求",那是需求层被实现层反向污染。

codegraph 的产出只许流向三处:
  ✅ 判定「已实现 / 未实现」            —— 纯事实陈述
  ✅ 算改动爆炸半径(impact / callers)  —— 纯事实陈述
  ✅ 校准 L3 契约的实现状态标记          —— Architect 契约纪律授权

  ⛔ 绝不许反推「所以需求应该是 X」      —— L1 唯一来源 = 主人的话
  ⛔ 绝不许反推「所以断言应该是 Y」      —— L1 / L4 禁生成
  ⛔ 绝不许反推「所以界面应该长 Z」      —— L2 唯一来源 = 主人的话

新需求的逻辑与原型只能从【与主人的对话】长出来。
codegraph 只提供「现状那一半」,用于双联对比与冲突取证。

铁律 3:契约漂移禁沉默

codegraph 撞出「代码 ≠ active/api.md / active/data.md 契约」时,立即停下逐条请主人二选一:改代码回归契约 / 修契约并记录。禁止默默按代码算、也禁止默默按契约算。

铁律 4:禁批量决策清单

⛔ 禁止「全量输出决策清单,可全量接受 / 逐项修订 / 否决某项」。 必须逐点提问:一次只问一个模糊点或一条冲突,等主人答,再问下一个。

铁律 5:禁塞单一文件

⛔ 禁止把所有产出一股脑写进 active/prd.md。必须按内容性质路由到对应层的文件,一层一文件一角色(见「五、落盘路由表」)。

铁律 6:越权红线

⛔ active/gates.md         —— QA 唯一域,本 skill 绝不写
⛔ src/ 与测试目录          —— Dev 唯一域,本 skill 绝不写
⛔ active/Agent.md 权限路由表 —— 人的域,一个字不许动
✅ active/Agent.md「当前激活角色」一行 —— 落盘阶段按批次代笔改(对话定稿即授权,免请示)

一、生命周期总览

触发 /cc-code:plan-feature "<新需求>"
  │
Step0 ⭐ call EnterPlanMode(第一动作,Write/Edit 当场锁死)
  │ ══════════════ 以下全程 plan 模式内(只读 + 文字输出)══════════════
Step0.5 规范体检门
  │   项目 active/Agent.md ⟷ 插件规范比对
  │     宪法比规范薄 → ⚠️提醒升级,不阻断,按插件规范推进
  │     目录形态偏离 → ⛔停手,要求先跑 /cc-code:init
  │
Step1 基线锁定(只读,守上下文最小化)
  │   Agent.md   → 锁角色权限路由表
  │   status.md  → 当前坐标 · 下一步=已规划未开发 · Blockers
  │   prd.md     → 章节标题 + 模块清单(✅状态列=已开发)+ 断言最大编号 + Out of Scope
  │   gates.md   → 已 PASS / FAIL / UNVERIFIABLE / ESCALATE
  │   ⛔ 不读 back_up/(历史是人的,AI 判断已开发用模块清单状态列 + gates 实测)
  │
Step2 codegraph 侦察(受铁律 2 约束,只取事实)
  │   ⓪ 新鲜度保险 → status --json:pendingChanges 非 0 则先 sync
  │   ① explore(需求原话) → query(实体名) → node(读符号)
  │   ② impact(核心符号) → 传递闭包真半径(比 callers 一层准)
  │   ③ files → 目录树现状 ⟷ project.md §三 目录规约 对账
  │   ④ affected(涉及文件) → 测试影响面,写进差异表
  │   顺手撞契约漂移 → 触发铁律 3
  │
Step3 需求逐点三态判定(禁悬空,每点必须落格)
  │   ✅已实现 / ⚪未实现无冲突 / ⛔未实现有冲突
  │
Step4 冲突逐条硬门控(一次一条,四选一,未裁决完禁 ExitPlanMode)
  │
Step5 输出三件套(ascii)
  │   ① 逻辑图  ② 原型双联  ③ 差异表(带落盘路由列)
  │
Step6 逐点循环至通顺(⛔禁批量决策清单)
  │     否 → 问下一个 → 回 Step5 刷新
  │
Step7 两门齐开才 call ExitPlanMode
  │ ══════════════ 退出 plan 模式 ══════════════
Step8 按层分批切角色落盘(PM 批 → Architect 批,免请示)
  │
Step9 顺手更新 status.md 坐标(点名 F-n + 新断言号)
  │      → 提示走 /cc-code:agent-feature

Read the full file on GitHub · 398 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed · +1 lines 1c9339c3014a
  2. 1mo ago Changed · -254 tokens per session 38062fef0794
  3. 1mo ago Changed · +6 lines 481ea21d4bcc
  4. 1mo ago First seen · 391 lines · 282 tokens per session scan A 05a655c93684

Subscribe to this mod's changes

plan-feature is a skill published in the GitHub repository weiyi88/cc-code (5 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 7,075 once invoked, about $0.0001 per session on Opus 5.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-09-13.