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.
npx claudepluginhub devsforge/orchestrator --plugin orchestratorThis skill is limited to using the following tools:
Comprehensive strategies for diagnosing, fixing, and preventing errors.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
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│
└──────┘ │ └────────┘