check-input-validationlisted
Install: claude install-skill dravr-ai/dravr-embacle
# Input Validation Check Skill
## Purpose
Validates that user-supplied inputs are properly bounded and validated before use. Catches division-by-zero, unbounded pagination, missing cache key components, and numeric range violations.
## CLAUDE.md Compliance
- ✅ Enforces Security Engineering Rules: Input Domain Validation
- ✅ Prevents divide-by-zero panics from user input
- ✅ Validates pagination bounds per CLAUDE.md
- ✅ Checks cache key completeness for tenant isolation
## Usage
Run this skill:
- After adding new math operations on user input
- After adding new API endpoints with pagination
- After modifying cache key construction
- After adding recipe/nutrition calculations
- Before committing code that processes numeric user input
## Commands
### Division Safety Check
```bash
echo "========================================="
echo " INPUT VALIDATION CHECK"
echo "========================================="
echo ""
echo "--- 1. Division Safety ---"
# Find all division operations in production code
echo "🔍 Scanning for division operations..."
rg " / " src/ --type rust -n | \
rg -v "test|//|mod |use |impl " | \
rg -v "\.len\(\) / |as f64 / |as f32 / " > /tmp/divisions.txt
# Check each for guards
echo "Division operations found:"
cat /tmp/divisions.txt | head -20
# Check for .max(1) or similar guards near divisions
echo ""
echo "🔍 Checking for zero-guards near divisions..."
rg "\.max\(1\)|\.max\(1\.0\)|checked_div|if.*==.*0|if.*>.*0" src/ --type rust -n | wc -l
echo