Build ultrafast edge APIs with Web Standards framework
A Hono development skill for typed web APIs, edge applications, middleware, validation, route composition, and shared server-client types.
19.0.1Add to Favorites
Why it matters
Build and deploy high-performance web APIs and full-stack applications that run consistently across edge runtimes, serverless platforms, and traditional Node.js environments using a lightweight framework built on Web Standards.
Outcomes
What it gets done
Route HTTP requests with one of the fastest routers available
Deploy the same codebase to Cloudflare Workers, Deno, Bun, AWS Lambda, or Node.js
Build edge APIs and backend-for-frontend services with built-in middleware
Create lightweight full-stack apps with JSX support and RPC client
Install
Add it to your toolbox
Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-hono | bash After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.
Reports
Agent outcome reports
No reports yet
Overview
This skill guides Hono API and application development from setup through typed client calls. It covers routing, middleware, validation, authentication, streaming, and runtime-specific bindings. Use it for an edge API, a TypeScript server, a BFF, or a migration to Hono. Choose runtime-compatible dependencies and validate the finished application in its deployment environment.
What it does
This skill guides API and lightweight full-stack development with Hono, a small framework built around the Web Standards Request, Response, and fetch interfaces. It covers project setup, HTTP routing, middleware, request parsing, response helpers, validation, application composition, and an RPC client that shares route types with the frontend. The workflow moves from a basic application to grouped routes and typed client calls.
Routing examples include common HTTP methods, path parameters, query strings, wildcards, and chained route definitions. Request helpers parse JSON, form data, text, headers, and cookies. Response options include JSON, text, HTML, redirects, raw responses, and streaming. Route groups organize handlers into sub-applications mounted under a common base path.
When to use - and when NOT to
Use it for REST or RPC APIs on edge platforms, a minimal TypeScript server on Bun or Node.js, a Backend for Frontend, or an Express migration that needs edge compatibility. It also addresses specific questions about Hono middleware, routing, request helpers, and the hc client.
Portability depends on implementation choices. The skill advises avoiding Node.js-specific filesystem, path, and process APIs when targeting edge runtimes, and keeping dependencies small. Worker environment bindings differ from Node.js environment variables. Missing inputs, permissions, safety boundaries, or success criteria require clarification, and the output still needs environment-specific validation.
Inputs and outputs
Inputs include the target runtime, routes, request schemas, authentication requirements, environment bindings, and frontend-backend type-sharing needs. The resulting application can contain modular route handlers, typed middleware variables, validated request data, authentication checks, and an RPC client using exported server route types.
Zod validation middleware validates body, query, and parameter data before handlers use it. Typed bindings and variables preserve access to environment resources and middleware state. The RPC example exports a route type for hc so client routes, parameters, and responses receive TypeScript assistance.
Troubleshooting covers returning a response from every handler, awaiting next before middleware's later work, choosing the correct environment mechanism, and avoiding duplicated route prefixes. Security guidance includes server-side token validation, CSRF protection for form mutations, rate limits on sensitive endpoints, and storing secrets outside source code.
Integrations
The described deployment environments include Cloudflare Workers, Deno Deploy, Bun, Node.js, AWS Lambda, and WinterCG-compatible runtimes. The Cloudflare setup begins with:
npm create hono@latest my-api
Built-in middleware covers logging, CORS, CSRF, ETags, caching, basic and bearer authentication, JWT, compression, body limits, timeouts, formatted JSON, and secure headers. Custom middleware can attach request identifiers and response headers. The skill also uses Zod with @hono/zod-validator, Hono's hc RPC client, JWT signing and verification, and streaming helpers.
Cloudflare examples use typed Workers bindings and a D1 database for reading and inserting records. Wrangler provides local development, deployment, and secret configuration. Related skill references cover Cloudflare Workers, tRPC, Zod schema patterns, and Node.js backend patterns.
Source README
Hono (炎, "flame" in Japanese) is a small, ultrafast web framework built on Web Standards (Request/Response/fetch). It runs anywhere: Cloudflare Workers, Deno Deploy, Bun, Node.js, AWS Lambda, and any WinterCG-compatible runtime - with the same code. Hono's router is one of the fastest available, and its middleware system, built-in JSX support, and RPC client make it a strong choice for edge APIs, BFFs, and lightweight full-stack apps.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.