hono

Build Hono 4 HTTP services with typed bindings and middleware for edge runtimes.

15|2|Updated May 23, 2026
One-click install
npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill hono-vkirill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hono
Source: https://github.com/VKirill/antigravity-for-claude-code/tree/main/skills/hono
Command: npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill hono-vkirill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of building and hardening production HTTP APIs with Hono 4 across edge and Node-like runtimes without breaking type-safety or runtime compatibility.

Core Features & Use Cases

  • Multi-runtime Hono architecture: Pick the correct runtime entry shape (Workers, Bun, Deno, Vercel Edge, Node via @hono/node-server, Lambda) while keeping the route code portable.
  • Type-safe request handling: Use Bindings and Variables generics plus @hono/zod-validator so c.req.valid(...) drives typed handler inputs.
  • Production-grade correctness: Apply hardened middleware defaults and avoid common production foot-guns (CORS with credentials, body-stream consumption after validation, edge vs Node crypto APIs, cookie settings, explicit status codes).
  • Typed RPC client generation: Export AppType = typeof <chained routes> and consume it via hc<AppType>() for end-to-end typed client calls.

Quick Start

Tell the AI to generate a Hono 4 API using Cloudflare Workers with typed KV/D1 bindings, zod validation on JSON routes, strict CORS allowlisting, and a type-safe RPC client based on chained route definitions.

Frequently Asked Questions about hono

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a type-safe HTTP API with Hono for Cloudflare Workers?

To build a type-safe HTTP API with Hono for Cloudflare Workers, you define your routes and export an `AppType` as `typeof <chained routes>`. This lets you consume the API via the `hc<AppType>()` RPC client for end-to-end typed client calls and runtime-correct KV/D1 bindings.

How does zod validation work in a Hono web framework application?

Zod validation in a Hono web framework application works by using `@hono/zod-validator` middleware. It ensures `c.req.valid(...)` returns typed handler inputs, seamlessly integrating request validation into your route definitions without breaking type-safety.

Can I use the same Hono API code for both edge and Node runtimes?

Yes, you can use the same Hono API code for both edge and Node runtimes. Hono 4 allows you to pick the correct runtime entry shape for Workers, Bun, Deno, Vercel Edge, Lambda, or Node via `@hono/node-server` while keeping the underlying route code portable.

What is the best way to generate a typed RPC client for Hono routes?

The best way to generate a typed RPC client for Hono routes is to export `AppType = typeof <chained routes>` from your server. Clients then use `hc<AppType>()` to make end-to-end typed API calls with full TypeScript inference.

Why does my CORS configuration break when using cookies and JWT in Hono?

CORS configuration breaks when using cookies and JWT in Hono due to incorrect credential handling. You must apply hardened middleware defaults with strict CORS allowlisting and proper cookie settings to avoid common production foot-guns with authenticated requests.

Does Hono edge runtime require WebCrypto instead of Node crypto APIs?

Yes, Hono edge runtime requires WebCrypto instead of Node crypto APIs. When deploying to edge environments like Cloudflare Workers or Vercel Edge, you must use WebCrypto APIs to maintain runtime compatibility and avoid production failures.