write-plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWrite Plan Skill
Write Plan Skill
Automatically capture every agent-produced plan as a discoverable file in
— so plans are preserved locally but never pollute the git tree.
.agentic/plans/When a plan is tied to a GitHub issue and issue persistence is desired, prefer
for issue-backed plan persistence on GitHub (prefer MCP,
fallback to CLI). Keep this skill as the local-file persistence path.
github-issue-planningghThis skill is agent-invoked, not user-invoked. Do not prompt the user for metadata. Derive everything from context and write silently.
自动将Agent生成的所有计划捕获为.agentic/plans/目录下可检索的文件——这样计划会在本地保存,但不会污染Git提交历史。
如果计划关联到GitHub Issue,且需要将计划与Issue绑定存储,优先使用在GitHub上实现基于Issue的计划存储(优先使用MCP,备选方案为 CLI)。本技能仅作为本地文件存储方案。
github-issue-planninggh本技能由Agent触发,而非用户触发。 请勿向用户请求元数据。所有信息均从上下文提取,静默执行写入操作。
Step 1 — Derive Metadata from Context
步骤1 — 从上下文提取元数据
Extract automatically — no prompts:
- Title: from the plan's main heading or the task description.
- Type: infer from the nature of the work:
- — new capability being added
feature - — structural or design decision
architecture - — a choice between alternatives
decision - — improving existing code without behaviour change
refactor - — exploring a problem or unknown
investigation
- Status: always on auto-save.
draft - Affected: list of modules, files, or systems touched by the plan.
- Author: the agent name or model identifier.
自动提取——无需提示:
- 标题:来自计划的主标题或任务描述。
- 类型:根据工作性质推断:
- — 新增功能
feature - — 架构或设计决策
architecture - — 多方案选择决策
decision - — 在不改变功能的前提下优化现有代码
refactor - — 问题探索或未知领域调研
investigation
- 状态:自动保存时始终为(草稿)。
draft - 影响范围:计划涉及的模块、文件或系统列表。
- 作者:Agent名称或模型标识符。
Step 2 — Build the Filename
步骤2 — 生成文件名
YYYY-MM-DD-{kebab-case-title}.mdRules:
- Use today's date in format.
YYYY-MM-DD - Slugify the title: lowercase, replace spaces and special characters with , strip leading/trailing hyphens.
- - If a file with the same slug already exists for today, append ,
-2, etc.-3
Examples:
2026-04-04-add-golang-manual-di-skill.md
2026-04-04-refactor-auth-module.mdYYYY-MM-DD-{kebab-case-title}.md规则:
- 使用当日日期,格式为。
YYYY-MM-DD - 将标题转换为别名格式:小写,空格和特殊字符替换为,移除首尾的
-。- - 如果当日已存在相同别名的文件,则追加、
-2等后缀。-3
示例:
2026-04-04-add-golang-manual-di-skill.md
2026-04-04-refactor-auth-module.mdStep 3 — Write the Plan File
步骤3 — 写入计划文件
Save to using as the structure.
.agentic/plans/{filename}plan-template.mdMandatory sections (never omit):
- Context — what situation or problem prompted this plan?
- Goals — verifiable bullet points (done / not done).
- Approach — key decisions, alternatives considered, rationale.
- Steps — ordered list of concrete tasks.
- Risks & Open Questions — unknowns and blockers.
- Outcome — leave blank; filled in when status moves to .
completed
以为模板,将内容保存到。
plan-template.md.agentic/plans/{filename}必填章节(不可省略):
- 背景:触发本计划的场景或问题是什么?
- 目标:可验证的要点(完成/未完成)。
- 方案:关键决策、备选方案及理由。
- 步骤:具体任务的有序列表。
- 风险与待解决问题:未知事项与阻碍因素。
- 结果:留空;当状态变为(已完成)时填写。
completed
Step 4 — Ensure .agentic/plans/
is Gitignored
.agentic/plans/步骤4 — 确保.agentic/plans/
已加入Git忽略列表
.agentic/plans/Check the project's . If is not present, add it:
.gitignore.agentic/plans/undefined检查项目的文件。如果未在其中,则添加:
.gitignore.agentic/plans/undefinedAgentic — local plan files (managed by write-plan skill)
Agentic — local plan files (managed by write-plan skill)
.agentic/plans/
This ensures plan files are never accidentally committed.
---.agentic/plans/
这可确保计划文件不会被意外提交。
---Step 5 — Upsert the Plans Index
步骤5 — 更新计划索引
Append one row to . Create the file with this header if it does not exist:
.agentic/plans/INDEX.mdmarkdown
undefined向追加一行内容。如果该文件不存在,则创建并添加以下表头:
.agentic/plans/INDEX.mdmarkdown
undefinedPlans Index
Plans Index
| Date | Title | Type | Status | File |
|---|
Append:
```markdown
| YYYY-MM-DD | {Title} | {Type} | {Status} | [{filename}]({filename}) || Date | Title | Type | Status | File |
|---|
追加内容:
```markdown
| YYYY-MM-DD | {Title} | {Type} | {Status} | [{filename}]({filename}) |Step 6 — Clean Up Any PLAN.md
步骤6 — 清理所有PLAN.md文件
If a exists in the working directory or repo root, delete it after saving
to . This is the primary reason this skill exists — at the
repo root is a commit accident waiting to happen.
PLAN.md.agentic/plans/PLAN.md如果工作目录或代码仓库根目录中存在文件,在将计划保存到后删除该文件。这正是本技能存在的主要原因——仓库根目录下的很容易被意外提交。
PLAN.md.agentic/plans/PLAN.mdStep 7 — Report
步骤7 — 生成报告
Emit exactly one line:
Plan saved: .agentic/plans/{filename}Do not emit anything else unless there was an error.
输出以下内容,且仅输出一行:
Plan saved: .agentic/plans/{filename}除非发生错误,否则不得输出其他内容。