If you're working with Hono's middleware system, this skill gives Claude the patterns for that onion-style execution model where middleware wraps around your handlers. It covers the built-in middleware collection, type-safe middleware creation with createMiddleware, and how to pass context variables between layers. The skill has decent adoption with 235 installs and passes most security audits, though Snyk flagged something. Honestly, this is one of those skills that pays off quickly if you're already in the Hono ecosystem and need Claude to help structure authentication, logging, or CORS without explaining the framework's quirks every time.

skills.sh installs
444
GitHub stars
79
last updated
Aug 21, 2026

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill hono-middleware --agent claude-code

Installs into .claude/skills of the current project.

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`)
})

Sponsors

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Backend & APIs
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 158
1sickn33 avatardatabase-optimizersickn33/antigravity-awesome-skillsdatabase optimizer436skills.sh installs
2trading212-labs avatartrading212-apitrading212-labs/agent-skillstrading212 api433skills.sh installs
3bobmatnyc avatargolang-database-patternsbobmatnyc/claude-mpm-skillsGo database integration patterns using sqlx, pgx, and migration tools like golang-migrate414skills.sh installs
4sickn33 avatardatabase-migrationsickn33/antigravity-awesome-skillsdatabase migration398skills.sh installs
5kernel avatarkernel-authkernel/skillsUse Kernel managed auth whenever an agent needs to do something on a website as a logged-in user, including browsing, operating, automating, testing, debugging,397skills.sh installs
6bobmatnyc avatarapi-documentationbobmatnyc/claude-mpm-skillsBest practices for documenting APIs and code interfaces, eliminating redundant documentation guidance per agent.389skills.sh installs