hono

Build type-safe web APIs and full-stack apps with Hono on edge runtimes.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill hono-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hono
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/hono
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill hono-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building APIs that run consistently across Cloudflare Workers, Deno, Bun, and Node.js usually requires rewriting code per platform. This Skill provides guidance for creating a single Hono codebase that runs on any WinterCG-compatible runtime with full TypeScript type safety. ## Core Features & Use Cases - Routing and Middleware: Define REST routes, route groups, and apply built-in middleware like logger, cors, jwt, and bearerAuth. - Validation and Type Safety: Validate request bodies, queries, and params with zValidator and Zod schemas for fully typed handlers. - End-to-End RPC Client: Export route types and consume them with the hc client for autocomplete across frontend and backend. - Use Case: Build a Cloudflare Workers API backed by a D1 database, with JWT authentication and typed bindings, then deploy it with Wrangler. ## Quick Start Ask the AI to scaffold a Hono API with CRUD routes, Zod validation, and JWT auth for deployment on Cloudflare Workers.

Frequently Asked Questions about hono

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

FAQPage Schema
How do I build a REST API with Hono?

Create a Hono app instance and define routes with methods like app.get, app.post, and app.delete, returning responses via c.json or c.text. Organize handlers into sub-routers and mount them with app.route for larger applications.

How to validate request bodies in Hono with Zod?

Use the zValidator middleware from @hono/zod-validator with a Zod schema, then access the parsed data through c.req.valid. This gives fully typed request bodies, query parameters, and route params in your handlers.

Does Hono work on Cloudflare Workers and Node.js?

Yes, Hono runs on Cloudflare Workers, Deno, Bun, Node.js, AWS Lambda, and any WinterCG-compatible runtime with the same code. Platform bindings like D1 databases are accessed through c.env on Workers, while Node.js uses process.env.

What is the Hono RPC client and how does it compare to tRPC?

The hc client consumes exported route types from your Hono server to provide end-to-end type safety over fetch, similar to tRPC. It offers autocomplete on routes, params, and responses when frontend and backend share a repository.

Why does my Hono handler return an empty response?

Handlers must explicitly return a response, such as return c.json(data), rather than just calling c.json without returning it. Also ensure middleware calls await next() before any post-response logic.