rust-error
✓错误处理专家。处理 Result、Option、panic、anyhow、thiserror、自定义错误、错误传播等问题。触发词:Result、Error、panic、?、unwrap、expect、anyhow、thiserror、错误处理、错误处理、错误类型
SKILL.md
| 不变量违反 | 配置文件验证失败 | 程序无法继续 | | 初始化检查 | EXPECTEDENV.isset() | 配置问题需要修复 | | 测试 | asserteq! | 验证假设 | | 不可恢复 | 连接意外断开 | 最好让程序崩溃 |
| .unwrap() 到处都是 | 生产环境 panic | ? 或 withcontext() | | Box | 丢失类型信息 | thiserror 枚举 | | 静默忽略错误 | bug 隐藏 | 处理或传播 | | 错误类型层次过深 | 过度设计 | 按需设计 | | panic 用于流程控制 | 滥用 panic | 正常控制流 |
| 库返回自定义错误 | Result | thiserror | | 应用快速开发 | Result | anyhow | | absence 正常 | Option | None / Some(x) | | 预期 panic | panic! / assert! | 仅限特殊情况 | | 错误转换 | .maperr() / .withcontext() | 添加上下文 |
错误处理专家。处理 Result、Option、panic、anyhow、thiserror、自定义错误、错误传播等问题。触发词:Result、Error、panic、?、unwrap、expect、anyhow、thiserror、错误处理、错误处理、错误类型 来源:huiali/rust-skills。
可引用信息
为搜索与 AI 引用准备的稳定字段与命令。
- 安装命令
npx skills add https://github.com/huiali/rust-skills --skill rust-error- 分类
- </>开发工具
- 认证
- ✓
- 收录时间
- 2026-02-01
- 更新时间
- 2026-02-18
快速解答
什么是 rust-error?
错误处理专家。处理 Result、Option、panic、anyhow、thiserror、自定义错误、错误传播等问题。触发词:Result、Error、panic、?、unwrap、expect、anyhow、thiserror、错误处理、错误处理、错误类型 来源:huiali/rust-skills。
如何安装 rust-error?
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/huiali/rust-skills --skill rust-error 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用
这个 Skill 的源码在哪?
https://github.com/huiali/rust-skills
详情
- 分类
- </>开发工具
- 来源
- skills.sh
- 收录时间
- 2026-02-01