error-root-analyzer
Comprehensive error analysis and root cause resolution. Use when programs fail, crash, or produce errors during execution. This skill performs deep debugging by identifying root causes (not just surface-level symptoms), conducting thorough module reviews to uncover related bugs and exceptions, and implementing holistic fixes that address all discovered issues.
Best use case
error-root-analyzer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Comprehensive error analysis and root cause resolution. Use when programs fail, crash, or produce errors during execution. This skill performs deep debugging by identifying root causes (not just surface-level symptoms), conducting thorough module reviews to uncover related bugs and exceptions, and implementing holistic fixes that address all discovered issues.
Teams using error-root-analyzer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/error-root-analyzer/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How error-root-analyzer Compares
| Feature / Agent | error-root-analyzer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Comprehensive error analysis and root cause resolution. Use when programs fail, crash, or produce errors during execution. This skill performs deep debugging by identifying root causes (not just surface-level symptoms), conducting thorough module reviews to uncover related bugs and exceptions, and implementing holistic fixes that address all discovered issues.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Error Root Cause Analyzer This skill provides a systematic approach to identify and resolve programming errors by analyzing root causes and conducting comprehensive module reviews. ## Core Principles 1. **Root Cause Analysis**: Never stop at surface-level error messages. Trace back to the fundamental cause. 2. **Holistic Review**: When fixing a module, review its entire scope for related issues. 3. **Comprehensive Fixes**: Address all discovered problems, not just the immediate error. 4. **Prevention**: Identify and fix potential errors before they manifest. ## Systematic Error Resolution Workflow ### Phase 1: Error Capture and Initial Analysis 1. **Capture Complete Error Information** - Full stack trace with line numbers - Error type and message - Input/state that triggered the error - Environment context (Python version, OS, dependencies) 2. **Identify Error Surface** - Immediate error location (file, function, line) - Error category (syntax, runtime, logic, dependency, environment) - Affected modules and components ### Phase 2: Root Cause Investigation **Critical**: Do not proceed to fixes until root cause is identified. 1. **Trace Error Backwards** - Start from error line - Trace execution flow backwards - Identify the point where incorrect state/data originated - Check all assumptions and preconditions 2. **Analyze Error Patterns** (See `references/error-patterns.md`) - Import errors → dependency/path issues - AttributeError → object lifecycle/initialization issues - TypeError → data contract violations - IndexError/KeyError → boundary/validation issues - Connection errors → environment/configuration issues 3. **Check Common Root Causes** - Missing or incorrect initialization - Invalid assumptions about data/state - Race conditions or timing issues - Configuration mismatches - Dependency version conflicts - Resource availability (memory, disk, network) - Permission issues ### Phase 3: Comprehensive Module Review When an error is found in a module, conduct a thorough review: 1. **Static Code Analysis** - Review all functions/classes in the affected module - Check for similar patterns that might fail - Verify error handling completeness - Validate input sanitization and boundary checks - Check resource cleanup (file handles, connections, locks) 2. **Dependency Analysis** - Review all imports and their usage - Check for version compatibility - Verify API contract assumptions - Identify fragile dependencies 3. **Logic Flow Analysis** - Trace critical paths through the module - Identify edge cases not handled - Check state management - Verify transaction boundaries - Review concurrency/threading issues 4. **Exception Landscape** - Map all possible exceptions - Verify exception handling coverage - Check exception propagation correctness - Ensure graceful degradation paths exist 5. **Use Debugging Checklist** (See `references/debugging-checklist.md`) - Language-specific checks - Framework-specific validations - Common anti-patterns ### Phase 4: Fix Design and Implementation 1. **Design Comprehensive Fix** - Address root cause directly - Fix all related issues found in module review - Add missing error handling - Implement defensive programming where needed - Add validation/sanitization as appropriate 2. **Prioritize Fixes** - **Critical**: Root cause and blocking issues - **High**: Related bugs that will fail soon - **Medium**: Missing error handling, edge cases - **Low**: Code quality improvements 3. **Implement Fixes Systematically** - Fix root cause first - Apply related fixes in logical order - Add tests for each fix if possible - Document complex changes 4. **Add Prevention Mechanisms** - Input validation - Precondition checks - Better error messages - Logging for debugging - Assertions for invariants ### Phase 5: Verification and Testing 1. **Verify Root Cause Fixed** - Test with original failure case - Verify error no longer occurs - Check fix doesn't introduce new issues 2. **Test Related Fixes** - Test each identified issue - Verify edge cases handled - Check error messages are helpful 3. **Regression Testing** - Test existing functionality still works - Verify no new errors introduced - Test with various inputs/scenarios 4. **Integration Testing** - Test module in context of larger system - Verify interactions with other modules - Check end-to-end workflows ## Error Analysis Strategies ### For Import/Dependency Errors 1. Check module installation and versions 2. Verify import paths and PYTHONPATH 3. Check for circular dependencies 4. Verify virtual environment activation 5. Review `requirements.txt` or `pyproject.toml` 6. Check for naming conflicts ### For Runtime Errors 1. Trace data flow to error point 2. Check variable initialization 3. Verify object lifecycle 4. Review state mutations 5. Check method call order 6. Validate data types and contracts ### For Logic Errors 1. Review algorithm correctness 2. Check boundary conditions 3. Verify loop invariants 4. Validate state machines 5. Review calculation logic 6. Check for off-by-one errors ### For Performance/Timeout Errors 1. Profile code execution 2. Identify bottlenecks 3. Check for infinite loops 4. Review algorithm complexity 5. Check database query efficiency 6. Review memory usage patterns ## Documentation and Communication When reporting findings and fixes: 1. **Error Summary** - What failed and how it manifested - Root cause identified - Why it occurred 2. **Comprehensive Fix List** - Primary fix for root cause - All related issues addressed - Prevention mechanisms added 3. **Risk Assessment** - Potential impact of changes - Areas requiring extra testing - Known limitations 4. **Next Steps** - Recommended testing approach - Monitoring suggestions - Future improvements ## Integration with Development Workflow - Use this skill when any error occurs during development or testing - Apply before deploying fixes to production - Use for post-mortem analysis of production issues - Apply during code review when bugs are found ## Reference Materials - **Error Patterns**: See `references/error-patterns.md` for common error patterns and their root causes - **Debugging Checklist**: See `references/debugging-checklist.md` for language and framework-specific checks
Related Skills
error-tracking
Add error tracking and performance monitoring to your project services. Use this skill when adding error handling, creating new controllers/routes, instrumenting background jobs, or tracking performance. Supports Sentry, Datadog, and other monitoring solutions. ALL ERRORS MUST BE CAPTURED - no exceptions.
error-handling
Comprehensive error handling patterns for Splits Network services and apps
error-handling-patterns
Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.
error-diagnostics-error-analysis
You are an expert error analysis specialist with deep expertise in debugging distributed systems, analyzing production incidents, and implementing comprehensive observability solutions.
error-debugging-error-analysis
You are an expert error analysis specialist with deep expertise in debugging distributed systems, analyzing production incidents, and implementing comprehensive observability solutions.
codebase-analyzer
Understand existing codebase patterns and context to inform feature judgement.
Codebase Analyzer Skill
Analyze existing code to reverse-engineer specifications (requirements, design, tasks). Use when user wants to document existing code, refactor legacy systems, or understand what has been implemented. Identifies implemented features, architecture, and missing pieces.
code-architecture-analyzer
智能代码架构解读和分析工具。当用户请求分析项目架构、生成架构文档、识别设计模式、分析依赖关系、评估代码质量、或理解复杂项目结构时使用此skill。适用于接手新项目、代码审查、重构规划、技术选型评估等场景。
awesome-copilot-root-typescript-mcp-expert
Expert assistant for developing Model Context Protocol (MCP) servers in TypeScript Use when: the task directly matches typescript mcp expert responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.
awesome-copilot-root-rust-mcp-expert
Expert assistant for Rust MCP server development using the rmcp SDK with tokio async runtime Use when: the task directly matches rust mcp expert responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.
awesome-copilot-root-remember
Transforms lessons learned into domain-organized memory instructions (global or workspace). Syntax: `/remember [>domain [scope]] lesson clue` where scope is `global` (default), `user`, `workspace`, or `ws`. Use when: the task directly matches remember responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.
awesome-copilot-root-php-mcp-expert
Expert assistant for PHP MCP server development using the official PHP SDK with attribute-based discovery Use when: the task directly matches php mcp expert responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.