francostino/opencode-skills-collection/hono
Claude Code and agent skill by francostino/opencode-skills-collection
- community
Checking that the SKILL.md file is still in the repository.
Build ultra-fast web APIs and full-stack apps with Hono — runs on Cloudflare Workers, Deno, Bun, Node.js, and any WinterCG-compatible runtime.
Install
npx vskill@latest install francostino/opencode-skills-collection/honoSKILL.md
The same SKILL.md was published earlier as francostino/opencode-skills-collection/hono.
Hono Web Framework
Overview
Hono (炎, "flame" in Japanese) is a small, ultrafast web framework built on Web Standards (Request/Response/fetch). It runs anywhere: Cloudflare Workers, Deno Deploy, Bun, Node.js, AWS Lambda, and any WinterCG-compatible runtime — with the same code. Hono's router is one of the fastest available, and its middleware system, built-in JSX support, and RPC client make it a strong choice for edge APIs, BFFs, and lightweight full-stack apps.
When to Use This Skill
- Use when building a REST or RPC API for edge deployment (Cloudflare Workers, Deno Deploy)
- Use when you need a minimal but type-safe server framework for Bun or Node.js
- Use when building a Backend for Frontend (BFF) layer with low latency requirements
- Use when migrating from Express but wanting better TypeScript support and edge compatibility
- Use when the user asks about Hono routing, middleware,
c.req,c.json, orhc()RPC client
How It Works
Step 1: Project Setup
Cloudflare Workers (recommended for edge):
Bun / Node.js:
Step 2: Routing
Chained routing:
Step 3: Middleware
Hono middleware works exactly like fetch interceptors — before and after handlers:
Available built-in middleware: logger, cors, csrf, etag, cache, basicAuth, bearerAuth, jwt, compress, bodyLimit, timeout, prettyJSON, secureHeaders.
Step 4: Request and Response Helpers
Step 5: Zod Validator Middleware
Step 6: Route Groups and App Composition
Step 7: RPC Client (End-to-End Type Safety)
Hono's RPC mode exports route types that the hc client consumes — similar to tRPC but using fetch conventions:
Examples
Example 1: JWT Auth Middleware
Example 2: Cloudflare Workers with D1 Database
Example 3: Streaming Response
Best Practices
- ✅ Use route groups (sub-apps) to keep handlers in separate files —
app.route('/users', usersRouter) - ✅ Use
zValidatorfor all request body, query, and param validation - ✅ Type Cloudflare Workers bindings with the
Bindingsgeneric:new Hono<{ Bindings: Env }>() - ✅ Use the RPC client (
hc) when your frontend and backend share the same repo - ✅ Prefer returning
c.json()/c.text()overnew Response()for cleaner code - ❌ Don't use Node.js-specific APIs (
fs,path,process) if you want edge portability - ❌ Don't add heavy dependencies — Hono's value is its tiny footprint on edge runtimes
- ❌ Don't skip middleware typing — use generics (
Variables,Bindings) to keepc.get()type-safe
Security & Safety Notes
- Always validate input with
zValidatorbefore using data from requests. - Use Hono's built-in
csrfmiddleware on mutation endpoints when serving HTML/forms. - For Cloudflare Workers, store secrets in
wrangler.toml[vars](non-secret) orwrangler secret put(secret) — never hardcode them in source. - When using
bearerAuthorjwt, ensure tokens are validated server-side — do not trust client-provided user IDs. - Rate-limit sensitive endpoints (auth, password reset) with Cloudflare Rate Limiting or a custom middleware.
Common Pitfalls
- Problem: Handler returns
undefined— response is empty
Solution: Always return a response from handlers: return c.json(...) not just c.json(...).
- Problem: Middleware runs after the response is sent
Solution: Call await next() before post-response logic; Hono runs code after next() as the response travels back up the chain.
- Problem:
c.envis undefined on Node.js
Solution: Cloudflare env bindings only exist in Workers. Use process.env on Node.js.
- Problem: Route not matching — gets a 404
Solution: Check that app.route('/prefix', subRouter) uses the same prefix your client calls. Sub-routers should not repeat the prefix in their own routes.
Related Skills
@cloudflare-workers-expert— Deep dive into Cloudflare Workers platform specifics@trpc-fullstack— Alternative RPC approach for TypeScript full-stack apps@zod-validation-expert— Detailed Zod schema patterns used with@hono/zod-validator@nodejs-backend-patterns— When you need a Node.js-specific backend (not edge)
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbundled-skills/hono/SKILL.md
Popularity
- Repository stars
- 87
- Repository forks
- 11
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/francostino/opencode-skills-collection/hono)