* Claude Code 官網 https://www.anthropic.com/claude-code * Claude Code 的 PM: https://x.com/_catwu ## 官方資料 * 文件 * https://docs.anthropic.com/en/docs/claude-code/overview 看完 Getting started 這幾篇 * https://docs.anthropic.com/en/docs/claude-code/common-workflows * 有 SDK 可用 * 可以 command line 呼叫,例如 claude -p "你的prompt" * https://x.com/kregenrek/status/1933216521636983001 (2025/6/13) * https://docs.anthropic.com/en/docs/claude-code/sdk * 可在 IDE 例如 cursor 裡面執行,有一些整合例如方便選擇 code context、看 diff 等 * 可裝 Github Actions * https://docs.anthropic.com/en/docs/claude-code/github-actions * 可以在 Github 上做 code review 以及 @claude 叫它做事 * 但要用你的 claude API key 額外花錢,不包含在 Claude 訂閱裡面 - 演講影片 Mastering Claude Code in 30 minutes (2025/5/23) - https://www.youtube.com/live/6eBSHbLKuN0 - 逐字稿截圖: https://ihower.tw/watch/mastering_claude_code_in_30_minutes/ - 根據逐字稿整理: https://claude.ai/public/artifacts/5bc0baa9-5f08-4bb5-905f-b42ff60afd72 - 同一位講者 Boris 的訪談 A conversation on Claude Code (2025/6/5) - https://x.com/alexalbert__/status/1930309974661706173 - https://www.youtube.com/watch?v=Yf_1w00qIKc - 根據逐字稿整理: https://claude.ai/public/artifacts/5403786d-0d06-4303-9835-d5f1a2384447 * 官方 Best practices for agentic coding * https://x.com/alexalbert__/status/1914333320877584397 (2025/4/21) * https://www.anthropic.com/engineering/claude-code-best-practices * 官方 Case Study * https://x.com/_catwu/status/1930703532715626587 (2025/6/6) * https://www-cdn.anthropic.com/58284b19e702b49db9302d5b6f135ad8871e7658.pdf ## 一些文章 * Latent Space 訪談 (2025/5/8) https://www.latent.space/p/claude-code * 根據逐字稿整理: https://claude.ai/public/artifacts/ed2c8b65-373d-41bf-9c98-0ec1008ebfc1 * Claude Code 内部工作原理窥探 (2025/5/6) * https://xxchan.me/ai/2025/05/06/claude-code.html ## 使用經驗分享 * https://x.com/RLanceMartin/status/1913634488418271486 (2025/4/20) * https://steipete.me/posts/2025/claude-code-is-my-computer (2025/6/3) * https://x.com/dotey/status/1931036909448397037 (2025/6/7) * https://diwank.space/field-notes-from-shipping-real-code-with-claude?utm_source=changelog-news (2025/6/7) * https://x.com/hylarucoder/status/1931383154134401131 (2025/6/8) * https://x.com/BadUncleX/status/1932419883687674361 (2025/6/10) * https://www.youtube.com/watch?v=rWkbrb1R9kY (2025/6/14) * https://x.com/axtrur/status/1934135527206469994 (2025/6/15) ## 我的 Pro Tips 記錄 * 要安裝 Github CLI 讓 Claude code 可以用 * https://cli.github.com/ 獲得 gh 指令 * claude code 內可以 create a pr * 講 pr 即可,claude 知道這就是 pull request 的意思 * 開始用 /init 指令開始建立這個目錄專案的 CLAUDE.md 要記得的東西 * 建議多花時間人工編修這個檔案,讓 AI 更了解你的專案 * 輸入 @ 可以提及特定檔案 * 輸入 \ 和 enter 可以換行輸入 * 可以寫 create subagent 來平行做 tasks * 理論上: 子 agent 應該會有自己的 context window,就不會佔用主 agent 的 context window * 切換模式: shift + tab 可以切換 一般模式、計劃模式、自動接受模式 * 輸入 ! 後可以直接打 bash 指令 * 輸入 # 可以進入記憶模式,告訴 CLAUDE.md 要記憶什麼 * 展開輸出明細 ctrl + r * 可以貼圖片,用 ctrl + v * 可以 think 擴展思考,用 "think", “think more”, “think a lot”, “think harder”, or “think longer” * 但建議要在 Claude 已經有一些上下文時效果最好。如果 Claude 還沒有任何上下文就思考,效果不會很好 * 若離開 CLI 要再回去,可以延續對話: claude --continue * 可以透過 git worktree 功能,來平行跑多個 claude code * claude code 內可以自訂 slash / 指令 * 可安裝 MCP tools: https://docs.anthropic.com/en/docs/claude-code/mcp ### 如何做出 custom command ? > 可以自訂 slash commands 以及可以用 command line 觸發非對話執行。因此你可以把這東西當作 unix-style utility 來用,例如可以做一個 mutli-agent research 指令,觸發N個 sub-agents 平行執行用 web search 搜尋,最後總結成一個報告。這就是一個超厲害的 mutli-agents 可以裝任意 MCP servers 工具跑任意流程,你只需要寫 prompt 就好了。而且費用還是吃 Claude Max Plan,不花 API tokens 錢。 https://www.facebook.com/ihower/posts/10162520766718971 * 相關文件 * https://docs.anthropic.com/en/docs/claude-code/common-workflows#create-custom-slash-commands * https://docs.anthropic.com/en/docs/claude-code/sdk#command-line * 新增 ~/.claude/commands/xyz.md 檔案,裡面是放 prompt,若需要額外帶入參數可用 $ARGUMENTS 表示 * 在 claude code 裡面用 `/xyz 若有額外參數` 就可以執行 * 或是直接 claude -p "/xyz" 也可以執行,不需要進入 claude code 介面 * 還可以加上 --output-format json 和 --allowedTools Edit,Write * 可以不花 API 錢,是用 claude code 訂閱費 * 不過實測要注意不要有 env 變數 ANTHROPIC_API_KEY,不然他會用 API key 會花錢