honolisted
Install: claude install-skill Claudient/Claudient
# Hono Skill
## When to activate
- Building a new API with Hono on Cloudflare Workers, Bun, or Node.js
- Migrating an Express API to Hono for edge deployment
- Setting up Zod validation with Hono's validator middleware
- Using Hono RPC for type-safe client/server communication
- Implementing middleware (auth, CORS, rate limiting) in Hono
## When NOT to use
- Next.js API routes — use the nextjs skill
- Full-featured backend with heavy ORM integration — Hono works but Express/Fastify have more ecosystem
- Large monolith with complex middleware chains — consider NestJS
## Instructions
### Project setup
```
Set up a Hono project for [target runtime].
Runtime: [Cloudflare Workers / Bun / Node.js / Deno / Vercel Edge]
Features: [routing / validation / auth / CORS / RPC]
Cloudflare Workers setup:
npm create cloudflare@latest my-api -- --template hono
cd my-api && npm install
Directory structure:
src/
index.ts ← entry point
routes/
users.ts ← route handlers
auth.ts
middleware/
auth.ts ← custom middleware
types.ts ← shared types
wrangler.toml ← Cloudflare config
package.json
Basic Hono app (src/index.ts):
import { Hono } from 'hono'
import { cors } from 'hono/cors'
import { logger } from 'hono/logger'
import { usersRoute } from './routes/users'
const app = new Hono()
// Global middleware
app.use('*', logger())
app.use('/api/*', cors({
origin: ['https://yourapp.com'],
allowMethods: ['GET', 'POST', 'PUT', 'DELETE'],
}))
//