mcpField
K
koa

koa

github.com/full-stack-skillsDevelopment065 installsUpdated 5w ago
Repository

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

  1. 01Koa context and async middleware
  2. 02Onion-style middleware ordering
  3. 03Routing and body parsing
  4. 04Error handling and logging
  5. 05Production proxy and HTTPS guidance

Use cases

  1. 01Build a Node.js HTTP service with Koa
  2. 02Configure routes and request-body parsing
  3. 03Set up middleware error handling
  4. 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 koa

After installing, type/koain Claude Code to confirm it loaded.

Bundled filesagents/openai.yamlLICENSE.txt

Details

From the project README

When to use this skill

Use this skill whenever the user wants to:

  • 用 Koa 编写 Node.js HTTP 服务、中间件与洋葱模型
  • 配置路由(koa-router)、body 解析、错误处理与部署

How to use this skill

  1. 核心:Koa()、ctx 与 next;async 中间件与洋葱顺序;ctx.body、ctx.status。
  2. 生态:koa-router、koa-bodyparser、koa-static;错误与日志中间件。
  3. 参考:https://koajs.com/

Best Practices

  • 中间件 async 与 next 正确使用;错误统一捕获。
  • 生产用反向代理与 HTTPS;安全与 CORS。

Keywords

koa, Node.js, 中间件, 洋葱模型

Comments

Markdown supported