{"id":"65387b1b-b604-41a0-a7a5-f1a416a7e27e","shortId":"PZSFdg","kind":"skill","title":"effect-ts","tagline":"This skill should be used when the user asks about Effect-TS patterns, services, layers, error handling, service composition, or writing/refactoring code that imports from 'effect'. Also covers Effect + Next.js integration with @prb/effect-next.","description":"# Effect-TS Expert\n\nExpert guidance for functional programming with the Effect library, covering error handling, dependency injection,\ncomposability, and testing patterns.\n\n## Prerequisites Check\n\nBefore starting any Effect-related work, verify the Effect-TS source code exists at `~/.effect`.\n\n**If missing, stop immediately and inform the user.** Clone it before proceeding:\n\n```bash\ngit clone https://github.com/Effect-TS/effect.git ~/.effect\n```\n\n## Research Strategy\n\nEffect-TS has many ways to accomplish the same task. Proactively research best practices using the Task tool to spawn\nresearch agents when working with Effect patterns, especially for moderate to high complexity tasks.\n\n### Research Sources (Priority Order)\n\n1. **Codebase Patterns First** — Examine similar patterns in the current project before implementing. If Effect patterns\n   exist in the codebase, follow them for consistency. If no patterns exist, skip this step.\n\n2. **Effect Source Code** — For complex type errors, unclear behavior, or implementation details, examine the Effect\n   source at `~/.effect/packages/effect/src/`. This contains the core Effect logic and modules.\n\n### When to Research\n\n**HIGH Priority (Always Research):**\n\n- Implementing Services, Layers, or complex dependency injection\n- Error handling with multiple error types or complex error hierarchies\n- Stream-based operations and reactive patterns\n- Resource management with scoped effects and cleanup\n- Concurrent/parallel operations and performance-critical code\n- Testing patterns, especially unfamiliar test scenarios\n\n**MEDIUM Priority (Research if Complex):**\n\n- Refactoring imperative code (try-catch, promises) to Effect patterns\n- Adding new service dependencies or restructuring service layers\n- Custom error types or extending existing error hierarchies\n- Integrations with external systems (databases, APIs, third-party services)\n\n### Research Approach\n\n- Spawn multiple concurrent Task agents when investigating multiple related patterns\n- Focus on finding canonical, readable, and maintainable solutions rather than clever optimizations\n- Verify suggested approaches against existing codebase patterns for consistency (if patterns exist)\n- When multiple approaches are possible, research to find the most idiomatic Effect-TS solution\n\n## Codebase Pattern Discovery\n\nWhen working in a project that uses Effect, check for existing patterns before implementing new code:\n\n1. **Search for Effect imports** — Look for files importing from `'effect'` to understand existing usage\n2. **Identify service patterns** — Find how Services and Layers are structured in the project\n3. **Note error handling conventions** — Check how errors are defined and propagated\n4. **Examine test patterns** — Look at how Effect code is tested in the project\n\n**If no Effect patterns exist in the codebase**, proceed using canonical patterns from the Effect source and examples.\nDo not block on missing codebase patterns.\n\n## Effect Principles\n\nApply these core principles when writing Effect code:\n\n### Error Handling\n\n- Use Effect's typed error system instead of throwing exceptions\n- Define descriptive error types with proper error propagation\n- Use `Effect.fail`, `Effect.catchTag`, `Effect.catchAll` for error control flow\n- See `./references/critical-rules.md` for forbidden patterns\n\n### Dependency Injection\n\n- Implement dependency injection using Services and Layers\n- Define services with `Context.Tag`\n- Compose layers with `Layer.merge`, `Layer.provide`\n- Use `Effect.provide` to inject dependencies\n\n### Composability\n\n- Leverage Effect's composability for complex operations\n- Use appropriate constructors: `Effect.succeed`, `Effect.fail`, `Effect.tryPromise`, `Effect.try`\n- Apply proper resource management with scoped effects\n- Chain operations with `Effect.flatMap`, `Effect.map`, `Effect.tap`\n\n### Code Quality\n\n- Write type-safe code that leverages Effect's type system\n- Use `Effect.gen` for readable sequential code\n- Implement proper testing patterns using Effect's testing utilities\n- Prefer `Effect.fn()` for automatic telemetry and better stack traces\n\n## Critical Rules\n\nRead and internalize `./references/critical-rules.md` before writing any Effect code. Key guidelines:\n\n- **INEFFECTIVE:** try-catch in Effect.gen (Effect failures aren't thrown)\n- **AVOID:** Type assertions (as never/any/unknown)\n- **RECOMMENDED:** `return yield*` pattern for errors (makes termination explicit)\n\n## Common Failure Modes\n\nQuick links to patterns that frequently cause issues:\n\n- **SubscriptionRef version mismatch** — `unsafeMake is not a function` → [Quick Reference](#subscriptionref-reactive-references)\n- **Cancellation vs Failure** — Interrupts aren't errors → [Error Taxonomy](#error-taxonomy)\n- **Option vs null** — Use Option internally, null at boundaries → [option-null.md](./references/option-null.md)\n- **Stream backpressure** — Infinite streams hang → [streams.md](./references/streams.md)\n\n## Explaining Solutions\n\nWhen providing solutions, explain the Effect-TS concepts being used and why they're appropriate for the specific use\ncase. If encountering patterns not covered in the documentation, suggest improvements while maintaining consistency with\nexisting codebase patterns (when they exist).\n\n## Quick Reference\n\n### Creating Effects\n\n```typescript\nEffect.succeed(value)           // Wrap success value\nEffect.fail(error)              // Create failed effect\nEffect.tryPromise(fn)           // Wrap promise-returning function\nEffect.try(fn)                  // Wrap synchronous throwing function\nEffect.sync(fn)                 // Wrap synchronous non-throwing function\n```\n\n### Composing Effects\n\n```typescript\nEffect.flatMap(effect, fn)      // Chain effects\nEffect.map(effect, fn)          // Transform success value\nEffect.tap(effect, fn)          // Side effect without changing value\nEffect.all([...effects])        // Run effects (concurrency configurable)\nEffect.forEach(items, fn)       // Map over items with effects\n\n// Collect ALL errors (not just first)\nEffect.all([e1, e2, e3], { mode: \"validate\" })  // Returns all failures\n\n// Partial success handling\nEffect.partition([e1, e2, e3])  // Returns [failures, successes]\n```\n\n### Error Handling\n\n```typescript\n// Define typed errors with Data.TaggedError (preferred)\nclass UserNotFoundError extends Data.TaggedError(\"UserNotFoundError\")<{\n  userId: string\n}> {}\n\n// Direct yield of errors (no Effect.fail wrapper needed)\nEffect.gen(function* () {\n  if (!user) {\n    return yield* new UserNotFoundError({ userId })\n  }\n})\n\nEffect.catchTag(effect, tag, fn) // Handle specific error tag\nEffect.catchAll(effect, fn)      // Handle all errors\nEffect.result(effect)            // Convert to Exit value\nEffect.orElse(effect, alt)       // Fallback effect\n```\n\n### Error Taxonomy\n\nCategorize errors for appropriate handling:\n\n| Category                | Examples                   | Handling                  |\n| ----------------------- | -------------------------- | ------------------------- |\n| **Expected Rejections** | User cancel, deny          | Graceful exit, no retry   |\n| **Domain Errors**       | Validation, business rules | Show to user, don't retry |\n| **Defects**             | Bugs, assertions           | Log + alert, investigate  |\n| **Interruptions**       | Fiber cancel, timeout      | Cleanup, may retry        |\n| **Unknown/Foreign**     | Thrown exceptions          | Normalize at boundary     |\n\n```typescript\n// Pattern: Normalize unknown errors at boundary\nconst safeBoundary = Effect.catchAllDefect(effect, (defect) =>\n  Effect.fail(new UnknownError({ cause: defect }))\n)\n\n// Pattern: Catch user-initiated cancellations separately\nEffect.catchTag(effect, \"UserCancelledError\", () => Effect.succeed(null))\n\n// Pattern: Handle interruptions differently from failures\nEffect.onInterrupt(effect, () => Effect.log(\"Operation cancelled\"))\n```\n\n### Pattern Matching (Match Module)\n\n**Default branching tool for tagged unions and complex conditionals.**\n\n```typescript\nimport { Match } from \"effect\"\n\n// Type-safe exhaustive matching on tagged errors\nconst handleError = Match.type<AppError>().pipe(\n  Match.tag(\"UserCancelledError\", () => null),          // Expected rejection\n  Match.tag(\"ValidationError\", (e) => e.message),       // Domain error\n  Match.tag(\"NetworkError\", () => \"Connection failed\"), // Retryable\n  Match.exhaustive  // Compile error if case missing\n)\n\n// Replace nested catchTag chains\n// BEFORE: effect.pipe(catchTag(\"A\", ...), catchTag(\"B\", ...), catchTag(\"C\", ...))\n// AFTER:\nEffect.catchAll(effect, (error) =>\n  Match.value(error).pipe(\n    Match.tag(\"A\", handleA),\n    Match.tag(\"B\", handleB),\n    Match.tag(\"C\", handleC),\n    Match.exhaustive\n  )\n)\n\n// Match on values (cleaner than if/else)\nconst describe = Match.value(status).pipe(\n  Match.when(\"pending\", () => \"Loading...\"),\n  Match.when(\"success\", () => \"Done!\"),\n  Match.orElse(() => \"Unknown\")\n)\n```\n\n### Services and Layers\n\n```typescript\n// Pattern 1: Context.Tag (implementation provided separately via Layer)\nclass MyService extends Context.Tag(\"MyService\")<MyService, { ... }>() {}\nconst MyServiceLive = Layer.succeed(MyService, { ... })\nEffect.provide(effect, MyServiceLive)\n\n// Pattern 2: Effect.Service (default implementation bundled)\nclass UserRepo extends Effect.Service<UserRepo>()(\"UserRepo\", {\n  effect: Effect.gen(function* () {\n    const db = yield* Database\n    return { findAll: db.query(\"SELECT * FROM users\") }\n  }),\n  dependencies: [Database.Default],  // Optional service dependencies\n  accessors: true                     // Auto-generate method accessors\n}) {}\nEffect.provide(effect, UserRepo.Default)  // .Default layer auto-generated\n// Use UserRepo.DefaultWithoutDependencies when deps provided separately\n\n// Effect.Service with parameters (3.16.0+)\nclass ConfiguredApi extends Effect.Service<ConfiguredApi>()(\"ConfiguredApi\", {\n  effect: (config: { baseUrl: string }) =>\n    Effect.succeed({ fetch: (path: string) => `${config.baseUrl}/${path}` })\n}) {}\n\n// Pattern 3: Context.Reference (defaultable tags - 3.11.0+)\nclass SpecialNumber extends Context.Reference<SpecialNumber>()(\n  \"SpecialNumber\",\n  { defaultValue: () => 2048 }\n) {}\n// No Layer required if default value suffices\n\n// Pattern 4: Context.ReadonlyTag (covariant - 3.18.0+)\n// Use for functions that consume services without modifying the type\nfunction effectHandler<I, A, E, R>(service: Context.ReadonlyTag<I, Effect.Effect<A, E, R>>) {\n  // Handler can use service in a covariant position\n}\n```\n\n### Generator Pattern\n\n```typescript\nEffect.gen(function* () {\n  const a = yield* effectA;\n  const b = yield* effectB;\n  if (error) {\n    return yield* Effect.fail(new MyError());\n  }\n  return result;\n});\n\n// Effect.fn - automatic tracing and telemetry (preferred for named functions)\nconst fetchUser = Effect.fn(\"fetchUser\")(function* (id: string) {\n  const db = yield* Database\n  return yield* db.query(id)\n})\n// Creates spans, captures call sites, provides better stack traces\n```\n\n### Resource Management\n\n```typescript\nEffect.acquireUseRelease(acquire, use, release)  // Bracket pattern\nEffect.scoped(effect)                            // Scope lifetime to effect\nEffect.addFinalizer(cleanup)                     // Register cleanup action\n```\n\n### Duration\n\nEffect accepts human-readable duration strings anywhere a `DurationInput` is expected:\n\n```typescript\n// String syntax (preferred) - singular or plural forms work\nDuration.toMillis(\"5 minutes\")    // 300000\nDuration.toMillis(\"1 minute\")     // 60000\nDuration.toMillis(\"30 seconds\")   // 30000\nDuration.toMillis(\"100 millis\")   // 100\n\n// Verbose syntax (avoid)\nDuration.toMillis(Duration.minutes(5))  // Same result, more verbose\n\n// Common units: millis, seconds, minutes, hours, days, weeks\n// Also: nanos, micros\n```\n\n### Scheduling\n\n```typescript\nEffect.retry(effect, Schedule.exponential(\"100 millis\"))  // Retry with backoff\nEffect.repeat(effect, Schedule.fixed(\"1 second\"))         // Repeat on schedule\nSchedule.compose(s1, s2)                                  // Combine schedules\n```\n\n### State Management\n\n```typescript\nRef.make(initialValue)       // Mutable reference\nRef.get(ref)                 // Read value\nRef.set(ref, value)          // Write value\nDeferred.make<E, A>()        // One-time async value\n```\n\n### SubscriptionRef (Reactive References)\n\n```typescript\n// WARNING: Never use unsafeMake - it may not exist in your Effect version.\n// If you see \"unsafeMake is not a function\", use the safe API below.\n\nSubscriptionRef.make(initial)      // Create reactive reference (safe)\nSubscriptionRef.get(ref)           // Read current value\nSubscriptionRef.set(ref, value)    // Update value (notifies subscribers)\nSubscriptionRef.changes(ref)       // Stream of value changes\n\n// React integration (effect-atom pattern)\nconst ref = yield* SubscriptionRef.make<User | null>(null)\n// Hook reads: useSubscriptionRef(ref) — returns current value or null\n// Handle null explicitly in components\n```\n\n### Concurrency\n\n```typescript\nEffect.fork(effect)              // Run in background fiber\nFiber.join(fiber)                // Wait for fiber result\nEffect.race(effect1, effect2)    // First to complete wins\nEffect.all([...effects], { concurrency: \"unbounded\" })\n```\n\n### Configuration & Environment Variables\n\n```typescript\nimport { Config, ConfigProvider, Effect, Layer, Redacted } from \"effect\"\n\n// Basic config values\nconst port = Config.number(\"PORT\")                    // Required number\nconst host = Config.string(\"HOST\").pipe(              // Optional with default\n  Config.withDefault(\"localhost\")\n)\n\n// Sensitive values (masked in logs)\nconst apiKey = Config.redacted(\"API_KEY\")             // Returns Redacted<string>\nconst secret = Redacted.value(yield* apiKey)          // Unwrap when needed\n\n// Nested configuration with prefix\nconst dbConfig = Config.all({\n  host: Config.string(\"HOST\"),\n  port: Config.number(\"PORT\"),\n  name: Config.string(\"NAME\"),\n}).pipe(Config.nested(\"DATABASE\"))                    // DATABASE_HOST, DATABASE_PORT, etc.\n\n// Using config in effects\nconst program = Effect.gen(function* () {\n  const p = yield* Config.number(\"PORT\")\n  const key = yield* Config.redacted(\"API_KEY\")\n  return { port: p, apiKey: Redacted.value(key) }\n})\n\n// Custom config provider (e.g., from object instead of env)\nconst customProvider = ConfigProvider.fromMap(\n  new Map([[\"PORT\", \"3000\"], [\"API_KEY\", \"secret\"]])\n)\nconst withCustomConfig = Effect.provide(\n  program,\n  Layer.setConfigProvider(customProvider)\n)\n\n// Config validation and transformation\nconst validPort = Config.number(\"PORT\").pipe(\n  Config.validate({\n    message: \"Port must be between 1 and 65535\",\n    validation: (n) => n >= 1 && n <= 65535,\n  })\n)\n```\n\n### Array Operations\n\n```typescript\nimport { Array as Arr, Order } from \"effect\"\n\n// Sorting with built-in orderings (accepts any Iterable)\nArr.sort([3, 1, 2], Order.number)              // [1, 2, 3]\nArr.sort([\"b\", \"a\", \"c\"], Order.string)        // [\"a\", \"b\", \"c\"]\nArr.sort(new Set([3n, 1n, 2n]), Order.bigint)  // [1n, 2n, 3n]\n\n// Sort by derived value\nArr.sortWith(users, (u) => u.age, Order.number)\n\n// Sort by multiple criteria\nArr.sortBy(\n  users,\n  Order.mapInput(Order.number, (u: User) => u.age),\n  Order.mapInput(Order.string, (u: User) => u.name)\n)\n\n// Built-in orderings: Order.string, Order.number, Order.bigint, Order.boolean, Order.Date\n// Reverse ordering: Order.reverse(Order.number)\n```\n\n### Utility Functions\n\n```typescript\nimport { constVoid as noop } from \"effect/Function\"\n\n// constVoid returns undefined, useful as a no-operation callback\nnoop()  // undefined\n\n// Common use cases:\nEffect.tap(effect, noop)              // Ignore value, just run effect\nPromise.catch(noop)                   // Swallow errors\neventEmitter.on(\"event\", noop)        // Register empty handler\n```\n\n### Deprecations\n\n- **`BigDecimal.fromNumber`** — Use `BigDecimal.unsafeFromNumber` instead (3.11.0+)\n- **`Schema.annotations()`** — Now removes previously set identifier annotations; identifiers are tied to the schema's\n  `ast` reference only (3.17.10)\n\n## Additional Resources\n\n### Local Effect Resources\n\n- **`~/.effect/packages/effect/src/`** — Core Effect modules and implementation\n\n### External Resources\n\n- **Effect-Atom** — https://github.com/tim-smart/effect-atom (open in browser for reactive state management patterns)\n\n### Reference Files\n\n- **`./references/critical-rules.md`** — Forbidden patterns and mandatory conventions\n- **`./references/effect-atom.md`** — Effect-Atom reactive state management for React\n- **`./references/next-js.md`** — Effect + Next.js 15+ App Router integration patterns\n- **`./references/option-null.md`** — Option vs null boundary patterns\n- **`./references/streams.md`** — Stream patterns and backpressure gotchas\n- **`./references/testing.md`** — Vitest deterministic testing patterns","tags":["effect","agent","skills","paulrberg","agent-skills","ai-agents"],"capabilities":["skill","source-paulrberg","skill-effect-ts","topic-agent-skills","topic-ai-agents"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/PaulRBerg/agent-skills/effect-ts","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add PaulRBerg/agent-skills","source_repo":"https://github.com/PaulRBerg/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.475","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 50 github stars · SKILL.md body (16,887 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T00:56:18.303Z","embedding":null,"createdAt":"2026-04-18T22:17:44.015Z","updatedAt":"2026-04-22T00:56:18.303Z","lastSeenAt":"2026-04-22T00:56:18.303Z","tsv":"'/.effect':78,97 '/.effect/packages/effect/src':188,1789 '/effect-ts/effect.git':96 '/references/critical-rules.md':478,575,1813 '/references/effect-atom.md':1819 '/references/next-js.md':1828 '/references/option-null.md':655,1836 '/references/streams.md':662,1842 '/references/testing.md':1848 '/tim-smart/effect-atom':1802 '1':139,359,1055,1302,1347,1626,1632,1656,1659 '100':1310,1312,1339 '15':1831 '1n':1674,1677 '2':170,374,1076,1657,1660 '2048':1156 '2n':1675,1678 '3':388,1145,1655,1661 '3.11.0':1149,1765 '3.16.0':1128 '3.17.10':1783 '3.18.0':1168 '30':1306 '3000':1601 '30000':1308 '300000':1300 '3n':1673,1679 '4':400,1165 '5':1298,1318 '60000':1304 '65535':1628,1634 'accept':1277,1651 'accessor':1104,1110 'accomplish':107 'acquir':1259 'action':1274 'ad':263 'addit':1784 'agent':122,295 'alert':895 'also':31,1331 'alt':858 'alway':202 'annot':1772 'anywher':1283 'api':284,1408,1525,1578,1602 'apikey':1523,1533,1583 'app':1832 'appli':441,520 'approach':290,315,327 'appropri':514,680,866 'aren':591,637 'arr':1641 'arr.sort':1654,1662,1670 'arr.sortby':1693 'arr.sortwith':1684 'array':1635,1639 'ask':12 'assert':596,893 'ast':1780 'async':1379 'atom':1438,1799,1822 'auto':1107,1117 'auto-gener':1106,1116 'automat':564,1223 'avoid':594,1315 'b':1011,1025,1210,1663,1668 'background':1467 'backoff':1343 'backpressur':657,1846 'base':223 'baseurl':1136 'bash':91 'basic':1498 'behavior':179 'best':113 'better':567,1252 'bigdecimal.fromnumber':1761 'bigdecimal.unsafefromnumber':1763 'block':434 'boundari':653,909,916,1840 'bracket':1262 'branch':955 'browser':1805 'bug':892 'built':1648,1706 'built-in':1647,1705 'bundl':1080 'busi':883 'c':1013,1028,1665,1669 'call':1249 'callback':1736 'cancel':633,874,899,932,949 'canon':304,424 'captur':1248 'case':685,1000,1741 'catch':258,586,928 'catchtag':1004,1008,1010,1012 'categor':863 'categori':868 'caus':617,925 'chain':527,748,1005 'chang':762,1433 'check':61,351,393 'class':812,1062,1081,1129,1150 'cleaner':1034 'cleanup':234,901,1271,1273 'clever':311 'clone':87,93 'code':26,75,173,241,255,358,408,448,533,539,551,580 'codebas':140,158,318,340,421,437,701 'collect':778 'combin':1355 'common':608,1323,1739 'compil':997 'complet':1480 'complex':133,175,208,218,252,511,961 'compon':1460 'compos':56,495,505,509,742 'composit':23 'concept':673 'concurr':293,768,1461,1484 'concurrent/parallel':235 'condit':962 'config':1135,1491,1499,1562,1587,1611 'config.all':1543 'config.baseurl':1142 'config.nested':1554 'config.number':1503,1548,1572,1617 'config.redacted':1524,1577 'config.string':1509,1545,1551 'config.validate':1620 'config.withdefault':1515 'configprovid':1492 'configprovider.frommap':1597 'configur':769,1486,1538 'configuredapi':1130,1133 'connect':993 'consist':162,321,698 'const':917,976,1037,1068,1089,1205,1209,1231,1238,1440,1501,1507,1522,1529,1541,1565,1569,1574,1595,1605,1615 'constructor':515 'constvoid':1722,1727 'consum':1173 'contain':190 'context.readonlytag':1166,1186 'context.reference':1146,1153 'context.tag':494,1056,1065 'control':475 'convent':392,1818 'convert':852 'core':192,443,1790 'covari':1167,1198 'cover':32,51,690 'creat':708,718,1246,1412 'criteria':1692 'critic':240,570 'current':148,1419,1452 'custom':271,1586 'customprovid':1596,1610 'data.taggederror':810,815 'databas':283,1092,1241,1555,1556,1558 'database.default':1100 'day':1329 'db':1090,1239 'db.query':1095,1244 'dbconfig':1542 'default':954,1078,1114,1147,1161,1514 'defaultvalu':1155 'defect':891,921,926 'deferred.make':1373 'defin':397,461,491,806 'deni':875 'dep':1122 'depend':54,209,266,482,485,504,1099,1103 'deprec':1760 'deriv':1682 'describ':1038 'descript':462 'detail':182 'determinist':1850 'differ':942 'direct':819 'discoveri':342 'document':693 'domain':880,989 'done':1047 'durat':1275,1281 'duration.minutes':1317 'duration.tomillis':1297,1301,1305,1309,1316 'durationinput':1285 'e':987,1183,1190,1374 'e.g':1589 'e.message':988 'e1':785,797 'e2':786,798 'e3':787,799 'effect':2,15,30,33,39,49,66,72,101,126,153,171,185,193,232,261,337,350,362,369,407,416,428,439,447,452,507,526,542,557,579,589,671,709,720,743,746,749,751,757,760,765,767,777,837,845,851,857,860,920,935,946,967,1016,1073,1086,1112,1134,1265,1269,1276,1337,1345,1395,1437,1464,1483,1493,1497,1564,1644,1743,1749,1787,1791,1798,1821,1829 'effect-atom':1436,1797,1820 'effect-rel':65 'effect-t':1,14,38,71,100,336,670 'effect.acquireuserelease':1258 'effect.addfinalizer':1270 'effect.all':764,784,1482 'effect.catchall':472,844,1015 'effect.catchalldefect':919 'effect.catchtag':471,836,934 'effect.effect':1188 'effect.fail':470,517,716,824,922,1217 'effect.flatmap':530,745 'effect.fn':562,1222,1233 'effect.foreach':770 'effect.fork':1463 'effect.gen':547,588,827,1087,1203,1567 'effect.log':947 'effect.map':531,750 'effect.oninterrupt':945 'effect.orelse':856 'effect.partition':796 'effect.pipe':1007 'effect.provide':501,1072,1111,1607 'effect.race':1475 'effect.repeat':1344 'effect.result':850 'effect.retry':1336 'effect.scoped':1264 'effect.service':1077,1084,1125,1132 'effect.succeed':516,711,937,1138 'effect.sync':734 'effect.tap':532,756,1742 'effect.try':519,728 'effect.trypromise':518,721 'effect/function':1726 'effect1':1476 'effect2':1477 'effecta':1208 'effectb':1212 'effecthandl':1180 'empti':1758 'encount':687 'env':1594 'environ':1487 'error':20,52,177,211,215,219,272,277,390,395,449,455,463,467,474,604,639,640,643,717,780,803,808,822,842,849,861,864,881,914,975,990,998,1017,1019,1214,1753 'error-taxonomi':642 'especi':128,244 'etc':1560 'event':1755 'eventemitter.on':1754 'examin':143,183,401 'exampl':431,869 'except':460,906 'exhaust':971 'exist':76,155,166,276,317,324,353,372,418,700,705,1392 'exit':854,877 'expect':871,983,1287 'expert':41,42 'explain':663,668 'explicit':607,1458 'extend':275,814,1064,1083,1131,1152 'extern':281,1795 'fail':719,994 'failur':590,609,635,792,801,944 'fallback':859 'fetch':1139 'fetchus':1232,1234 'fiber':898,1468,1470,1473 'fiber.join':1469 'file':366,1812 'find':303,332,378 'findal':1094 'first':142,783,1478 'flow':476 'fn':722,729,735,747,752,758,772,839,846 'focus':301 'follow':159 'forbidden':480,1814 'form':1295 'frequent':616 'function':45,626,727,733,741,828,1088,1171,1179,1204,1230,1235,1404,1568,1719 'generat':1108,1118,1200 'git':92 'github.com':95,1801 'github.com/effect-ts/effect.git':94 'github.com/tim-smart/effect-atom':1800 'gotcha':1847 'grace':876 'guidanc':43 'guidelin':582 'handl':21,53,212,391,450,795,804,840,847,867,870,940,1456 'handlea':1023 'handleb':1026 'handlec':1029 'handleerror':977 'handler':1192,1759 'hang':660 'hierarchi':220,278 'high':132,200 'hook':1447 'host':1508,1510,1544,1546,1557 'hour':1328 'human':1279 'human-read':1278 'id':1236,1245 'identifi':375,1771,1773 'idiomat':335 'if/else':1036 'ignor':1745 'immedi':82 'imper':254 'implement':151,181,204,356,484,552,1057,1079,1794 'import':28,363,367,964,1490,1638,1721 'improv':695 'ineffect':583 'infinit':658 'inform':84 'initi':931,1411 'initialvalu':1361 'inject':55,210,483,486,503 'instead':457,1592,1764 'integr':35,279,1435,1834 'intern':574,650 'interrupt':636,897,941 'investig':297,896 'issu':618 'item':771,775 'iter':1653 'key':581,1526,1575,1579,1585,1603 'layer':19,206,270,382,490,496,1052,1061,1115,1158,1494 'layer.merge':498 'layer.provide':499 'layer.setconfigprovider':1609 'layer.succeed':1070 'leverag':506,541 'librari':50 'lifetim':1267 'link':612 'load':1044 'local':1786 'localhost':1516 'log':894,1521 'logic':194 'look':364,404 'maintain':307,697 'make':605 'manag':229,523,1256,1358,1809,1825 'mandatori':1817 'mani':104 'map':773,1599 'mask':1519 'match':951,952,965,972,1031 'match.exhaustive':996,1030 'match.orelse':1048 'match.tag':980,985,991,1021,1024,1027 'match.type':978 'match.value':1018,1039 'match.when':1042,1045 'may':902,1390 'medium':248 'messag':1621 'method':1109 'micro':1333 'milli':1311,1325,1340 'minut':1299,1303,1327 'mismatch':621 'miss':80,436,1001 'mode':610,788 'moder':130 'modifi':1176 'modul':196,953,1792 'multipl':214,292,298,326,1691 'must':1623 'mutabl':1362 'myerror':1219 'myservic':1063,1066,1067,1071 'myservicel':1069,1074 'n':1630,1631,1633 'name':1229,1550,1552 'nano':1332 'need':826,1536 'nest':1003,1537 'networkerror':992 'never':1386 'never/any/unknown':598 'new':264,357,833,923,1218,1598,1671 'next.js':34,1830 'no-oper':1733 'non':739 'non-throw':738 'noop':1724,1737,1744,1751,1756 'normal':907,912 'note':389 'notifi':1426 'null':647,651,938,982,1445,1446,1455,1457,1839 'number':1506 'object':1591 'one':1377 'one-tim':1376 'open':1803 'oper':224,236,512,528,948,1636,1735 'optim':312 'option':645,649,1101,1512,1837 'option-null.md':654 'order':138,1642,1650,1708,1715 'order.bigint':1676,1711 'order.boolean':1712 'order.date':1713 'order.mapinput':1695,1700 'order.number':1658,1688,1696,1710,1717 'order.reverse':1716 'order.string':1666,1701,1709 'p':1570,1582 'paramet':1127 'parti':287 'partial':793 'path':1140,1143 'pattern':17,59,127,141,145,154,165,227,243,262,300,319,323,341,354,377,403,417,425,438,481,555,602,614,688,702,911,927,939,950,1054,1075,1144,1164,1201,1263,1439,1810,1815,1835,1841,1844,1852 'pend':1043 'perform':239 'performance-crit':238 'pipe':979,1020,1041,1511,1553,1619 'plural':1294 'port':1502,1504,1547,1549,1559,1573,1581,1600,1618,1622 'posit':1199 'possibl':329 'practic':114 'prb/effect-next':37 'prefer':561,811,1227,1291 'prefix':1540 'prerequisit':60 'previous':1769 'principl':440,444 'prioriti':137,201,249 'proactiv':111 'proceed':90,422 'program':46,1566,1608 'project':149,347,387,413 'promis':259,725 'promise-return':724 'promise.catch':1750 'propag':399,468 'proper':466,521,553 'provid':666,1058,1123,1251,1588 'qualiti':534 'quick':611,627,706 'r':1184,1191 'rather':309 're':679 'react':1434,1827 'reactiv':226,631,1382,1413,1807,1823 'read':572,1366,1418,1448 'readabl':305,549,1280 'recommend':599 'redact':1495,1528 'redacted.value':1531,1584 'ref':1365,1369,1417,1422,1429,1441,1450 'ref.get':1364 'ref.make':1360 'ref.set':1368 'refactor':253 'refer':628,632,707,1363,1383,1414,1781,1811 'regist':1272,1757 'reject':872,984 'relat':67,299 'releas':1261 'remov':1768 'repeat':1349 'replac':1002 'requir':1159,1505 'research':98,112,121,135,199,203,250,289,330 'resourc':228,522,1255,1785,1788,1796 'restructur':268 'result':1221,1320,1474 'retri':879,890,903,1341 'retryabl':995 'return':600,726,790,800,831,1093,1215,1220,1242,1451,1527,1580,1728 'revers':1714 'router':1833 'rule':571,884 'run':766,1465,1748 's1':1353 's2':1354 'safe':538,970,1407,1415 'safeboundari':918 'scenario':247 'schedul':1334,1351,1356 'schedule.compose':1352 'schedule.exponential':1338 'schedule.fixed':1346 'schema':1778 'schema.annotations':1766 'scope':231,525,1266 'search':360 'second':1307,1326,1348 'secret':1530,1604 'see':477,1399 'select':1096 'sensit':1517 'separ':933,1059,1124 'sequenti':550 'servic':18,22,205,265,269,288,376,380,488,492,1050,1102,1174,1185,1195 'set':1672,1770 'show':885 'side':759 'similar':144 'singular':1292 'site':1250 'skill':5 'skill-effect-ts' 'skip':167 'solut':308,339,664,667 'sort':1645,1680,1689 'sourc':74,136,172,186,429 'source-paulrberg' 'span':1247 'spawn':120,291 'specialnumb':1151,1154 'specif':683,841 'stack':568,1253 'start':63 'state':1357,1808,1824 'status':1040 'step':169 'stop':81 'strategi':99 'stream':222,656,659,1430,1843 'stream-bas':221 'streams.md':661 'string':818,1137,1141,1237,1282,1289 'structur':384 'subscrib':1427 'subscriptionref':619,630,1381 'subscriptionref-reactive-refer':629 'subscriptionref.changes':1428 'subscriptionref.get':1416 'subscriptionref.make':1410,1443 'subscriptionref.set':1421 'success':714,754,794,802,1046 'suffic':1163 'suggest':314,694 'swallow':1752 'synchron':731,737 'syntax':1290,1314 'system':282,456,545 'tag':838,843,958,974,1148 'task':110,117,134,294 'taxonomi':641,644,862 'telemetri':565,1226 'termin':606 'test':58,242,246,402,410,554,559,1851 'third':286 'third-parti':285 'throw':459,732,740 'thrown':593,905 'tie':1775 'time':1378 'timeout':900 'tool':118,956 'topic-agent-skills' 'topic-ai-agents' 'trace':569,1224,1254 'transform':753,1614 'tri':257,585 'true':1105 'try-catch':256,584 'ts':3,16,40,73,102,338,672 'type':176,216,273,454,464,537,544,595,807,969,1178 'type-saf':536,968 'typescript':710,744,805,910,963,1053,1202,1257,1288,1335,1359,1384,1462,1489,1637,1720 'u':1686,1697,1702 'u.age':1687,1699 'u.name':1704 'unbound':1485 'unclear':178 'undefin':1729,1738 'understand':371 'unfamiliar':245 'union':959 'unit':1324 'unknown':913,1049 'unknown/foreign':904 'unknownerror':924 'unsafemak':622,1388,1400 'unwrap':1534 'updat':1424 'usag':373 'use':8,115,349,423,451,469,487,500,513,546,556,648,675,684,1119,1169,1194,1260,1387,1405,1561,1730,1740,1762 'user':11,86,830,873,887,930,1098,1444,1685,1694,1698,1703 'user-initi':929 'usercancellederror':936,981 'userid':817,835 'usernotfounderror':813,816,834 'userrepo':1082,1085 'userrepo.default':1113 'userrepo.defaultwithoutdependencies':1120 'usesubscriptionref':1449 'util':560,1718 'valid':789,882,1612,1629 'validationerror':986 'validport':1616 'valu':712,715,755,763,855,1033,1162,1367,1370,1372,1380,1420,1423,1425,1432,1453,1500,1518,1683,1746 'variabl':1488 'verbos':1313,1322 'verifi':69,313 'version':620,1396 'via':1060 'vitest':1849 'vs':634,646,1838 'wait':1471 'warn':1385 'way':105 'week':1330 'win':1481 'withcustomconfig':1606 'without':761,1175 'work':68,124,344,1296 'wrap':713,723,730,736 'wrapper':825 'write':446,535,577,1371 'writing/refactoring':25 'yield':601,820,832,1091,1207,1211,1216,1240,1243,1442,1532,1571,1576","prices":[{"id":"71c3a0bc-733e-4cc1-82d7-73daa312cf5b","listingId":"65387b1b-b604-41a0-a7a5-f1a416a7e27e","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"PaulRBerg","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T22:17:44.015Z"}],"sources":[{"listingId":"65387b1b-b604-41a0-a7a5-f1a416a7e27e","source":"github","sourceId":"PaulRBerg/agent-skills/effect-ts","sourceUrl":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/effect-ts","isPrimary":false,"firstSeenAt":"2026-04-18T22:17:44.015Z","lastSeenAt":"2026-04-22T00:56:18.303Z"}],"details":{"listingId":"65387b1b-b604-41a0-a7a5-f1a416a7e27e","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"PaulRBerg","slug":"effect-ts","github":{"repo":"PaulRBerg/agent-skills","stars":50,"topics":["agent-skills","ai-agents"],"license":"mit","html_url":"https://github.com/PaulRBerg/agent-skills","pushed_at":"2026-04-20T16:22:56Z","description":"PRB's collection of agent skills","skill_md_sha":"4cd52027cd32d8c77d5f694f07b6b545aec315d0","skill_md_path":"skills/effect-ts/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/PaulRBerg/agent-skills/tree/main/skills/effect-ts"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"effect-ts","description":"This skill should be used when the user asks about Effect-TS patterns, services, layers, error handling, service composition, or writing/refactoring code that imports from 'effect'. Also covers Effect + Next.js integration with @prb/effect-next."},"skills_sh_url":"https://skills.sh/PaulRBerg/agent-skills/effect-ts"},"updatedAt":"2026-04-22T00:56:18.303Z"}}