hono-validation

Validate Hono request data with Zod, Valibot, Standard Schema, or manual validators.

3|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/lucasilverentand/skills --skill hono-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hono-validation
Source: https://github.com/lucasilverentand/skills/tree/main/skills/hono/validation
Command: npx skills add https://github.com/lucasilverentand/skills --skill hono-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers ensure that incoming HTTP requests in Hono applications are validated and typed, reducing runtime errors and bugs caused by malformed input.

Core Features & Use Cases

  • Multi-validator support: Use Zod, Valibot, Standard Schema, or manual validators for body, query, params, and headers.
  • Type inference: Generate TypeScript types from schemas to enable strong typing across services.
  • Use Case: Validate API inputs in microservices to prevent invalid data from propagating.

Quick Start

Create a Hono route that validates a JSON payload using a validator (e.g., zValidator) and then uses the typed data from c.req.valid('json').

Frequently Asked Questions about hono-validation

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

FAQPage Schema
How do I validate Hono request data using Zod or Valibot?

Validate Hono request data by applying schema validators to your routes. You can use Zod, Valibot, Standard Schema, or manual validators to check body, query, params, and headers, ensuring inputs are correctly typed.

What is the best way to get TypeScript type inference for Hono API inputs?

Type inference for Hono API inputs is achieved by defining validation schemas. The validator generates TypeScript types from your schemas, allowing you to access strongly typed data from c.req.valid('json') across your services.

Can I use Standard Schema to validate both JSON and form inputs in Hono?

Yes, you can validate both JSON and form inputs in Hono using Standard Schema. The validation mechanism supports typical API route inputs, allowing you to secure headers, query parameters, params, and body data uniformly.

How do I handle validation errors in Hono routes?

Handle validation errors in Hono routes by implementing custom error handling and reusable validation hooks. This ensures consistent error responses when malformed input is detected, preventing invalid data from propagating through your API.

Does Hono validation support manual validators or only schema-based libraries?

Hono validation supports both schema-based libraries and manual validators. You can use Zod, Valibot, Standard Schema, or define manual validators to enforce typed inputs and prevent runtime errors in your microservices.