Simon Willison ★ 84 2 min

Guides

🔗 https://simonwillison.net/guides/

📌 如何與 Claude Code 等編碼代理(Coding Agents)協作?Simon Willison 的實務指南

TL;DR:透過掌握 Agentic Engineering 模式,讓 AI 代理協助開發,而非僅僅是生成程式碼。

隨著 Claude Code 與 OpenAI Codex 等編碼代理(Coding Agents)的出現,開發流程正在發生根本性的改變。如何從「寫程式」轉向「引導代理進行工程實務」,已成為現代開發者的核心課題。

🧩 從寫程式轉向 Agentic Engineering

現在「寫程式」的成本已大幅降低,但這並不代表開發變得簡單,而是開發範式轉向了「代理工程」(Agentic Engineering)。這套指南探討了如何利用 AI 代理來提升程式碼品質,而非僅僅是追求產出速度。

💡 提升效能的開發模式與實務

根據 Simon Willison 的整理,與編碼代理協作時可以參考以下核心模式:

  • 利用 Git 管理工作流:將 Git 與編碼代理結合,利用版本控制來檢視與管理代理生成的變動。
  • 採用 Red/Green TDD(測試驅動開發):利用代理來執行測試驅動開發流程,確保生成內容的正確性。
  • 先執行測試再開始:在交給代理處理前,先確保現有的測試環境正常運作。
  • 代理手動測試:除了自動化測試,也可以利用代理協助進行手動測試流程。
  • 線性導覽與互動式解釋:透過結構化的流程引導代理,並要求其針對實作內容提供互動式的解釋。

⚠️ 應避免的反模式(Anti-patterns)

指南中特別強調了「反模式」的重要性,開發者應避免在不適用的情境下盲目依賴代理,以免造成程式碼品質下降或開發流程混亂。

🎯 實務啟示

面對 AI 代理,開發者的價值不再僅在於「寫出程式碼」,而是在於「如何設計流程」來引導代理。透過結合 Git、TDD 以及嚴謹的測試流程,才能真正發揮 Agentic Engineering 的威力,讓 AI 成為提升程式碼品質的工具,而非僅是自動化工具。

🔗 來源

#AI #Coding #ClaudeCode #OpenAICodex #AgenticEngineering #SoftwareDevelopment #TDD #Git #Programming #Productivity

原始資料 Simon Willison · 收集於 2026-08-07
來源原標題
Guides
作者
Simon Willison
原始標籤
blog
原始連結
https://simonwillison.net/guides/

摘要原文

Patterns for getting the best results out of coding agents like Claude Code and OpenAI Codex. See my introduction for more on this project. Patterns for getting the best results out of coding agents like Claude Code and OpenAI Codex. See my introduction for more on this project. 16 chapters: What is agentic engineering? , Writing code is cheap now , Hoard things you know how to do , AI should help us produce better code , Anti-patterns: things to avoid , How coding agents work , Using Git with coding agents , Subagents , Red/green TDD , First run the tests , Agentic manual testing , Linear walkthroughs , Interactive explanations , GIF optimization tool using WebAssembly and Gifsicle , Adding a new content type to my blog-to-newsletter tool , Prompts I use

tencent/hy3:free 自動生成