Hono Middleware
Reusable Hono middleware patterns covering onion execution order, typed context variables, and built-in auth, CORS, and security handlers.
- CCM score
- 57 of 100
- skills.sh installs
- 462
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers middleware creation with
createMiddleware, onion-style execution order, and passing typed values between middleware through context variables - Includes examples for CORS, bearer, basic, and JWT auth, logging, compression, ETag, caching, secure headers, CSRF, timeout, and request IDs
- Shows that middleware registered earlier wraps later handlers, so code after
await next()runs in reverse order - Designed for Hono web applications that need authentication, CORS, logging, or custom request processing
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill hono-middleware -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Hono Middleware Patterns
Overview
Hono provides a powerful middleware system with an "onion" execution model. Middleware processes requests before handlers and responses after handlers, enabling cross-cutting concerns like authentication, logging, and CORS.
Key Features:
- Onion-style execution order
- Type-safe middleware creation with
createMiddleware - 25+ built-in middleware
- Context variable passing between middleware
- Async/await support throughout
When to Use This Skill
Use Hono middleware when:
- Adding authentication/authorization
- Implementing CORS for cross-origin requests
- Adding request logging or timing
- Compressing responses
- Rate limiting API endpoints
- Validating requests before handlers
Middleware Basics
Inline Middleware
import { Hono } from 'hono'
const app = new Hono()
// Simple logging middleware
app.use('*', async (c, next) => {
console.log(`[${c.req.method}] ${c.req.url}`)
await next()
})
// Path-specific middleware
app.use('/api/*', async (c, next) => {
const start = Date.now()
await next()
const ms = Date.now() - start
c.header('X-Response-Time', `${ms}ms`)
})
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Backend & APIs, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the hono-middleware skill do?
The hono-middleware skill covers Hono middleware patterns, including creating middleware, composing it, using built-in middleware, and understanding execution order in web applications. It explains the onion execution model, where middleware runs before handlers and again on the way out. It also shows how to pass data between middleware with context variables.
How do I install the hono-middleware skill?
Run npx -y skills add bobmatnyc/claude-mpm-skills --skill hono-middleware -y in your project. Once installed, the agent can apply Hono middleware such as CORS, bearer and JWT auth, logging, compression and secure headers to your routes.
Which category is hono-middleware in, and what else is there?
The hono-middleware skill sits in the Backend & APIs category on Claude Marketplaces. Other skills in that category that lead it include entra-app-registration, neon, firebase-basics, firebase-auth-basics and workers-best-practices. This skill is focused specifically on middleware for Hono applications.
More from bobmatnyc/claude-mpm-skills
All 154- Wordpress Plugin Fundamentals455
- Golang Cli Cobra Viper454
- Digitalocean Compute451
- Dependency Audit450
- Wordpress Testing Qa449
- Phoenix Liveview448
- Database Migration443
- Golang Observability Opentelemetry442
- Hono Testing441
- Hono Validation438
- Golang Concurrency Patterns437
- Digitalocean Overview436
- Digitalocean Networking433
- Openrouter433
- Digitalocean Storage431
- Golang Database Patterns431
- Digitalocean Managed Databases421
- Shadcn Ui421
- Test Driven Development421
- Verification Before Completion418
- Better Auth Authentication416
- Kubernetes415
- Kysely415
- Json Data Handling412
Similar to Hono Middleware
More Backend & APIsbun-hono-integrationsecondsky/claude-skills477 installsLightweight Hono web framework guide for building Bun APIs with routing, middleware, and validation.
expressjs-developmentmanutej/luxor-claude-marketplace569 installsComprehensive Express.js guide covering routing, middleware, request handling, error handling, and production REST APIs.
cors-configurationpatricio0312rev/skills295 installsConfigures CORS for APIs and web apps with origin allowlists, preflight handling, and credential rules.
hono-corebobmatnyc/claude-mpm-skills520 installsUltrafast multi-runtime web framework covering routing, context, handlers, and responses on Web Standards.
better-auth-integrationsbobmatnyc/claude-mpm-skills381 installsRoute handler wiring for Better Auth across Next.js, SvelteKit, Remix, Express, Hono, and other frameworks.
nodejs-backend-patternswshobson/agents51.5K installsProduction-ready Node.js backend patterns for Express or Fastify services, REST, GraphQL, and microservices.