This skill guides building robust Koa apps with middleware patterns, reliability practices, security, and scalable routing for production-grade APIs.
npx playbooks add skill ecelayes/roots-skills --skill koa
async (ctx, next) => { ... }.await next() exactly once in every middleware.await next() handles the Request; code after handles the Response.SIGTERM, SIGINT).server.close(() => db.disconnect())./health endpoint for load balancers (return 200 OK if DB is connected).ctx.state to pass data between middleware (e.g., ctx.state.user). NEVER pollute the global namespace.ctx.request.body, ctx.query, or ctx.params.ctx.status before setting ctx.body.app.on('error', ...) listener and a generic try/catch middleware. Never crash the process on a request error.koa-helmet for standard security headers.ctx.cookies.set(name, val, { signed: true }) and a secure app.keys.koa-router (or @koa/router).const usersRouter = new Router({ prefix: '/users' })).Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.