hono
Hono ultrafast web framework for edge and server runtimes. Use when building APIs, middleware chains, or edge functions on Cloudflare Workers, Bun, Node.js, or Deno. Use for hono, api, routing, middleware, cloudflare-workers, edge, rpc, validator, context.
What this skill does
# Hono
## Overview
Hono is a small, ultrafast web framework built on Web Standards that runs on any JavaScript runtime including Cloudflare Workers, Bun, Deno, Node.js, Vercel, and AWS Lambda. Application code is portable across runtimes; only the entry point and adapter differ per platform.
**When to use:** Edge-first APIs, Cloudflare Workers services, multi-runtime applications, lightweight REST/RPC servers, middleware-heavy request pipelines, type-safe client-server communication.
**When NOT to use:** Full-stack SSR frameworks (use Next.js/Remix), heavy ORM-driven monoliths where Express ecosystem maturity matters, applications that need deep Node.js-only APIs without Web Standard equivalents.
## Quick Reference
| Pattern | API | Key Points |
| ----------------- | ------------------------------------------- | ------------------------------------------- |
| Basic routing | `app.get('/path', handler)` | Supports get, post, put, delete, patch, all |
| Path parameters | `app.get('/user/:id', handler)` | Access via `c.req.param('id')` |
| Regex constraints | `app.get('/post/:id{[0-9]+}', handler)` | Inline regex in path parameter |
| Wildcard | `app.get('/files/*', handler)` | Matches any sub-path |
| Route grouping | `app.route('/api', subApp)` | Mount sub-applications |
| Middleware | `app.use(middleware())` | Executes in registration order |
| Path middleware | `app.use('/auth/*', jwt(...))` | Scope middleware to paths |
| JSON response | `c.json({ key: 'value' })` | Sets Content-Type automatically |
| Text response | `c.text('hello')` | Returns plain text |
| HTML response | `c.html('<h1>Hi</h1>')` | Returns HTML content |
| Status + header | `c.status(201)`, `c.header('X-Key', 'val')` | Chain before response |
| Redirect | `c.redirect('/new-path', 301)` | Default status is 302 |
| Request body | `c.req.json()`, `c.req.parseBody()` | JSON or form data parsing |
| Query params | `c.req.query('page')` | Single query parameter |
| Context variables | `c.set('user', data)` / `c.get('user')` | Type-safe middleware data passing |
| Zod validation | `zValidator('json', schema)` | `@hono/zod-validator` package |
| RPC client | `hc<AppType>(url)` | End-to-end type-safe API calls |
| Error handler | `app.onError((err, c) => ...)` | Global error handling |
| Not found | `app.notFound((c) => ...)` | Custom 404 handler |
| Environment | `c.env.BINDING_KEY` | Access runtime bindings/env vars |
| Adapter helper | `env(c)` from `hono/adapter` | Unified env access across runtimes |
| WebSocket | `upgradeWebSocket()` from runtime adapter | WebSocket helper with RPC support |
| Test client | `testClient(app)` from `hono/testing` | Type-safe testing without HTTP server |
| JSX streaming | `jsxRenderer({ stream: true })` | SSR streaming with Suspense support |
## Common Mistakes
| Mistake | Correct Pattern |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| Registering middleware after handlers | Register middleware before the handlers it should apply to |
| Using `app.route()` without chaining for RPC types | Chain route methods (`app.route('/a', a).route('/b', b)`) and export `typeof routes` |
| Forgetting `export default app` for edge runtimes | Cloudflare Workers, Bun, and Deno require the default export |
| Using `compress()` on Cloudflare Workers or Deno Deploy | These platforms compress automatically; skip the middleware |
| Mixing Hono and middleware versions in Deno | Pin all `hono` imports to the same version to avoid type mismatches |
| Wrapping `next()` in try/catch inside middleware | Hono catches thrown errors and routes to `app.onError()`; `next()` never throws |
| Defining routes with `app.get()` but exporting `typeof app` for RPC | Export the type of the chained route variable, not the app instance |
| Using `new Hono()` without generics for typed context | Pass `Hono<{ Variables: MyVars }>` to enable typed `c.get()`/`c.set()` |
| Returning `c.json()` without status for created resources | Pass status as second argument: `c.json(data, 201)` |
| Not using `createMiddleware()` for reusable middleware | Import from `hono/factory` to preserve type inference when extracting middleware |
## Delegation
> If the `zod` or `typescript-patterns` skill is available, delegate schema and type-level tasks to it.
> Otherwise, recommend: `npx skills add oakoss/agent-skills --skill typescript-patterns`
>
> If a Cloudflare Workers skill is available, delegate platform-specific configuration to it.
## References
- [Route definitions, path params, groups, and method handlers](references/routing.md)
- [Built-in and custom middleware patterns](references/middleware.md)
- [Context object, request parsing, and response helpers](references/context-and-helpers.md)
- [Zod validator middleware and request validation](references/validation.md)
- [RPC client and end-to-end type safety](references/rpc-client.md)
- [Runtime adapters for Cloudflare, Bun, Node.js, Deno, and more](references/adapters.md)
- [Testing with testClient, WebSocket helper, and JSX streaming](references/testing-and-websocket.md)
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.