From google-eng-practices
主動式技能 — 在所有程式碼撰寫與 review 活動中自動套用:(1) 撰寫程式碼時:執行小型 CL 原則——每個變更應自成一體,100 行合理、1000 行太大,重構與行為變更需分開。(2) 建立 PR 時:自動產生高品質描述,包含 what/why/context 結構。(3) 審查程式碼或 PR 時:套用 Google reviewer 標準——設計、功能、複雜度、測試、命名、註解、風格、文件。基於 Google Engineering Practices。
How this skill is triggered — by the user, by Claude, or both
Slash command
/google-eng-practices:google-eng-practicesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
基於 [Google Engineering Practices](https://google.github.io/eng-practices/) 整理,涵蓋 reviewer 與 author 兩個角色的最佳實踐。
基於 Google Engineering Practices 整理,涵蓋 reviewer 與 author 兩個角色的最佳實踐。
以下行為在對應場景中自動觸發,不需要使用者手動要求:
| 面向 | 重點 |
|---|---|
| 設計 | 架構合理?功能放對位置? |
| 功能 | 符合意圖?邊界情況?並行安全? |
| 複雜度 | 讀者能快速理解?避免過度工程 |
| 測試 | 正確、有意義、程式壞了會失敗 |
| 命名 | 清楚傳達意圖,不過長 |
| 註解 | 說明「為什麼」而非「做什麼」 |
| 風格 | 遵循 style guide,非必要標「Nit:」 |
| 文件 | 影響使用方式時更新文件 |
審查步驟: 先看全貌(CL 是否該做)→ 看主要邏輯 → 逐行看其餘檔案
CL(Changelist): 一個獨立的、可審查的變更單位,等同於 GitHub 的 pull request。
LGTM(Looks Good to Me): Reviewer 核准 CL 時的用語。
審查的黃金準則: 只要 CL 確實改善了整體程式碼健康度,就應該核准,即使它不完美。不存在完美的程式碼,只有更好的程式碼。
技術事實優先於個人偏好。 當多種方案都有充分依據時,尊重作者的選擇。
兩個 skill 各司其職,自動配合:
| 時機 | atomic-conventional-commits | google-eng-practices |
|---|---|---|
| 寫程式碼時 | 完成邏輯變更 → 立即 commit | 確保變更範圍小且自洽 |
| commit 時 | 格式化 commit message | — |
| 建立 PR 時 | — | 產生高品質 PR 描述 |
| Code Review 時 | — | 套用 Reviewer 審查標準 |
留言原則: 對事不對人、說明理由、標示嚴重程度(Nit/Optional/FYI)、鼓勵好的做法
詳細 Reviewer 指南:見 references/reviewer-guide.md 詳細 Author 指南:見 references/author-guide.md
符合緊急條件: 重大上線回滾、影響使用者的正式環境錯誤、重大安全漏洞、法律問題
不算緊急: 想在本週而非下週上線、開發者想結束長期工作、reviewer 不在線、經理的軟性截止日
緊急 CL 優先審查速度和正確性,但事後必須進行完整審查。
npx claudepluginhub abjutus/my-claude-plugins --plugin google-eng-practicesGuides developers to keep pull requests small, focused, and independently reviewable for faster, more thorough code reviews and safer rollbacks.
Guides code review practices, highlighting common issues and areas for improvement. Activates when reviewing pull requests or code changes.
Enforces code review loop: prepares reviewable PRs with structured titles/descriptions/verification, dispatches code-reviewer/security agents on diffs, ensures feedback engagement.