
Hono Middleware
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-codeInstalls 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- Golang Cli Cobra Viper438
- Dependency Audit434
- Wordpress Plugin Fundamentals434
- Phoenix Liveview432
- Wordpress Testing Qa430
- Digitalocean Compute429
- Database Migration427
- Hono Testing422
- Golang Observability Opentelemetry421
- Shadcn Ui421
- Golang Concurrency Patterns420
- Digitalocean Overview419
- Hono Validation419
- Digitalocean Networking415
- Digitalocean Storage414
- Golang Database Patterns414
- Openrouter413
- Digitalocean Managed Databases404
- Verification Before Completion401
- Test Driven Development400
- Better Auth Authentication398
- Kysely398
- Kubernetes397
- Json Data Handling394