원클릭으로
error-recovery
Expert knowledge in error diagnosis, debugging strategies, and self-healing patterns. Use when tasks fail or errors occur.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Expert knowledge in error diagnosis, debugging strategies, and self-healing patterns. Use when tasks fail or errors occur.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Expert knowledge in API design, authentication, caching, and backend best practices. Use for backend development tasks.
Expert knowledge in React patterns, component design, state management, and frontend best practices. Use for frontend development tasks.
Expert knowledge in project planning, requirements gathering, user stories, and scope management. Use when planning new projects or features.
Expert knowledge in quality assurance gates, code quality standards, and automated checks. Use when enforcing quality standards.
Expert knowledge in testing methodologies, test patterns, and quality assurance. Use when writing tests or setting up testing infrastructure.
| name | error-recovery |
| description | Expert knowledge in error diagnosis, debugging strategies, and self-healing patterns. Use when tasks fail or errors occur. |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
Comprehensive strategies for diagnosing, fixing, and preventing errors.
| Code | Type | Common Cause |
|---|---|---|
| TS2322 | Type mismatch | Wrong type assigned |
| TS2345 | Argument type | Wrong parameter type |
| TS2339 | Property missing | Typo or missing interface property |
| TS2304 | Not found | Missing import or declaration |
| TS2307 | Module not found | Wrong path or missing package |
| TS7006 | Implicit any | Missing type annotation |
| TS2531 | Possibly null | Missing null check |
| Error | Description | Common Fix |
|---|---|---|
| ReferenceError | Variable not defined | Check declaration, scope |
| TypeError | Wrong type operation | Add null check, fix type |
| RangeError | Value out of range | Validate input range |
| SyntaxError | Invalid syntax | Check JSON, string format |
| Error | Description | Fix |
|---|---|---|
| Module not found | Package missing | npm install |
| Out of memory | Heap limit | Increase NODE_OPTIONS |
| Config error | Invalid config | Check tsconfig, vite.config |
| Type | Cause | Fix |
|---|---|---|
| Assertion | Logic error | Fix implementation or expectation |
| Timeout | Async issue | Add await, increase timeout |
| Mock error | Wrong mock setup | Fix mock configuration |
# ESLint auto-fix
npx eslint . --fix
# Prettier format
npx prettier --write .
# TypeScript strict fixes
# Some can be auto-fixed with ts-fix
# Reinstall dependencies
rm -rf node_modules package-lock.json
npm install
# Update specific package
npm update package-name
# Fix peer dependencies
npm install --legacy-peer-deps
// TS2322: Type mismatch
// Before
const value: string = 123;
// After
const value: number = 123;
// TS2531: Possibly null
// Before
element.innerHTML = 'text';
// After
if (element) element.innerHTML = 'text';
// TS2339: Property missing
// Before
user.email
// After
if ('email' in user) user.email
// TypeError: Cannot read property of undefined
// Before
const name = user.profile.name;
// After
const name = user?.profile?.name ?? 'Unknown';
// ReferenceError: not defined
// Check: Is it imported?
// Check: Is it in scope?
// Check: Is it spelled correctly?
// Assertion failure - debug first
console.log('Actual:', result);
console.log('Expected:', expected);
// Async timeout
test('async test', async () => {
// Add proper awaits
const result = await asyncOperation();
expect(result).toBeDefined();
}, 10000); // Increase timeout if needed
// Mock not working
vi.mock('./module', () => ({
default: vi.fn().mockReturnValue('mocked'),
}));
┌─────────────────────────────────────────┐
│ ERROR DETECTED │
└─────────────────┬───────────────────────┘
▼
┌─────────────────────────────────────────┐
│ 1. CLASSIFY ERROR │
│ Syntax | Type | Runtime | Build | Test │
└─────────────────┬───────────────────────┘
▼
┌─────────────────────────────────────────┐
│ 2. IDENTIFY FIX │
│ Auto-fix | Manual | Delegate │
└─────────────────┬───────────────────────┘
▼
┌─────────────────────────────────────────┐
│ 3. APPLY FIX │
│ Make minimal, targeted change │
└─────────────────┬───────────────────────┘
▼
┌─────────────────────────────────────────┐
│ 4. VERIFY FIX │
│ tsc && eslint && npm test │
└─────────────────┬───────────────────────┘
▼
┌─────────┴─────────┐
│ Fixed? │
└─────────┬─────────┘
Yes │ No
│ │ │
▼ │ ▼
┌─────┐ │ ┌─────────────────┐
│ Done│ │ │ Increment retry │
└─────┘ │ │ (max 3) │
│ └────────┬────────┘
│ ▼
│ ┌─────────────────┐
│ │ Retry < 3? │
│ └────────┬────────┘
│ Yes │ No
│ │ │ │
│ ▼ │ ▼
│ ┌──────┐ │ ┌────────┐
└───│Retry │ │ │Escalate│
└──────┘ │ └────────┘