Agent skill
hono
Specialist in Hono (v4+), an ultrafast web framework for Edge (Cloudflare, Bun, Deno) and Node. Focuses on type-safe RPC, middleware, and Web Standards.
Install this agent skill to your Project
npx add-skill https://github.com/joncrangle/.dotfiles/tree/main/dot_config/opencode/skills/hono
SKILL.md
<skill_doc> <trigger_keywords>
Trigger Keywords
Activate this skill when the user mentions any of:
Core: Hono, c (Context), app.get, app.post, app.use, hono/jsx
RPC / Types: zValidator, hono/client, hc, AppType, client.index.$get
Environments: Cloudflare Workers, Bun, Deno, Edge, c.env, Bindings
Testing: app.request, testClient </trigger_keywords>
⛔ Forbidden Patterns
- NO Node.js Specifics on Edge: Avoid
fs,path, orprocesswhen targeting Cloudflare/Deno. - NO Untyped Validators: Don't use
c.req.json()raw if you havezValidator. Usec.req.valid('json'). - NO Controller Classes: Avoid OOP-style controller classes. They break Hono RPC type inference. Use inline handlers or
factory.createHandlers. - NO
res.send: This is not Express. Returnc.json(),c.text(), or aResponseobject. - NO Global State: In serverless/edge, global variables may not persist. Use
c.set/c.getfor request-scoped state orc.envfor config.
🤖 Agent Tool Strategy
- Runtime Check: Identify the target runtime (Cloudflare, Bun, Node) to recommend correct bindings and adapters.
- RPC First: Suggest Hono RPC (
client) for frontend-backend communication to share types automatically. - Validation: Always pair inputs with
@hono/zod-validatorfor runtime safety and type inference. - Testing: Prefer
app.request()for fast integration tests over spinning up a localhost server.
Quick Reference (30 seconds)
Hono Specialist - Ultrafast, Standards-based, Multi-runtime.
Core Philosophy:
- Web Standards: Built on
RequestandResponse. - RegExpRouter: Extremely fast routing engine.
- Type-Safe RPC: Share
AppTypewith client for autocompletion.
Context (c):
c.req: Request object.c.env: Environment variables/bindings.c.json(): Send JSON response.c.var: Request-scoped variables (middleware).
Resources
- Examples: See
examples/examples.mdfor detailed code patterns. - References: See
references/reference.mdfor official documentation links. </skill_doc>
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
lang-javascript
This skill should be used when the user asks to "write JavaScript", "debug a Node.js/Bun app", "create a Hono server", "configure Biome", "run tests with bun test", or mentions .js/.mjs files. Covers ES2024+, Bun, and Hono patterns.
opentui
Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.
vitest
Specialist in Vitest, a blazing fast unit test framework powered by Vite. Focuses on Jest compatibility, in-source testing, and native ESM support.
PreventionPatterns
Known bug patterns and their fixes to prevent regression.
lang-typescript
This skill should be used when the user asks to "write TypeScript", "debug TypeScript", "create a SolidJS component", "configure TanStack Start", "validate data with Valibot", or mentions .ts/.tsx files. Covers TypeScript 5.9+, SolidJS, and TanStack patterns.
just-cli
This skill should be used when the user asks to "create a justfile", "write just recipes", "configure just settings", "add just modules", "use just attributes", "set up task automation", mentions justfile, just command runner, or task automation with just.
Didn't find tool you were looking for?