Check Template Errors
Analyze errors collected from all implementations of this template and suggest improvements.
What This Does
- •Fetches
errors.jsonlfrom the central error repository - •Categorizes errors by type, template, and frequency
- •Identifies patterns and recurring issues
- •Suggests TODO items for template improvements
Usage
Run the analysis script:
bash
python3 .claude/hooks/analyze_errors.py $ARGUMENTS
Common Options
- •
--days 7- Only analyze errors from the last 7 days - •
--days 30- Last 30 days - •
--template astro-serverless-template- Filter to specific template - •
--json- Output as JSON for further processing
After Analysis
Based on the results:
- •Review the suggested TODOs - these are prioritized by frequency
- •Check recent errors - look for new patterns
- •Update
TODO.mdwith high-priority items - •Consider adding validation hooks to prevent recurring errors
Example Workflow
- •Run
/check-errors --days 7to see recent issues - •Identify the top error category
- •Create a fix or add validation
- •Test the fix locally
- •Commit and document the improvement
Error Categories
| Category | Description |
|---|---|
| typescript | Type errors, missing types |
| build_failure | Astro/Vite build failures |
| missing_dependency | npm module not found |
| yaml_config | YAML schema/validation errors |
| astro | Astro-specific issues |
| file_not_found | Missing files/paths |
| fly_io | Fly.io deployment issues |