effect-patterns-building-apis

Automate Effect-TS API creation with routing, schemas, and OpenAPI generation.

785|26|Updated Jun 22, 2025
One-click install
npx skills add https://github.com/PaulJPhilp/EffectPatterns --skill effect-patterns-building-apis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-patterns-building-apis
Source: https://github.com/PaulJPhilp/EffectPatterns/tree/main/config/.claude-plugin/plugins/effect-patterns/skills/effect-patterns-building-apis
Command: npx skills add https://github.com/PaulJPhilp/EffectPatterns --skill effect-patterns-building-apis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect-TS API patterns often require repeated boilerplate for routing, error handling, and OpenAPI docs. This skill provides a structured approach to building and documenting robust HTTP APIs with standard patterns.

Core Features & Use Cases

  • Declarative routing with HttpRouter and typed errors to simplify endpoint definitions.
  • Centralized error handling and OpenAPI generation to standardize responses and docs.
  • Schema-based request validation and dependency injection via Layer for scalable architectures.
  • Middleware composition to easily compose cross-cutting concerns across routes.

Quick Start

Define your API with HttpRouter to declare routes and schemas, provide dependencies via Layer, expose via Http.server.serve with a Node HTTP layer, and generate OpenAPI docs for your endpoints.

Frequently Asked Questions about effect-patterns-building-apis

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

FAQPage Schema
How do I generate OpenAPI documentation for an Effect-TS HTTP API?

You generate OpenAPI documentation for an Effect-TS HTTP API by defining type-safe schemas and declarative routing, which standardizes responses and automatically produces endpoint docs.

What is the best way to structure dependency injection in Effect-TS API routes?

The best way to structure dependency injection in Effect-TS is using Layer to provide dependencies, enabling scalable architectures and middleware composition across routes.

How do I set up declarative routing and request validation with Effect-TS?

You set up declarative routing and request validation with Effect-TS by using HttpRouter to declare routes and applying schema-based validation for type-safe incoming data.

Can I use Effect-TS to build platform-agnostic server architectures?

Yes, you can build platform-agnostic server architectures with Effect-TS by using Http.server.serve with Node HTTP layers to assemble servers without platform lock-in.

Does Effect-TS support centralized error handling for HTTP services?

Effect-TS supports centralized error handling for HTTP services by enforcing typed errors and declarative routing, which simplifies endpoint definitions and standardizes responses.

When should I use middleware composition in an Effect-TS API?

You should use middleware composition in an Effect-TS API when you need to easily compose cross-cutting concerns across routes, ensuring scalable server architectures.