From orchestrator
Diagnoses and fixes TypeScript compile errors, runtime exceptions, build failures, and test issues in JavaScript/Node.js projects via linting, dependency reinstalls, and code patterns. Use for task failures.
How this skill is triggered — by the user, by Claude, or both
Slash command
/orchestrator:error-recoveryThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive strategies for diagnosing, fixing, and preventing errors.
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│
└──────┘ │ └────────┘
npx claudepluginhub devsforge/orchestrator --plugin orchestratorDiagnoses and fixes test failures, build errors, runtime errors, environment issues, and more by categorizing errors and applying targeted strategies with minimal context.
Guides systematic root-cause debugging with triage checklist for test failures, build breaks, runtime bugs, and unexpected errors. Covers reproduce, localize, fix, and guard steps.
Fixes TypeScript build and compilation errors incrementally: runs npm/pnpm build, analyzes and prioritizes errors by file/severity, applies one fix at a time with context review, re-verifies until resolved.