This skill should be used when analyzing errors, stack traces, and logs to identify root causes and implement fixes.
View on GitHubjayteealao/agent-skills
session-workflow
plugins/session-workflow/skills/error-analysis/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/jayteealao/agent-skills/blob/main/plugins/session-workflow/skills/error-analysis/SKILL.md -a claude-code --skill error-analysisInstallation paths:
.claude/skills/error-analysis/# Error Analysis Skill
Systematically analyze errors and logs to find root causes.
## When to Use
- Debugging production errors
- Analyzing stack traces
- Investigating log patterns
- Performing root cause analysis
- Categorizing error types
## Reference Documents
- [Log Patterns](./references/log-patterns.md) - Common error patterns by type
- [Root Cause Analysis](./references/root-cause-analysis.md) - RCA techniques
- [Error Categorization](./references/error-categorization.md) - Classifying errors
- [Fix Patterns](./references/fix-patterns.md) - Common fixes by error type
## Analysis Workflow
### 1. Gather Information
```markdown
## Error Report
### Error Message
```
TypeError: Cannot read property 'id' of undefined
at UserService.getUser (src/services/user.ts:45:23)
at async Router.handle (src/api/routes.ts:67:12)
```
### Context
- **Environment:** Production
- **Time:** 2024-01-15 14:30 UTC
- **Frequency:** 15 occurrences in last hour
- **Affected Users:** ~5% of requests
- **Recent Changes:** Deploy at 14:00 UTC
```
### 2. Categorize Error
```markdown
## Error Classification
**Type:** Runtime Error
**Category:** Null/Undefined Reference
**Severity:** High (user-facing)
### Common Causes
1. Missing data validation
2. Race condition
3. API contract change
4. Data migration issue
```
### 3. Root Cause Analysis
```markdown
## Root Cause Investigation
### Timeline
- 14:00 - Deploy to production
- 14:25 - First error reported
- 14:30 - Error rate increased
### Hypothesis 1: Deploy introduced bug
- Check: git diff between versions
- Result: New code path added
### Hypothesis 2: Data issue
- Check: Query for affected users
- Result: All have specific condition
### Root Cause
Deploy introduced code that assumes `user.profile` exists,
but 5% of users don't have profiles (legacy accounts).
```
### 4. Implement Fix
```markdown
## Fix Implementation
### Short-term (Hotfix)
```typescript
// Add null check
const userId = user?.profile?.id ?? us