不再對 Claude Code 重複說同一件事
何時使用: 你已經說了三次「用 lodash isEmpty,不要用 !arr.length」,但它一直回頭用舊寫法。
步驟
-
捕捉下一次修正Use pro-workflow. Capture this rule: 'Use lodash isEmpty for emptiness checks; never !arr.length'. Scope: src/utils/.✓ 已複製→ 規則已儲存含範圍;CLAUDE.md 已更新
-
驗證下次對話Tomorrow: ask Claude to clean up an empty-check pattern in src/utils/.✓ 已複製→ Claude 使用 isEmpty,無需再次提示
-
每月稽核規則集List all captured rules. Anything stale or superseded?✓ 已複製→ 含最後套用日期的規則清單;修剪過期規則
結果: 每次修正只需付出一次代價,而非每週重複。
注意事項
- 範圍過廣的規則(「始終使用函數式風格」)適得其反 — 將規則範圍限定至目錄或功能區域;具體勝於抽象