Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
Imported from pproenca/dot-skills (skills/.experimental/effect-ts/SKILL.md). Install upstream with npx skills add pproenca/dot-skills --skill effect-ts. Copyright stays with the author.
Effect TypeScript Best Practices
Effect is a TypeScript library for building complex, type-safe applications with structured
error handling, dependency injection via services/layers, fiber-based concurrency, and
resource safety.
When to Apply
Writing or reviewing TypeScript code that imports from effect, @effect/schema, or @effect/platform
Implementing typed error handling with Effect<Success, Error, Requirements>
Building services and layers for dependency injection
Working with Schema for data validation, decoding, and transformation
Using fiber-based concurrency (queues, semaphores, PubSub, deferred)
Processing data with Stream and Sink
Migrating from Promises, fp-ts, neverthrow, or ZIO to Effect
How to Use
This skill is organized by domain. Read the relevant reference file for the area you're working in.
Read First: The Paradigm
Always read this before diving into API references, especially when refactoring existing
code to use Effect or writing new Effect services:
Before any other reference. Mental model shifts, refactoring recipes, anti-patterns, application architecture. Read this to understand HOW to think in Effect — the other files teach WHAT to type.
import { Effect } from "effect"// From sync valuesconst succeed = Effect.succeed(42)const fail = Effect.fail(new Error("oops"))// From sync code that may throwconst sync = Effect.try(() => JSON.parse(data))// From promisesconst async = Effect.tryPromise(() => fetch(url))// From generators (recommended for complex flows)const program = Effect.gen(function* () { const user = yield* getUser(id) const todos = yield* getTodos(user.id) return { user, todos }})
Running Effects
// Async (returns Promise)Effect.runPromise(program)// With full Exit informationEffect.runPromiseExit(program)// Sync (throws on async)Effect.runSync(program)
Install effect-ts and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://osr-api.kindrock-caaab1a2.centralindia.azurecontainerapps.io/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
pproenca-dot-skills-effect-ts.ocm.jsonjson
{
"ocm": "1",
"id": "pproenca-dot-skills-effect-ts",
"kind": "skill",
"name": "effect-ts",
"description": "Effect-TS library usage in TypeScript — Effect.gen generators, Schema.Struct/Schema.Class definitions, Layer/Context.Tag/Service patterns, Effect.pipe pipelines, Data.TaggedError/Data.Class error types, Ref/Queue/PubSub/Deferred concurrency primitives, Match module, Config providers, Scope/Exit/Cause/Runtime patterns, or any code using Effect's typed error channel (E parameter). Trigger when writing, reviewing, debugging, or refactoring TypeScript code that uses Effect — when you see imports from `effect`, `effect/*`, or any `@effect/*` scoped package (schema, platform, sql, opentelemetry, cli, cluster, rpc, vitest). Also trigger when the user asks about Effect patterns, migration from Promises/fp-ts/neverthrow to Effect, or how to structure an Effect application. Do NOT trigger for React's useEffect, Redux side effects, or general English usage of \"effect\" unless the context clearly involves the Effect-TS library.",
"publisher": "pproenca",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding",
"data_analysis"
],
"tags": [
"skill-md",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Effect-TS library usage in TypeScript — Effect.gen generators, Schema.Struct/Schema.Class definitions, Layer/Context.Tag/Service patterns, Effect.pipe pipelines, Data.TaggedError/Data.Class error types, Ref/Queue/PubSub/Deferred concurrency primitives, Match module, Config providers, Scope/Exit/Cause/Runtime patterns, or any code using Effect's typed error channel (E parameter). Trigger when writing, reviewing, debugging, or refactoring TypeScript code that uses Effect — when you see imports from `effect`, `effect/*`, or any `@effect/*` scoped package (schema, platform, sql, opentelemetry, cli, cluster, rpc, vitest). Also trigger when the user asks about Effect patterns, migration from Promises/fp-ts/neverthrow to Effect, or how to structure an Effect application. Do NOT trigger for React's useEffect, Redux side effects, or general English usage of \"effect\" unless the context clearly involves the Effect-TS library."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/pproenca/dot-skills",
"path": "skills/.experimental/effect-ts/SKILL.md",
"ref": "HEAD",
"url": "https://github.com/pproenca/dot-skills/blob/HEAD/skills/.experimental/effect-ts/SKILL.md",
"key": "pproenca/dot-skills/skills/.experimental/effect-ts/SKILL.md"
}
},
"instructions": "# Effect TypeScript Best Practices\n\nEffect is a TypeScript library for building complex, type-safe applications with structured\nerror handling, dependency injection via services/layers, fiber-based concurrency, and\nresource safety.\n\n## When to Apply\n\n- Writing or reviewing TypeScript code that imports from `effect`, `@effect/schema`, or `@effect/platform`\n- Implementing typed error handling with `Effect<Success, Error, Requirements>`\n- Building services and layers for dependency injection\n- Working with Schema for data validation, decoding, and transformation\n- Using fiber-based concurrency (q",
"cost": {
"context_tokens": 1721
}
}
Fetch it by URL: GET /api/v1/registry/pproenca-dot-skills-effect-ts/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.