effect-patterns-services-agents
БесплатноБез исполняемых скриптовНе проверенEffect-TS service and agent patterns for this repo. Use when implementing or modifying services in packages/mcp-server, adding agents, or following…
от PaulJPhilp★ 807 звёзд на GitHubОб этом скилле
Effect Patterns – Services & Agents
Effect.Service pattern
Use Effect's Service pattern for composable, type-safe dependency injection:
import { Effect, Context } from "effect"
export class MyService extends Context.Tag("MyService")<MyService, {
method: () => Effect.Effect<string>
}>() {}
const effect = Effect.gen(function* () {
const service = yield* MyService
const result = yield* service.method()
return result
})
Modern form with Effect.Service:
export class MyAgent extends Effect.Service<MyAgent>()("MyAgent", {
effect: Effect.gen(function* () {
return {
analyze: (input: string) => Effect.succeed("result")
}
})
})
Service / agent structure
Use this layout for agents and service modules:
agents/
├── analyzer/
│ ├── api.ts # Public interface
│ ├── schema.ts # Type definitions
│ ├── service.ts # Core logic
│ ├── types.ts # Domain types
│ └── __tests__/ # Test suite
Error handling as values
Use tagged error types; recover with catchTag:
import { Data } from "effect"
export class APIError extends Data.TaggedError("APIError")<{
readonly status: number
readonly message: string
}> {}
Effect.catchTag("APIError", (err) => /* handle */)
Layered service composition
Compose services via Effect.Layer; provide to the app with Effect.provide:
const appLayer = Layer.mergeAll(
ConfigService.layer,
CacheService.layer,
CircuitBreakerService.layer,
RateLimiterService.layer,
ReviewCodeService.layer,
)
Effect.provide(appEffect, appLayer)
Conventions in this repo
- Effect-TS native: Use Effect for composability and error handling.
- Type safety: Use @effect/schema for types and validation.
- No path aliases: Use
workspace:*dependencies; run from project root. - Debug from root: e.g.
scripts/debug-blocking.tsfor correct module resolution.
Установить effect-patterns-services-agents в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл effect-patterns-services-agents?
Effect-TS service and agent patterns for this repo. Use when implementing or modifying services in packages/mcp-server, adding agents, or following Effect.Service, Layer, and error-handling conventions.
Как установить скилл effect-patterns-services-agents?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл effect-patterns-services-agents запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic