원클릭으로
error-triage
Parse stack traces and error logs to identify root cause, find related code, and suggest fixes with severity classification
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Parse stack traces and error logs to identify root cause, find related code, and suggest fixes with severity classification
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create Architecture Decision Records using the Michael Nygard template with context, decision, alternatives, and consequences
Generate or validate OpenAPI and AsyncAPI specs from code or requirements with consistent naming, errors, and pagination
Generate CHANGELOG.md from git history in Keep a Changelog format with Added, Changed, Deprecated, Removed, Fixed, and Security categories
Generate CI/CD pipeline config for detected platform with lint, test, build, and deploy stages
Scan dependencies for CVEs, outdated packages, license issues, and unused deps to produce a prioritized remediation list
Guide deployment processes including CI/CD pipeline creation, environment setup, and rollback procedures
| name | error-triage |
| description | Parse stack traces and error logs to identify root cause, find related code, and suggest fixes with severity classification |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"general"} |
Use this skill when you need to:
Parse the error: Extract structured information
NullPointerException, TypeError, ConnectionRefused)Identify the root frame: Find where the error originates
Read the source code: Examine the relevant code
git log -5 <file>)Classify the error: Determine type and severity
Diagnose root cause: Explain why the error occurs
Suggest fix: Provide a concrete remediation
| Severity | Criteria | Response |
|---|---|---|
| Critical | Data loss, security breach, full outage | Immediate fix required |
| High | Feature broken for all users, degraded performance | Fix within hours |
| Medium | Feature broken for some users, workaround exists | Fix within days |
| Low | Cosmetic, non-blocking, edge case | Fix in next sprint |
| Category | Examples | Typical Cause |
|---|---|---|
| Null/Undefined | NPE, TypeError: undefined | Missing null check, uninitialized variable |
| Type Mismatch | ClassCastException, TypeError | Wrong type passed, serialization issue |
| Connection | ConnectionRefused, Timeout | Service down, wrong config, network |
| Authentication | 401, 403, InvalidToken | Expired token, wrong credentials, permissions |
| Validation | 400, ValidationError | Invalid input, schema mismatch |
| Resource | OOM, disk full, file not found | Resource exhaustion, missing file |
| Concurrency | Deadlock, race condition | Shared state, missing synchronization |
| Configuration | Missing env var, invalid config | Missing or incorrect configuration |
## Error Diagnosis
**Error:** `TypeError: Cannot read property 'id' of undefined`
**File:** `src/services/user-service.ts:47`
**Severity:** High
**Category:** Null/Undefined
### Root Cause
The `getUser()` function returns `undefined` when the user is not found in the
database, but the caller at line 47 accesses `.id` without a null check.
### Stack Trace Analysis
| # | Location | Notes |
|---|----------|-------|
| 1 | `src/services/user-service.ts:47` | **Root frame** - `.id` access on undefined |
| 2 | `src/handlers/order.ts:23` | Caller that passes userId |
| 3 | `src/routes/api.ts:15` | Route handler |
### Suggested Fix
\`\`\`typescript
// Before
const userName = getUser(userId).id;
// After
const user = getUser(userId);
if (!user) {
throw new NotFoundError(`User ${userId} not found`);
}
const userName = user.id;
\`\`\`
### Related Considerations
- Check if other callers of `getUser()` have the same issue
- Consider making `getUser()` throw instead of returning undefined
- Add a test case for the "user not found" scenario
Cannot read property 'x' of undefined -> null check missingis not a function -> wrong import, wrong type, or typoECONNREFUSED -> target service not runningNullPointerException -> null check missing, use OptionalClassNotFoundException -> missing dependency or classpath issueOutOfMemoryError -> memory leak or undersized heapAttributeError: 'NoneType' -> null check missingImportError -> missing package or circular importKeyError -> missing dict key, use .get() with default