什麼是 better-result-adopt?
將程式碼庫從 try/catch 或基於 Promise 的錯誤處理遷移到更好的結果。在採用結果類型、將引發的異常轉換為類型化錯誤或將現有錯誤處理重構為面向鐵路的程式設計時使用。 來源:dmmulroy/better-result。
將程式碼庫從 try/catch 或基於 Promise 的錯誤處理遷移到更好的結果。在採用結果類型、將引發的異常轉換為類型化錯誤或將現有錯誤處理重構為面向鐵路的程式設計時使用。
透過命令列快速安裝 better-result-adopt AI 技能到你的開發環境
來源:dmmulroy/better-result。
Migrate existing error handling (try/catch, Promise rejections, thrown exceptions) to typed Result-based error handling with better-result.
Begin migration at I/O boundaries (API calls, DB queries, file ops) and work inward. Don't attempt full-codebase migration at once.
| Domain errors | NotFound, Validation | TaggedError + Result.err | | Infrastructure | Network, DB connection | Result.tryPromise + TaggedError | | Bugs/defects | null deref, type error | Let throw (becomes Panic if in Result callback) |
將程式碼庫從 try/catch 或基於 Promise 的錯誤處理遷移到更好的結果。在採用結果類型、將引發的異常轉換為類型化錯誤或將現有錯誤處理重構為面向鐵路的程式設計時使用。 來源:dmmulroy/better-result。
為搜尋與 AI 引用準備的穩定欄位與指令。
npx skills add https://github.com/dmmulroy/better-result --skill better-result-adopt將程式碼庫從 try/catch 或基於 Promise 的錯誤處理遷移到更好的結果。在採用結果類型、將引發的異常轉換為類型化錯誤或將現有錯誤處理重構為面向鐵路的程式設計時使用。 來源:dmmulroy/better-result。
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/dmmulroy/better-result --skill better-result-adopt 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/dmmulroy/better-result