用 Plan Mode 的精神,讓 Claude Code 在改任何檔案前先交出一份結構化計畫(影響檔案、步驟、風險、驗收標準),你審查、修正、批准後才執行。避免 AI 一頭熱寫一堆你不要的東西。
You are operating in PLAN-FIRST mode. Do NOT edit, create, or delete any files, and do NOT run any state-changing commands until I explicitly reply with the word `APPROVE`. Read-only exploration (searching, reading files, running read-only commands) is allowed and encouraged.
TASK:
{{TASK_DESCRIPTION}}
CONSTRAINTS / CONTEXT:
{{CONSTRAINTS}}
Follow this procedure exactly.
STEP 1 — Explore (read-only):
- Inspect the relevant parts of the codebase before proposing anything. Identify the existing patterns, conventions, and the files most likely involved.
- If a CLAUDE.md / AGENTS.md or similar project guide exists, respect it.
- If anything about the task is ambiguous, list your open questions at the TOP of your response. Make your best assumption for each, label it clearly as an ASSUMPTION, and continue — do not stall waiting for me.
STEP 2 — Produce the PLAN. Output these sections, in order:
1. **Goal restated** — one or two sentences, in your own words, describing what 'done' means.
2. **Files to touch** — a bullet list. For each file: the exact path, and whether it is CREATE / MODIFY / DELETE, plus a one-line reason. If you are unsure a file exists, say so.
3. **Implementation steps** — an ordered list of small, individually reviewable steps. Each step should be something I could verify on its own.
4. **Risks & blast radius** — what could break, what existing behavior this might affect, any migration/data/security/backward-compat concern. Be honest; if you are not sure, say 'uncertain'.
5. **Out of scope** — explicitly list things you will NOT do, so we agree on boundaries.
6. **Acceptance criteria** — a concrete checklist (commands to run, expected outputs, behaviors to observe) that proves the change works. Prefer criteria I can verify mechanically (a test passing, a command exiting 0, a specific UI state).
STEP 3 — Stop and wait.
End your response with: 'Reply APPROVE to execute, or tell me what to change in the plan.'
Rules:
- Keep the plan tight. No filler, no 'as an AI' preamble.
- Do not start implementing in the same message as the plan.
- If after my feedback the plan changes materially, re-print the full updated plan and wait for APPROVE again.
- When I finally reply APPROVE, execute the plan step by step, and after each major step state which acceptance criterion it satisfies.不用離開網站,直接看這組 prompt 跑出來長怎樣(AI 即時生成,扣 1 點)。
不只複製貼上 — 下載後放到 ~/.claude/skills/plan-first-spec-gate/SKILL.md,之後每個 session 自動可用(觸發時自動載入)。
mkdir -p ~/.claude/skills/plan-first-spec-gate && mv ~/Downloads/SKILL.md ~/.claude/skills/plan-first-spec-gate/SKILL.mdNew-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\skills\plan-first-spec-gate" | Out-Null; Move-Item "$env:USERPROFILE\Downloads\SKILL.md" "$env:USERPROFILE\.claude\skills\plan-first-spec-gate\SKILL.md"何時用:任何「動到 3 個以上檔案、改 schema、碰安全/金流、或你還不完全信任 AI 方向」的任務。小型單檔修改或純查詢別用,純浪費時間。 為何有效:這直接對應 Claude Code 真實的 Plan Mode(Shift+Tab 兩次 或輸入 /plan 進入,2026/1 加入),核心精神是「Claude 在改任何檔案前先寫出書面計畫,你審查後才執行」。官方與社群都指出這是『擋掉 9 成 AI 編程錯誤』的工作流,因為審查一段文字遠比審查一堆已寫好的 diff 便宜。 技巧:① 在 {{TASK_DESCRIPTION}} 裡直接點名你預期要改的檔案(例如『改 Hero.tsx、新增 WaitlistForm.tsx』),計畫品質會明顯變好。② 即使你不用這個提示詞,也建議直接按 Shift+Tab 兩次進 Plan Mode 配合。③ 『Out of scope』那段是防止 AI 順手 gold-plating 的關鍵,別刪。④ 批准前真的去讀『Risks & blast radius』和『Files to touch』,這兩段最常暴露方向錯誤。
Open questions: - Q: 新表單送出後要寫進現有的 /api/waitlist 還是新端點? ASSUMPTION: 沿用現有 /api/waitlist。 **Goal restated:** 在首頁 Hero 下方加一個 email 候補表單,送出後寫入既有 waitlist API。 **Files to touch:** - `app/page.tsx` — MODIFY — 在 Hero 後掛入 <WaitlistForm/> - `components/WaitlistForm.tsx` — CREATE — 表單 UI + 送出邏輯 **Implementation steps:** 1. 建 WaitlistForm 元件(含 loading/error/success 三態) 2. 接 /api/waitlist,沿用既有回傳格式 3. 掛進 page.tsx Hero 下方 **Risks & blast radius:** 低。只新增元件 + 一處掛載,不動既有 API。若 /api/waitlist 預期欄位不同會 400(uncertain,需確認)。 **Out of scope:** 不做 email 驗證信、不改資料庫 schema。 **Acceptance criteria:** - [ ] `npm run build` exit 0 - [ ] 輸入 email 送出 → 顯示成功態 - [ ] 空白送出 → 顯示 inline 錯誤 Reply APPROVE to execute, or tell me what to change in the plan.
以上為此 Prompt 丟進 Claude Code 後可得到的描述性成果,實際畫面會因填入的變數而有差異。
[TASK_DESCRIPTION]你要做的事,越具體越好;建議直接點名你預期會改到的檔案路徑
[CONSTRAINTS]限制與背景:技術棧、不可破壞的東西、相依服務、風格慣例、效能/安全要求等
填下面的欄位,上方 prompt 會即時替換 [方括號] 內容。填好後按「複製組好的 prompt」直接丟進工具。
You are operating in PLAN-FIRST mode. Do NOT edit, create, or delete any files, and do NOT run any state-changing commands until I explicitly reply with the word `APPROVE`. Read-only exploration (searching, reading files, running read-only commands) is allowed and encouraged.
TASK:
{{TASK_DESCRIPTION}}
CONSTRAINTS / CONTEXT:
{{CONSTRAINTS}}
Follow this procedure exactly.
STEP 1 — Explore (read-only):
- Inspect the relevant parts of the codebase before proposing anything. Identify the existing patterns, conventions, and the files most likely involved.
- If a CLAUDE.md / AGENTS.md or similar project guide exists, respect it.
- If anything about the task is ambiguous, list your open questions at the TOP of your response. Make your best assumption for each, label it clearly as an ASSUMPTION, and continue — do not stall waiting for me.
STEP 2 — Produce the PLAN. Output these sections, in order:
1. **Goal restated** — one or two sentences, in your own words, describing what 'done' means.
2. **Files to touch** — a bullet list. For each file: the exact path, and whether it is CREATE / MODIFY / DELETE, plus a one-line reason. If you are unsure a file exists, say so.
3. **Implementation steps** — an ordered list of small, individually reviewable steps. Each step should be something I could verify on its own.
4. **Risks & blast radius** — what could break, what existing behavior this might affect, any migration/data/security/backward-compat concern. Be honest; if you are not sure, say 'uncertain'.
5. **Out of scope** — explicitly list things you will NOT do, so we agree on boundaries.
6. **Acceptance criteria** — a concrete checklist (commands to run, expected outputs, behaviors to observe) that proves the change works. Prefer criteria I can verify mechanically (a test passing, a command exiting 0, a specific UI state).
STEP 3 — Stop and wait.
End your response with: 'Reply APPROVE to execute, or tell me what to change in the plan.'
Rules:
- Keep the plan tight. No filler, no 'as an AI' preamble.
- Do not start implementing in the same message as the plan.
- If after my feedback the plan changes materially, re-print the full updated plan and wait for APPROVE again.
- When I finally reply APPROVE, execute the plan step by step, and after each major step state which acceptance criterion it satisfies.這組 prompt 專為 Claude Code 設計。把 prompt 內 2 個方括號 [變數] 換成你自己的內容,貼進 Claude Code 執行即可。難度為入門,新手可以直接套用。
完整 prompt 免費開放閱讀,不用註冊;登入後可一鍵複製、收藏與留言。
prompt 文字本身你可自由使用與修改。但 AI 生成物(圖/音樂/影片/文字)的商用授權,取決於你在 Claude Code 使用的方案與其官方服務條款,請以該工具的授權規範為準。
Studio engineer 視角拆解 Suno 致命弱點(油炸 vocals、高頻 artifact)+ 4 步驟 DAW workflow + Suno Studio 修音 prompt
提案產生器 / 會議處理器 / 內容再利用 / 週五回顧 / 收工 reset — 試了 40 個只有這 5 個沒被丟掉、各省 30+ 分鐘 / 次。
適合:部落格、Medium、Notion 公開頁、Substack — 任何支援 iframe / HTML 嵌入的地方。對方點「看完整」會回到本站、是 prompt 庫的免費 backlink。
<iframe src="https://prompt.luvai.net/embed/claude-code-plan-first-spec-gate" width="100%" height="380" frameborder="0" style="border:1px solid #e0dcd0;border-radius:4px;" loading="lazy" title="PromptCraft Embed"></iframe>
把方括號 [ ] 內的變數換成你的內容,丟進 Claude Code。
六個月在 Claude / GPT-4 / Gemini 上用人工 rater A/B 測 200+ prompt 後寫的。包含 persona+constraint stacking / anti-example / role reversal QA / cognitive scaffold / emotional priming / uncertainty CoT / steelman first。
一年的 role-play system prompt + 14-step framework 後總結:真正改變品質的是 5 個單行 prompt。沒有 role、沒有 markdown、沒有「you are an expert」。