effect-http-api

Build schema-first typed HTTP APIs with Effect's HttpApi module.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-http-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-http-api
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-http-api
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-http-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing HTTP APIs that stay consistent across server handlers, OpenAPI docs, and type-safe clients is error-prone when schemas are scattered or manually translated.

Core Features & Use Cases

  • Schema-first endpoint definitions: define params, query, headers, payload, success, and error as Effect Schema so runtime validation and transport codecs are derived from one source.
  • Typed server + client alignment: generate OpenAPI and derive type-safe clients from the same HttpApi definition, reducing drift.
  • Middleware, security, and testing without spinning up a server: add security middleware and unit-test handlers using HttpApiTest utilities.

Quick Start

Use effect-http-api to define an HttpApiGroup with HttpApiEndpoint methods and schemas, then implement server handlers with HttpApiBuilder.group to get validated requests, documented routes, and client-ready types.

Frequently Asked Questions about effect-http-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a schema-first HTTP API with Effect-TS?

Generate OpenAPI documentation and derive type-safe clients from a single Effect HttpApi definition. This schema-first approach eliminates manual translation, reducing drift between server handlers, generated API docs, and typed client interfaces.

Can I unit test HTTP API handlers without spinning up a server?

Define security middleware and schema validations for params, query, headers, and payloads within your HttpApiGroup. The Effect HttpApi module wraps these codecs and applies security layers to ensure correct handling of encodings, status codes, and multipart responses.

What is the best way to prevent schema drift between server handlers and typed clients?

The best way to prevent schema drift is using a schema-first HTTP API definition. By defining endpoint schemas once in Effect Schema, runtime validation, OpenAPI generation, and type-safe client derivation all share the exact same source of truth.

Does the Effect HttpApi module support multipart and no-content responses?

Yes, the Effect HttpApi module supports correct handling of multipart and no-content responses. It manages encodings, status codes, and optional security middleware layers within the schema-first endpoint definitions.

How do I add security and middleware layers to an Effect HTTP API?

Add security and middleware layers to an Effect HTTP API by applying them within your HttpApiGroup definition. This ensures that schema validation, security protocols, and handler logic are integrated and tested together using HttpApiBuilder.