Expert Node.js backends (Express/Fastify/Hono): routing, middleware, validation, auth, async, and production hardening. Trigger keywords: Node.js, Express, Fastify, Hono, REST, middleware, JWT, session, zod, async, streams, unhandled rejection, graceful shutdown, backend, server. Use for building HTTP services, structuring backends, or fixing async/error/security issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/nodejs-backend-expert:nodejs-backend-expertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> The boundary is hostile: validate input, handle every rejection, and never trust the client. Keep handlers thin, push logic into services, and make the process production-safe (timeouts, health, graceful shutdown).
The boundary is hostile: validate input, handle every rejection, and never trust the client. Keep handlers thin, push logic into services, and make the process production-safe (timeouts, health, graceful shutdown).
nextjs-expert.sql-expert. API contract design → api-design-expert.security-expert.zod/envalid); fail fast on missing/invalid config. No process.env.X scattered through code.async/await throughout. Every route's thrown error must reach a central error handler — wrap async handlers (or use Fastify/Express 5 which await handlers natively).process.on("unhandledRejection")/"uncaughtException" to log and exit; don't swallow.helmet for headers, explicit CORS allowlist, rate limiting on public/auth routes.argon2/bcrypt; sign tokens/sessions with env secrets; cookies HttpOnly+Secure+SameSite. Never log secrets, tokens, or full request bodies with PII./health (liveness) + readiness; graceful shutdown on SIGTERM (stop accepting, drain in-flight, close DB pool).pino) with request IDs.| Need | Reach for |
|---|---|
| Max performance / schema-first | Fastify |
| Minimal/edge/runtime-agnostic | Hono |
| Ubiquitous ecosystem / familiarity | Express (use v5 for async error handling) |
| Input validation | zod / valibot at the boundary |
| Heavy CPU work | worker_threads / separate service (don't block the event loop) |
fs, big JSON, CPU loops) → stalls all requests; offload to workers/streams.catch (e) {}) → log with context and respond appropriately.Central async error handling + validation (Express 5)
import express from "express";
import { z } from "zod";
const app = express();
app.use(express.json({ limit: "1mb" }));
const Body = z.object({ email: z.string().email(), name: z.string().min(1) });
app.post("/users", async (req, res) => { // Express 5 awaits handlers
const body = Body.parse(req.body); // throws -> error middleware
const user = await userService.create(body);
res.status(201).json(user);
});
app.use((err, _req, res, _next) => {
const status = err?.name === "ZodError" ? 400 : 500;
if (status === 500) logger.error({ err }, "unhandled");
res.status(status).json({ error: { message: err.message } });
});
Graceful shutdown
const server = app.listen(3000);
for (const sig of ["SIGTERM", "SIGINT"]) {
process.on(sig, () => server.close(() => db.end().then(() => process.exit(0))));
}
api-design-expert — endpoint contracts, versioning, pagination.sql-expert — the data layer behind services.security-expert — authn/authz and OWASP hardening.docker-expert / kubernetes-expert — packaging and running the service.Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub miaoge-ge/coding-agent-skills --plugin nodejs-backend-expert