rust-error-handling-review

Review Rust error propagation, panic paths, and recovery behavior in code changes.

2|Updated May 6, 2026
One-click install
npx skills add https://github.com/bpcakes/jig-skills --skill rust-error-handling-review-bpcakes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-error-handling-review
Source: https://github.com/bpcakes/jig-skills/tree/main/plugins/jig-rust/skills/rust-error-handling-review
Command: npx skills add https://github.com/bpcakes/jig-skills --skill rust-error-handling-review-bpcakes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Rust error handling defects like swallowed errors, ambiguous diagnostics, and hidden panic paths are easy to miss in code review. This Skill systematically traces error flows through a diff or file set and reports only evidence-backed findings with concrete fixes. ## Core Features & Use Cases - Error Propagation Analysis: Traces errors from origin to final handler, detecting discarded results, lost context, and error type design issues involving anyhow, thiserror, and #[from] conversions. - Recovery and Resilience Review: Investigates panic paths (unwrap, indexing, RefCell borrows), retries, timeouts, cleanup, and spawned task outcomes with reachability evidence. - Use Case: After staging changes to a Rust service, ask for an error handling review and receive severity-ranked findings with file locations, failure conditions, counterevidence considered, and minimal suggested fixes. ## Quick Start Review the error handling in my current staged and unstaged Rust changes and report findings with file locations without editing code.

Frequently Asked Questions about rust-error-handling-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Rust error handling in a pull request?

Request an error handling review scoped to your staged or unstaged changes, a branch comparison, or named files. The review traces errors from origin to final handler and reports findings with severity, location, and concrete fixes without editing code.

What Rust error patterns does this review detect?

It detects discarded results like `.ok()` and empty error arms, lost context in `.map_err`, panic paths from `unwrap` and indexing, missing retries or timeouts, cleanup failures, and unobserved spawned task outcomes. Each finding requires a reachable failure condition and consequence.

Should I use anyhow or thiserror for Rust error types?

Both are valid choices and the review does not mandate one library per layer. It only reports when a real caller loses required recovery information or must depend on hidden representations, regardless of which error library is used.

Does having many #[from] variants mean my error enum is overused?

No, four or more `#[from]` variants do not establish overuse. The review traces what each conversion preserves and what callers need, reporting context loss only when a relevant operation or recovery distinction is actually lost.

When should I not run a Rust error handling review?

Do not run it as a repository-wide audit when the diff is empty; the review is scoped to the requested target. It also does not change dependencies or error strategy, and reports findings without editing unless fixes are explicitly requested.