About koa
A skill for building Node.js HTTP services and middleware with Koa. It covers the context and async middleware model, routing, request-body parsing, error handling, and deployment practices.
Key features
- 01Koa context and async middleware
- 02Onion-style middleware ordering
- 03Routing and body parsing
- 04Error handling and logging
- 05Production proxy and HTTPS guidance
Use cases
- 01Build a Node.js HTTP service with Koa
- 02Configure routes and request-body parsing
- 03Set up middleware error handling
- 04Prepare a Koa service for deployment
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ full-stack-skills/ nodejs-skills --skill koaAfter installing, type/koain Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlLICENSE.txt
Details
From the project READMEWhen to use this skill
Use this skill whenever the user wants to:
- 用 Koa 编写 Node.js HTTP 服务、中间件与洋葱模型
- 配置路由(koa-router)、body 解析、错误处理与部署
How to use this skill
- 核心:Koa()、ctx 与 next;async 中间件与洋葱顺序;ctx.body、ctx.status。
- 生态:koa-router、koa-bodyparser、koa-static;错误与日志中间件。
- 参考:https://koajs.com/
Best Practices
- 中间件 async 与 next 正确使用;错误统一捕获。
- 生产用反向代理与 HTTPS;安全与 CORS。
Keywords
koa, Node.js, 中间件, 洋葱模型
Comments
Markdown supported