effect-patterns-building-apis

Build HTTP services using Effect-TS patterns with declarative routing and error handling.

Updated Jan 24, 2026
One-click install
npx skills add https://github.com/scotttrinh/nook --skill effect-patterns-building-apis-scotttrinh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-patterns-building-apis
Source: https://github.com/scotttrinh/nook/tree/main/.agents/skills/effect-patterns-building-apis
Command: npx skills add https://github.com/scotttrinh/nook --skill effect-patterns-building-apis-scotttrinh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides structured patterns and examples for building APIs using Effect-TS, helping developers write scalable, declarative, and type-safe HTTP services.

Core Features & Use Cases

  • Declarative HTTP routing with Http.router and effectful handlers.
  • Reusable patterns for error handling, middleware, and service composition in Effect.
  • Real-world examples showing how to model API endpoints, routing, and responses with type safety.

Quick Start

Install dependencies and run the TypeScript examples. Start by installing @effect/core and @effect/platform-node, then compile and execute the provided TypeScript patterns to build typed APIs with declarative routing.

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 build type-safe HTTP APIs using Effect-TS?

Building type-safe HTTP APIs in Effect-TS involves using the Http.router to establish declarative routing and effectful handlers. This pattern standardizes endpoint creation while enforcing strict TypeScript typing and modular service composition.

What is the best way to structure error handling and middleware in an Effect-TS service?

The best way to structure error handling and middleware in an Effect-TS service is to use reusable composition patterns. These patterns allow you to declaratively manage errors and inject middleware, ensuring robust HTTP services without compromising type safety.

Do I need to install @effect/platform-node to use declarative routing patterns?

Yes, you need to install @effect/platform-node and @effect/core to execute the TypeScript patterns. These dependencies provide the required Http router and runtime environment to compile and run the declarative API examples.

Can I use these Effect-TS patterns to model real-world API endpoints with strict typing?

Yes, you can use these Effect-TS patterns to model real-world API endpoints. The provided examples demonstrate how to declaratively structure routing and responses, ensuring that your API endpoints remain fully typed and modularly composed.