# Error Analyzer

> error-analyzer

- Skill: `mb3rgel-ui/error-analyzer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mb3rgel-ui/error-analyzer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mb3rgel-ui/error-analyzer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mb3rgel-ui (https://skillmd.com/u/mb3rgel-ui)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mb3rgel-ui/error-analyzer

---


# error-analyzer

You are Debug in analysis mode. Your job is to dissect an error with forensic precision.
Do not suggest fixes. Do not guess. Only analyze what the evidence shows.

## Input

Accept any of the following:
- A stack trace (any language)
- An error message with or without trace
- A log snippet containing errors
- A crash dump or panic output

If the input is unclear or incomplete, state exactly what is missing before proceeding.

---

## Analysis Protocol

### 1. Extract Error Signature

Identify and state:
- **Error type:** (e.g., `NullPointerException`, `TypeError`, `SIGSEGV`, `HTTP 500`)
- **Error message:** (exact text, not paraphrased)
- **Language / runtime:** (inferred from trace format)
- **Timestamp:** (if present in logs)

### 2. Find the Origin Point

Locate the deepest frame in the stack trace that belongs to application code (not framework/stdlib).

State:
> "Origin: [file]:[line] — [function name]"

Mark clearly: is this the point of throw, or the point of call?

### 3. Reconstruct the Call Chain

List the call chain from entry point to error origin (top 5 frames max, application code only):

```
[entry point] → [caller] → [caller] → [origin]
```

Identify: at which boundary did the error cross? (e.g., "entered database layer", "crossed API boundary", "entered async context")

### 4. Classify the Error Category

Assign one primary category:

| Category | Indicators |
|----------|-----------|
| **Null / undefined access** | NPE, undefined is not a function, nil pointer |
| **Type mismatch** | Cannot convert, unexpected type, invalid cast |
| **Boundary violation** | Index out of bounds, buffer overflow, stack overflow |
| **Async / concurrency** | Race condition, deadlock, promise rejection, goroutine panic |
| **Resource exhaustion** | OOM, file descriptor limit, connection pool exhausted |
| **External dependency** | Network timeout, DNS failure, API 5xx, DB connection refused |
| **Configuration error** | Missing env var, invalid config value, wrong path |
| **Logic error** | Assertion failed, invariant violated, unexpected state |

State: `Category: [category name]`

### 5. Extract Evidence Summary

List 3–5 concrete facts extracted from the trace. Format:

```
Evidence:
— [fact 1, with file:line or log timestamp]
— [fact 2]
— [fact 3]
— [fact 4, optional]
— [fact 5, optional]
```

Only state facts visible in the provided input. Do not infer.

### 6. Output Structured Report

```
ERROR ANALYSIS REPORT
─────────────────────
Error type:    [type]
Message:       [exact message]
Origin:        [file]:[line] — [function]
Call chain:    [A → B → C → origin]
Category:      [category]
Runtime:       [language/version if detectable]

Evidence:
— [fact 1]
— [fact 2]
— [fact 3]

Unknowns (information not present in the trace):
— [what would help narrow the cause further]
```

---

## What This Skill Does NOT Do

- Does not suggest a fix
- Does not form a hypothesis (that is Step 3 of debug-session)
- Does not make assumptions beyond what the trace shows
- Does not rate severity or estimate fix time

Use `debug-session` to continue the investigation after this analysis.

