hono-routing

Build type-safe Hono APIs with validated routes across multiple runtimes.

64|2|Updated Feb 8, 2018
One-click install
npx skills add https://github.com/yuki-yano/dotfiles --skill hono-routing-yuki-yano
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hono-routing
Source: https://github.com/yuki-yano/dotfiles/tree/main/.agents/skills/hono-routing
Command: npx skills add https://github.com/yuki-yano/dotfiles --skill hono-routing-yuki-yano

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build robust, type-safe APIs across runtimes with Hono's routing, middleware, and validation patterns.

Core Features & Use Cases

  • Route across Cloudflare Workers, Deno, Bun, and Node.js with consistent types and error handling.
  • Validate requests (JSON, query, params, headers) using Zod/Valibot, with RPC-based type inference for clients.
  • Support streaming (SSE) and WebSocket for real-time communication, plus security features like CSRF and secureHeaders.
  • Use cases include building scalable APIs, real-time services, and cross-runtime utilities with reliable type safety.

Quick Start

Create a simple route that validates a JSON payload and returns a typed response.

Frequently Asked Questions about hono-routing

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

FAQPage Schema
How do I build type-safe Hono APIs that work across Cloudflare Workers, Deno, Bun, and Node.js?

Build type-safe Hono APIs across runtimes by applying consistent routing, validation, and centralized error handling patterns to maintain reliable client-server typing.

How do I validate JSON requests and infer types for Hono RPC clients?

Validate JSON, query, and header requests using Zod or Valibot to enable Hono RPC-based type inference, ensuring end-to-end type safety for client-server interactions.

Can I use Hono for streaming SSE and WebSocket endpoints?

Hono supports streaming SSE and WebSocket endpoints for real-time communication, allowing you to build scalable real-time services with consistent cross-runtime type safety.

What is the best way to handle errors and sequence middleware in Hono?

Handle errors centrally using Hono's onError and HTTPException, and ensure proper middleware sequencing by always awaiting next() to maintain reliable request processing.

Does Hono support security features like CSRF protection and secure headers?

Hono includes security features like CSRF protection and secureHeaders, allowing you to build secure APIs with validated routes across Cloudflare Workers, Deno, Bun, and Node.js.