人來過

Anthropic 官方 52 句 Claude Code 提示詞

按開發 5 階段 · 中英對照 · 每句一鍵複製,直接貼進 Claude Code

← 返回首頁 關於我 · 省 token 術 · Threads
Anthropic 官方整理了一份 Claude Code 提示詞庫,我把裡面的 52 句按開發 5 階段翻成中文、附上官方英文原文,每句都能一鍵複製。

用法:先看你現在卡在哪一階段,挑對應的句子複製,把大括號 { } 換成你的情況,貼進 Claude Code 就能用。中文順口、英文最貼近官方,兩種都能用。

來源:Claude Code Prompt library(官方文件)

Discover 摸清專案7 組

剛接手、看不懂全貌時,先讓它帶你摸清這個 codebase。

幫我看整個 codebase:架構、關鍵目錄、各部分怎麼串接give me an overview of this codebase: architecture, key directories, and how the pieces connect
說明 {檔案} 在做什麼、資料怎麼在裡面流動,用 {格式} 寫成一份explain what {path} does and how data flows through it. write it up as {format}
我們在哪裡處理 {某行為}?where do we {behavior}?
如果我刪掉 {目標},會壞掉哪些地方?what would break if I deleted {target}?
看過 {檔案} 的 commit 歷史,摘要它怎麼演變、為什麼look through the commit history of {path} and summarize how it evolved and why
要做到 {改動},我需要動到哪些檔案?which files would I need to touch to {change}?
我是 {角色},走一遍使用者 {操作} 時、從 UI 到結果發生了什麼I am a {role}. walk me through what happens when a user {action}, from the UI down to the result

Design 先規劃6 組

別一開始就寫。先讓它把方案、邊界、取捨想清楚。

規劃怎麼把 {目標} 重構成 {目標狀態},列出你會改的檔案,但先別動手plan how to refactor the {target} to {goal}. list the files you would change, but don't edit anything yet
我想做 {功能},先訪談我:實作、UX、邊界情況、取捨,問到夠清楚為止I want to build {feature}. interview me about implementation, UX, edge cases, and tradeoffs until you have enough
讀 {輸入},整理成行動項,然後在 {追蹤系統} 各開一張含驗收標準的 ticketread {input} and write up the action items, then create a {tracker} ticket for each with acceptance criteria
列出 {功能} 需要涵蓋的錯誤狀態、空狀態、邊界情況list the error states, empty states, and edge cases for {feature} that the design needs to cover
這是一份 mockup,做成我可以點擊操作的原型,符合版面與各種狀態here is a mockup. build a working prototype I can click through, matching the layout and states
實作這個設計,然後截圖結果、和原稿比對、修掉差異implement this design, then take a screenshot of the result, compare it to the original, and fix the differences

Build 動手做22 組

讓它照專案既有節奏做,寫完也要收斂。

看 {範例} 怎麼實作、理解它的模式,然後照同樣方式做 {新的東西}look at how {example} is implemented to understand the pattern, then build {new} the same way
找出 {範圍} 裡沒有 {格式} 註解的地方並補上,符合檔案既有風格find {scope} without {format} comments and add them, matching the style already used in the file
加一個 {端點},回傳 {payload}add a {endpoint} endpoint that returns {payload}
用 HTML、CSS、原生 JavaScript 做一個 {工具},然後在我的瀏覽器打開create a {tool} using HTML, CSS, and vanilla JavaScript, then open it in my browser
讀 issue #{編號},實作修正,並跑測試read issue #{issue}, implement the fix, and run the tests
找出所有寫「{文案}」或近似說法的地方,一一在情境中標給我看,然後全部更新find every place we say "{copy}" or a close variant, show me each one in context, then update them
讀 {資料夾} 裡的 {範例},學它的結構和語氣,然後幫 {主題} 草擬一份新的read the {examples} in {folder} to learn the structure and voice, then draft a new one for {topic}
幫 {路徑} 寫測試、跑、修掉所有失敗write tests for {path}, run them, and fix any failures
先幫 {功能} 寫測試,再實作到它們全部通過write tests for {feature} first, then implement it until they pass
讀 {報告},幫覆蓋率最低的檔案補測試,直到每個都超過 {目標}%read {report} and add tests for the lowest-covered files until each is above {target}%
把所有東西從 {舊} 遷移到 {新}:找出每個要改的地方,然後動手改migrate everything from {from} to {to}: identify every place that needs to change, then make the changes
把 {來源} 移植到 {目標},保持 {要保留的東西} 一樣port {source} to {target}, keeping the same {keep}
優化 {目標},把 {指標} 從 {現值} 壓到 {目標值} 以下optimize {target} to bring {metric} from {current} down to under {goal}
{元素} 在 {裝置} 上超出 {容器} {幅度},修掉它the {element} extends {amount} beyond the {container} on {viewport}. fix it.
幫我 review 未提交的改動,commit 前標出任何看起來有風險的地方review my uncommitted changes and flag anything that looks risky before I commit
review PR #{編號},摘要改了什麼,然後列出任何疑慮review PR #{pr} and summarize what changed, then list any concerns
這是我的 Terraform plan 輸出,它會做什麼、有沒有東西會出事?here is my Terraform plan output. what is this going to do, and is anything here going to cause problems
用 subagent 檢查 {路徑} 的資安問題,回報它發現什麼use a subagent to review {path} for security issues and report what it finds
幫 {檔案} 檢查 {關注點},列出送 {reviewer} 前我該修的review {file} for {concerns} and list anything I should fix before it goes to {reviewer}
這樣不對:{回饋},換個做法that is not right: {feedback}. try a different approach
改太多了,只保留對 {範圍} 的改動,其他還原that is too much. keep only the changes to {scope} and undo your other edits
你一直 {錯誤},在 CLAUDE.md 加一條規則讓這件事別再發生you keep {mistake}. add a rule to CLAUDE.md so this stops happening

Ship 出貨5 組

出貨前先搞清楚自己改了什麼,讓交付乾淨。

解掉這個分支的 merge conflict,並說明你從每一邊各保留了什麼resolve the merge conflicts in this branch and explain what you kept from each side
幫這些改動 commit,訊息要摘要我做了什麼commit these changes with a message that summarizes what I did
找 {追蹤系統} 裡關於 {主題} 的 ticket,開一個 PR 實作它find the {tracker} ticket about {topic} and open a PR that implements it
比較 {舊} 到 {新},草擬 release notes,按 功能/修復/破壞性變更 分組compare {from} to {to} and draft release notes grouped by feature, fix, and breaking change
寫一個 GitHub Actions workflow,每次 push 到 {分支} 就 {步驟}write a GitHub Actions workflow that {steps} on every push to {branch}

Operate 維運除錯12 組

上線後,讓它當你的維修技師:查錯、除錯、沉澱規則。

{測試} 這個測試在失敗,找出原因並修掉the {test} test is failing, find out why and fix it
使用者在 {地方} 看到 {症狀},調查並告訴我發生什麼事users are seeing {symptom} on {where}. investigate and tell me what is going on
這是一個 build error,修掉根本原因並驗證 build 成功here is a build error. fix the root cause and verify the build succeeds
{症狀},檢查 log、近期部署、設定變更,然後告訴我最可能的原因{symptom}. check the logs, recent deploys, and config changes, then tell me the most likely cause
這是 {console} 的截圖,走一遍為什麼 {資源} 出問題,並給我確切修法here is a screenshot of {console}. walk me through why {resource} is failing and give me the exact fix
給我 {範圍} 在 {時間範圍} 內的所有 {事件},寫 query、跑它、告訴我哪裡值得注意show me all {events} for {scope} over {timeframe}. write the query, run it, and tell me what stands out
讀 {檔案},摘要關鍵模式,把結果寫到 {輸出}read {file}, summarize the key patterns, and write the results to {output}
讀 {檔案},找出表現不佳的 {項目},生成 {n} 個新版本、都控制在限制內read {file}, find the underperforming {items}, and generate {n} new variations that stay under the limit
幫這個專案做一個 /{名稱} skill,做 {步驟}create a /{name} skill for this project that {steps}
寫一個 hook,每次 {事件} 後就 {動作}write a hook that {action} after every {event}
設好 {伺服器} MCP server,讓你能直接讀我的 {資料}set up the {server} MCP server so you can read my {data} directly
摘要這次 session 做了什麼,並建議哪些要加進 CLAUDE.mdsummarize what we did this session and suggest what to add to CLAUDE.md

剛開始用 Claude Code?

先看我整理的省 token、自動化做法,一行 code 不會也能上手

看 Claude Code 省 token 術 →

想更深入?我其他幾篇

想跟一群人一起學 AI?

加入我的免費 LINE 學習社群,裡面有實作分享、問答,還有我持續丟的工具與資源

加入 Leo AI 學習社群 →

覺得有用?引用這篇分享給更多人