From backend-nodejs
Use when writing or reviewing Node.js and TypeScript backend code — enforces idiomatic patterns including strict TypeScript, async/await error handling, ESM modules, type-safe patterns, and Node.js best practices
How this skill is triggered — by the user, by Claude, or both
Slash command
/backend-nodejs:nodejs-codingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `"strict": true` always — no exceptions
"strict": true always — no exceptions"noUncheckedIndexedAccess": true for array safety"exactOptionalPropertyTypes": true to distinguish undefined from missingES2022 minimum, module: NodeNext| Element | Convention | Example |
|---|---|---|
| File | kebab-case | order-service.ts, create-order.handler.ts |
| Class | PascalCase | OrderService, CreateOrderHandler |
| Interface/Type | PascalCase | OrderResponse, CreateOrderInput |
| Function | camelCase | createOrder, findById |
| Constant | UPPER_SNAKE or camelCase | MAX_RETRIES, defaultConfig |
| Enum | PascalCase members | OrderStatus.Pending |
// Good — explicit error handling
async function createOrder(input: CreateOrderInput): Promise<Result<Order>> {
try {
const order = Order.create(input);
await repository.save(order);
return Result.ok(order);
} catch (error) {
if (error instanceof ValidationError) {
return Result.fail(error.message);
}
throw error; // re-throw unexpected errors
}
}
// Bad — unhandled promise
function createOrder(input: CreateOrderInput) {
repository.save(Order.create(input)); // floating promise!
}
await promises — never leave floating promisesPromise.all() for parallel operations, Promise.allSettled() when partial failures are OKAppError → ValidationError, NotFoundError, AuthorizationErrornew NotFoundError(\Order ${id} not found`)`cause for error chaining: new AppError("failed", { cause: originalError })interface for object shapes, type for unions/intersectionsunknown over any — always narrow before useas) — use type guards instead// Discriminated union
type OrderResult =
| { status: "success"; order: Order }
| { status: "validation_error"; errors: string[] }
| { status: "not_found" };
import/export) — never CommonJS (require).js extension in imports (TypeScript resolves .ts → .js)index.ts) only at module boundaries, not withinnpx claudepluginhub gagandeepp/software-agent-teams --plugin backend-nodejsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.