[推薦] Agent Skills

Source

https://addyosmani.com/blog/agent-skills/

Summary

  1. AI coding agent 預設會走「最短路徑」

Agent 很會寫 code,但不會自然地遵守工程紀律。

  1. Skill 不是 reference doc,而是 workflow

好的 skill 應該包含:

  • 明確步驟
  • checkpoint
  • 可驗證的輸出
  • exit criterion
  1. 「Process over prose」是核心原則

Workflows over reference. Steps with exit criteria over essays.

  1. Anti-rationalization tables 很值得偷

先列出 agent 或工程師常見的偷懶理由,再直接寫好反駁。比如:

  • 測試之後再補 -> 沒有「之後」,現在就寫 failing test
  • 這個 task 很小,不需要 spec -> 小 task 也需要 acceptance criteria
  1. Verification 是不可跳過的 exit criterion

每個 skill 都應該以「具體證據」作為結束條件。

  1. Skill 要 progressive disclosure,不要一次塞滿 context

不應該把所有 skills 一次塞進 context。比較好的方式是:

  • 用一個 meta-skill / router 判斷現在是哪個 phase
  • 只載入當前任務需要的 skill
  • 其他規則先留在檔案裡,不污染 context
  1. Agent Skills 的本質是「把 senior engineer discipline 編碼化」
  • 先釐清假設
  • requirement 衝突時停下來問
  • 必要時 push back
  • 優先選 boring solution
  • 只改被要求改的範圍
  • 用證據關閉任務
cmd + /