hono-api-scaffolder

Scaffold Hono API routes for Cloudflare Workers with Zod validation.

Updated May 23, 2026
One-click install
npx skills add https://github.com/devturco/thiago-dev-template --skill hono-api-scaffolder-devturco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hono-api-scaffolder
Source: https://github.com/devturco/thiago-dev-template/tree/main/.claude/skills/hono-api-scaffolder
Command: npx skills add https://github.com/devturco/thiago-dev-template --skill hono-api-scaffolder-devturco

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Creating new API endpoints in a Cloudflare Workers + Hono codebase is slow and error-prone because you must consistently handle routing structure, typed bindings, request validation, and JSON error responses.

Core Features & Use Cases

  • Route scaffolding by resource: Generates one route file per resource group to keep APIs organized as endpoints grow (e.g., Users, Posts, Auth).
  • Zod-backed request validation: Adds @hono/zod-validator schemas so request bodies are validated and typed end-to-end.
  • Middleware and wiring: Includes common middleware patterns (auth and CORS) and wires route groups into the main entry point with a global JSON error handler.
  • Endpoint documentation output: Produces API_ENDPOINTS.md entries using a consistent template so clients know how to call each endpoint.

Quick Start

Ask the skill to scaffold your next set of API endpoints (grouped by resource) and generate the corresponding route files, middleware, and API_ENDPOINTS.md for your project.

Frequently Asked Questions about hono-api-scaffolder

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

FAQPage Schema
How do I scaffold Hono API routes for Cloudflare Workers with Zod validation?

To scaffold Hono API routes for Cloudflare Workers, generate resource-based route files that integrate Zod schemas for request validation and typed Env bindings. This ensures endpoints are validated and typed end-to-end while wiring route groups into the main entry point.

What is the best way to structure Hono API endpoints by resource?

The best way to structure Hono API endpoints is generating one route file per resource group, such as Users or Posts. This resource-based scaffolding keeps APIs organized as the endpoint surface expands and maintains consistent routing logic.

How do I add consistent JSON error handling to a Hono API?

Add consistent JSON error handling to a Hono API by wiring route groups into the main entry point with a global JSON error handler. This ensures all endpoints return uniform error responses when request validation or processing fails.

Does Hono API scaffolding require an existing project shell?

Hono API scaffolding requires an existing project shell before execution. The scaffolding process must run after the base project exists to correctly apply route and middleware templates and output the required route wiring.

Can I generate API documentation for Hono endpoints automatically?

You can generate API documentation for Hono endpoints automatically by producing API_ENDPOINTS.md entries. The scaffolding process uses a consistent template so clients and consumers know exactly how to call each generated endpoint.

What middleware patterns are included when scaffolding Hono routes?

Middleware patterns included when scaffolding Hono routes cover common configurations like auth and CORS. These are applied alongside Zod request validation and wired into the main entry point with a global JSON error handler.