什么是 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