koa
Koa.js web framework. Use when building Node.js APIs with async middleware, koa-router, context object, error handling, body parsing, or CORS. Distinguish…
от skeletorflet★ 48 звёзд на GitHub
Установить koa в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
koa
Lightweight Node.js framework by Express team using async/await middleware and enhanced context.
Core Concepts
- Async middleware:
app.use(async (ctx, next) => { ... })with upstream/downstream execution via await next() - Context object:
ctxwraps Nodereq/reswith helpers for body, params, cookies, and state - Koa vs Express: no built-in routing, no middleware in req/res, no callback-based middleware
- Error handling: centralized
app.on('error')listener or try/catch in async middleware
Common Patterns
- koa-router:
router.get('/users/:id', handler)with named params, nested routers, and HTTP verb methods - Body parsing:
@koa/bodyparserfor JSON, form, and text payloads - CORS:
@koa/corsmiddleware with origin whitelist and credential support - Static files:
@koa/staticfor serving assets with caching headers
Best Practices
- Top-level error middleware wrapping all downstream handlers with try/catch and structured JSON errors
ctx.statefor passing request-scoped data (auth user, request ID) between middleware- Composition over mounting: compose small middleware functions rather than monolithic handlers
- Supertest with jest/ava for HTTP integration tests without binding to a port
Common Code Patterns
ctx.body = { data: result }for JSON responses with automatic content-typectx.throw(400, 'validation failed')for HTTP error responses with message
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл koa?
Koa.js web framework. Use when building Node.js APIs with async middleware, koa-router, context object, error handling, body parsing, or CORS. Distinguish from Express when user needs modern async patterns.
Как установить скилл koa?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл koa запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…