一键导入
refine-plan
Evaluate and refine a plan before implementation begins. Use once you think you are ready to present a plan or design to the user.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Evaluate and refine a plan before implementation begins. Use once you think you are ready to present a plan or design to the user.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Rules and style preferences for the usage of git. Use before you interact with git in any way.
Write a handoff document so a fresh session (or another agent) can resume multi-session work with full context. Use when the current session is ending mid-effort, context is running high, or the user asks to "hand off", "hand over", or prepare the next session/slice.
Checklist for wrapping up a session - persist memory, check TODOs, and ensure nothing is lost. Use before marking a task complete or ending a conversation.
Check memory for in-progress tasks and active TODOs at the start of each session. Use at the beginning of every new conversation.
Analyse recent session transcripts to extract learnings, discover pain points, and persist them into memory/skills/rules. Run manually when the retrospective counter is due (session-end reminds you at 5+).
Reduce the amount of code in a changeset or file - remove duplication, dead code, redundancy, and over-verbose constructs - while preserving behaviour. Use when asked to tidy, shrink, deduplicate, DRY up, or simplify code.
| name | refine-plan |
| description | Evaluate and refine a plan before implementation begins. Use once you think you are ready to present a plan or design to the user. |
Score the plan objectively across quality and confidence dimensions. Be brutally honest and do not sugarcoat your opinion.
Split the problem into its component parts. Assign each part an integer score from 1 to 10 for each category below. Calculate the scores objectively and with care.
Quality:
elegance - Does the solution feel right? 10 is most elegant.simplicity - Can this be done with less? 10 is simplest.readability - Can someone understand it in 30 seconds? 10 is most readable.testability - Can simple unit tests be written for it? 10 is most testable. This category can be ignored if there are no existing tests in the workspace.decoupling - Can pieces be changed independently? 10 is least coupled.reusability - Does the solution reduce repetition? 10 is most reusable.focus - Does each piece do exactly one thing? 10 is most focused.Confidence:
feasibility - Do you know how to build it? Are there existing patterns? 10 is most feasible.scope_clarity - Are requirements well-defined? 10 is exact scope defined.For any score below 10, note how it could be improved.
Run the scoring script with your scores and evidence. Pipe the JSON via stdin rather than passing it as a shell argument - inline single-quoted JSON breaks on apostrophes in evidence strings (e.g. "doesn't") and on newlines:
python3 "<base-dir>/score.py" <<'JSON'
<json>
JSON
The JSON must contain:
scores: category -> integer 1-10evidence: category -> concrete citation (required for scores >= 7). Must reference a specific file path, pattern, or verifiable finding.testability_skipped: true (optional, if no tests exist)The script rejects scores >= 7 without evidence. This forces actual research before claiming high scores. Present the full output to the user.
Launch a validation Agent with ONLY the evidence strings and scores:
Verify these claims. For each, read the cited file/pattern/resource and confirm or dispute. Be skeptical - 9+ means near-perfect, which is rare.
- [category]: [score] - "[evidence]" ...
If the validator disputes any score, lower it and re-run the script. Skip this step if the Agent tool is unavailable.
pass: false: improve the plan to address below-threshold categories, re-score ALL categories, and re-run the script. Do not ask the user before improving - just do it. Repeat until the gate passes.pass: true: present the scores and plan to the user.If you cannot reach a passing score after deep investigation, {{TOOL_ASK}}.
Do not start implementation until both quality and confidence averages >= 9.
Once passing, update memory with any learnings from the refinement process.
{{TOOL_WRAP_UP}}
NOTE: if any of the rules contradict existing coding styles or best practices in the current project, they can be overridden - but this must be explicitly mentioned to the user.