iii-http-middleware
Installation
SKILL.md
HTTP Middleware
Comparable to: Express middleware, Fastify hooks, Django middleware
Key Concepts
Use the concepts below when they fit the task. Not every middleware setup needs all of them.
- Middleware functions are registered like normal functions but return
{ action: 'continue' }or{ action: 'respond', response }instead of a normal response - Middleware is attached to HTTP triggers via
middleware_function_idsin the trigger config - The engine executes middleware in order — first middleware runs first, then the next, then the handler
- Middleware receives a
MiddlewareFunctionInputwithphase,request(path_params, query_params, headers, method), andcontextfrom auth - Returning
{ action: 'respond' }short-circuits the chain — the handler never runs - Returning
{ action: 'continue' }passes to the next middleware or the handler