home / skills / bankkroll / skills-builder / hono

hono skill

/skills/hono

This skill helps you navigate hono Python documentation, answering api, middleware, and getting started questions with concise guidance.

npx playbooks add skill bankkroll/skills-builder --skill hono

Review the files below or copy the command above to add this skill to your agents.

Files (12)
SKILL.md
2.9 KB
---
name: "hono"
description: "Scraped from https://hono.dev/docs/ Source: https://hono.dev/docs/. Use when questions involve: api, concepts, getting started, guides, helpers, middleware."
---

# Hono

> Official documentation: https://hono.dev/docs/

## Overview

This skill provides comprehensive documentation for hono.

**Total references:** 11 files (~57,399 tokens)

**Topics covered:**
blob, 1 Install Bun, 2 Project setup, header, accepts, Usage with Bun for large requests, Example flows, Metadata hoisting, Middleware, Starter, url, With Zod...

## Reference Files

Load only the reference files relevant to the user's question:

### Api

- **[Context​ and more](references/api.md)** (~5,336 tokens)
  - Topics: req, status, header

### Concepts

- **[Benchmarks​ and more](references/concepts.md)** (~2,978 tokens)
  - Topics: Routers, Cloudflare Workers, Deno

### General

- **[Hono​](references/general.md)** (~1,280 tokens)
  - Topics: Quick Start, Features, Use-cases

### Getting Started

- **[Alibaba Cloud Function Compute​ and more](references/getting-started-1.md)** (~7,698 tokens)
  - Topics: 1 Setup, 2 Hello World, 3 Setup serverless-devs
- **[Fastly Compute​ and more](references/getting-started-2.md)** (~6,905 tokens)
  - Topics: 1 Setup, 2 Hello World, 3 Run

### Guides

- **[Best Practices​ and more](references/guides-1.md)** (~5,584 tokens)
  - Topics: Dont make Controllers when possible, factorycreateHandlersinhonofactory, Building a larger application
- **[RPC​ and more](references/guides-2.md)** (~5,713 tokens)
  - Topics: Server, Client, Status code

### Helpers

- **[Accepts Helper​ and more](references/helpers-1.md)** (~7,768 tokens)
  - Topics: Import, accepts, Options
- **[Streaming Helper​ and more](references/helpers-2.md)** (~1,849 tokens)
  - Topics: Import, stream, streamText

### Middleware

- **[Basic Auth Middleware​ and more](references/middleware-1.md)** (~7,083 tokens)
  - Topics: Import, Usage, Options
- **[Language Middleware​ and more](references/middleware-2.md)** (~5,205 tokens)
  - Topics: Import, Basic Usage, Default Configuration

## Usage Guidelines

1. **Identify relevant sections** - Match the user's question to the appropriate reference file(s)
2. **Load minimally** - Only read files directly relevant to the question to conserve context
3. **Cite sources** - Reference specific sections when answering
4. **Combine knowledge** - For complex questions, you may need multiple reference files

### When to use each reference:

- **Api**: API endpoints, parameters, responses, and examples
- **Concepts**: Concepts-related features and documentation
- **General**: General documentation, overview, and getting started
- **Getting Started**: Getting Started-related features and documentation
- **Guides**: Guides-related features and documentation
- **Helpers**: Helpers-related features and documentation
- **Middleware**: Middleware-related features and documentation

Overview

This skill provides a focused, practical reference for Hono, a lightweight web framework. It consolidates API details, core concepts, getting-started guides, middleware patterns, and helper utilities to help you build and maintain Hono apps quickly. Use it when you need concise examples, configuration tips, or recommended patterns for production use.

How this skill works

The skill inspects Hono documentation sections for API usage (request/response helpers, headers, status), conceptual topics (routing, deployment targets), step-by-step getting-started instructions, guides for app structure, and middleware/helpers. It returns concrete examples, recommended patterns, and configuration options drawn directly from the official docs to answer implementation and design questions.

When to use it

  • You need quick examples for request/response handling, headers, or status codes in Hono.
  • You want setup instructions or deployment notes for Bun, Cloudflare Workers, Deno, or serverless targets.
  • You’re implementing middleware (auth, language, streaming) or using built-in helpers (accepts, stream).
  • You need guidance on structuring a larger Hono application or following Hono best practices.
  • You’re comparing routing/worker concepts or optimizing an API for performance.

Best practices

  • Prefer small handler functions and compose middleware instead of large controller classes.
  • Use built-in helpers (accepts, streaming) to keep code concise and avoid reinventing parsing logic.
  • Hoist metadata and avoid deep coupling between route handlers to improve testability.
  • Choose the appropriate deployment guide (Bun, Cloudflare, Fastly, serverless) and follow its runtime-specific notes.
  • Validate inputs and return appropriate status codes; use provided response helpers for consistency.

Example use cases

  • Create a minimal API with route handlers, demonstrating request parsing, headers, and status responses.
  • Implement authentication middleware using the basic-auth pattern and integrate it with routes.
  • Stream large responses efficiently using the streaming helpers while preserving memory.
  • Bootstrap a new project on Bun or Cloudflare Workers following the getting-started flow.
  • Refactor a monolithic handler into composable middleware and small handlers for better maintainability.

FAQ

Does this skill cover deployment specifics for different runtimes?

Yes — it includes runtime-specific getting-started steps and notes for Bun, Cloudflare Workers, Deno, Fastly, and serverless targets.

Can it show examples for middleware and helpers?

Yes — it provides examples and usage patterns for common middleware (auth, language) and helpers like accepts and streaming.