---
name: "hono-edge-router-middleware"
description: "Build lightweight, standard-compliant HTTP APIs running seamlessly on Cloudflare, Bun, and Node."
metadata:
  author: "Yusuke Wada"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "write hono api route"
  - "hono cors middleware"
  - "deploy hono cloudflare workers"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Hono Ultra-Fast Multi-Runtime Edge Router

Develops REST APIs with Hono: configuring routing patterns, chaining built-in middleware (cors, logger, secureHeaders, basicAuth), context methods (c.json, c.text, c.req.header), and multi-runtime portability.

## When to Invoke
Invoke this skill whenever you need to:
- write hono api route
- hono cors middleware
- deploy hono cloudflare workers

## Execution SOP & Rules
1. Instantiate router: const app = new Hono().
2. Attach middleware: app.use('*', cors(), logger(), secureHeaders()).
3. Define routes: app.get('/api/users/:id', c => c.json({ id: c.req.param('id') })).
4. Export default app for Cloudflare Workers / Bun or use @hono/node-server for Node.js.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
