Back to skills
SKILL.md
Check Error Handling
ASecurityValidates error handling follows RunnerError pattern, detects anyhow regression, ensures ErrorKind usage
- 8 stars
- 0 votes
- 0 copies
- 0 views
- Added September 25, 2026
Security analysis
100/100npx -y skills add dravr-ai/dravr-embacle --skill check-error-handling --agent claude-codeAre you the author of Check Error Handling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/dravr-ai-check-error-handling)---
name: check-error-handling
description: Validates error handling follows RunnerError pattern, detects anyhow regression, ensures ErrorKind usage
user-invocable: true
---
# Check Error Handling Skill
## Purpose
Validates that error handling follows the RunnerError/ErrorKind pattern. Detects anyhow regression.
## Usage
Run this skill before committing error handling changes.
## Prerequisites
- ripgrep (`rg`)
## Commands
### Quick Check
```bash
echo "π Checking for anyhow usage..."
# 1. Check imports (FORBIDDEN)
if rg "use anyhow::|use anyhow;" src/ --type rust --quiet; then
echo "β FAIL: anyhow imports detected!"
rg "use anyhow" src/ --type rust -n | head -10
exit 1
else
echo "β PASS: No anyhow imports"
fi
# 2. Check macro usage (FORBIDDEN)
if rg "anyhow!\(" src/ --type rust --quiet; then
echo "β FAIL: anyhow! macro detected!"
rg "anyhow!\(" src/ --type rust -n | head -10
exit 1
else
echo "β PASS: No anyhow! macro"
fi
# 3. Check RunnerError usage
RUNNER_ERROR_COUNT=$(rg "RunnerError::" src/ --type rust | wc -l)
echo "β RunnerError usage: $RUNNER_ERROR_COUNT occurrences"
# 4. Check ErrorKind usage
ERRORKIND_COUNT=$(rg "ErrorKind::" src/ --type rust | wc -l)
echo "β ErrorKind usage: $ERRORKIND_COUNT occurrences"
echo ""
echo "β
Error handling check PASSED"
```
## Success Criteria
- β
Zero `use anyhow` imports in src/
- β
Zero `anyhow!()` macro usage
- β
RunnerError used throughout
- β
ErrorKind variants used for error classification
## Fixing Violations
### Replace anyhow
```rust
// β Before
return Err(anyhow!("Binary not found"));
// β
After
return Err(RunnerError::binary_not_found("claude"));
return Err(RunnerError::internal("description"));
return Err(RunnerError::external_service("service", "description"));
```
## Related Files
- `src/types.rs` - RunnerError and ErrorKind definitions
- `src/lib.rs` - Type exports
Attribution
Comments
Loading commentsβ¦
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.