From 3a6382973e06a9aab7ef1166c61f421da12f66da Mon Sep 17 00:00:00 2001 From: csh Date: Wed, 31 Dec 2025 15:01:29 +0800 Subject: [PATCH] :memo: docs(skills): add create-plan skill --- SKILLS.md | 1 + codex/skills/create-plan/SKILL.md | 74 +++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 codex/skills/create-plan/SKILL.md diff --git a/SKILLS.md b/SKILLS.md index 21e85a4..2ef7986 100644 --- a/SKILLS.md +++ b/SKILLS.md @@ -113,6 +113,7 @@ sh docs/standards/playbook/scripts/install_codex_skills.sh 位于 `codex/skills/`: - `commit-message`:基于 staged diff 自动建议提交信息(`:emoji: type(scope): subject`) +- `create-plan`:生成简明计划(适用于用户明确要求规划编码任务) - `code-review-workflow`:结构化代码评审(正确性/安全/性能/测试) - `style-cleanup`:整理代码风格(优先使用仓库既有 formatter/lint 工具链) - `systematic-debugging`:系统化调试(先复现 → 再定位 → 再修复 → 再验证) diff --git a/codex/skills/create-plan/SKILL.md b/codex/skills/create-plan/SKILL.md new file mode 100644 index 0000000..fdd0050 --- /dev/null +++ b/codex/skills/create-plan/SKILL.md @@ -0,0 +1,74 @@ +--- +name: create-plan +description: Create a concise plan. Use when a user explicitly asks for a plan related to a coding task. +metadata: + short-description: Create a plan +--- + +# Create Plan + +## Goal + +Turn a user prompt into a **single, actionable plan** delivered in the final assistant message. + +## Minimal workflow + +Throughout the entire workflow, operate in read-only mode. Do not write or update files. + +1. **Scan context quickly** + - Read `README.md` and any obvious docs (`docs/`, `CONTRIBUTING.md`, `ARCHITECTURE.md`). + - Skim relevant files (the ones most likely touched). + - Identify constraints (language, frameworks, CI/test commands, deployment shape). + +2. **Ask follow-ups only if blocking** + - Ask **at most 1–2 questions**. + - Only ask if you cannot responsibly plan without the answer; prefer multiple-choice. + - If unsure but not blocked, make a reasonable assumption and proceed. + +3. **Create a plan using the template below** + - Start with **1 short paragraph** describing the intent and approach. + - Clearly call out what is **in scope** and what is **not in scope** in short. + - Then provide a **small checklist** of action items (default 6–10 items). + - Each checklist item should be a concrete action and, when helpful, mention files/commands. + - **Make items atomic and ordered**: discovery → changes → tests → rollout. + - **Verb-first**: “Add…”, “Refactor…”, “Verify…”, “Ship…”. + - Include at least one item for **tests/validation** and one for **edge cases/risk** when applicable. + - If there are unknowns, include a tiny **Open questions** section (max 3). + +4. **Do not preface the plan with meta explanations; output only the plan as per template** + +## Plan template (follow exactly) + +```markdown +# Plan + +<1–3 sentences: what we’re doing, why, and the high-level approach.> + +## Scope +- In: +- Out: + +## Action items +[ ] +[ ] +[ ] +[ ] +[ ] +[ ] + +## Open questions +- +- +- +``` + +## Checklist item guidance +Good checklist items: +- Point to likely files/modules: src/..., app/..., services/... +- Name concrete validation: “Run npm test”, “Add unit tests for X” +- Include safe rollout when relevant: feature flag, migration plan, rollback note + +Avoid: +- Vague steps (“handle backend”, “do auth”) +- Too many micro-steps +- Writing code snippets (keep the plan implementation-agnostic)