[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EEWPHN8SQ11EQVAXSWDZFT":3,"skill-same:01M6EEWPHN8SQ11EQVAXSWDZFT":119},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M6EEWPHN8SQ11EQVAXSWDZFT","effect-ts",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Feffect-ts\u002FSKILL.md",[],[18,19],"effect","effect ts","2026-11-10 10:12:30",false,"# Effect-TS\n\n## Overview\n\nEffect is a TypeScript library that makes errors, dependencies, and async operations explicit in the type system. Instead of `try-catch` with `unknown` errors, every function declares exactly what can go wrong. Instead of global imports, every dependency is tracked in the type. The result: code that's easier to test, refactor, and reason about.\n\n## When to Use\n\n- Business logic where knowing every possible error matters (payments, auth, data pipelines)\n- Applications with complex dependency graphs that need testability\n- Concurrent operations that need structured concurrency (not just Promise.all)\n- Data validation and transformation pipelines\n- Replacing error-prone try-catch chains with typed error handling\n\n## Instructions\n\n### Core Concept: Effect\u003CSuccess, Error, Requirements>\n\nEvery Effect value has three type parameters:\n- **Success**: what it returns when it works\n- **Error**: what errors it can produce\n- **Requirements**: what services\u002Fdependencies it needs\n\n```typescript\n\u002F\u002F core.ts — Effect basics: typed errors and pipe\nimport { Effect, pipe } from \"effect\";\n\n\u002F\u002F Define typed errors (not just Error\u002Fstring)\nclass UserNotFound {\n  readonly _tag = \"UserNotFound\";\n  constructor(readonly userId: string) {}\n}\n\nclass DatabaseError {\n  readonly _tag = \"DatabaseError\";\n  constructor(readonly cause: unknown) {}\n}\n\n\u002F\u002F Function that can fail with typed errors\n\u002F\u002F           Success ───┐  Error ──────────────────────────┐  Requirements ─┐\n\u002F\u002F                      ▼                                   ▼                ▼\nconst getUser = (id: string): Effect.Effect\u003CUser, UserNotFound | DatabaseError, never> =>\n  pipe(\n    Effect.tryPromise({\n      try: () => db.user.findUnique({ where: { id } }),\n      catch: (e) => new DatabaseError(e),\n    }),\n    Effect.flatMap((user) =>\n      user ? Effect.succeed(user) : Effect.fail(new UserNotFound(id))\n    )\n  );\n\n\u002F\u002F Handle specific errors\nconst getUserOrDefault = (id: string) =>\n  pipe(\n    getUser(id),\n    Effect.catchTag(\"UserNotFound\", () =>\n      Effect.succeed({ id: \"default\", name: \"Guest\", email: \"guest@example.com\" })\n    )\n    \u002F\u002F DatabaseError is NOT caught — it propagates up in the type\n  );\n```\n\n### Dependency Injection with Layers\n\n```typescript\n\u002F\u002F services.ts — Dependency injection without classes\nimport { Effect, Context, Layer } from \"effect\";\n\n\u002F\u002F Define a service interface\nclass UserRepo extends Context.Tag(\"UserRepo\")\u003C\n  UserRepo,\n  {\n    findById: (id: string) => Effect.Effect\u003CUser | null, DatabaseError>;\n    create: (data: NewUser) => Effect.Effect\u003CUser, DatabaseError>;\n  }\n>() {}\n\n\u002F\u002F Business logic that REQUIRES UserRepo (tracked in type)\nconst getUser = (id: string) =>\n  pipe(\n    UserRepo,                    \u002F\u002F Access the service\n    Effect.flatMap((repo) => repo.findById(id)),\n    Effect.flatMap((user) =>\n      user ? Effect.succeed(user) : Effect.fail(new UserNotFound(id))\n    )\n  );\n\u002F\u002F   ^? Effect\u003CUser, UserNotFound | DatabaseError, UserRepo>\n\u002F\u002F                                                  ^^^^^^^^ dependency tracked!\n\n\u002F\u002F Production implementation\nconst UserRepoLive = Layer.succeed(UserRepo, {\n  findById: (id) =>\n    Effect.tryPromise({\n      try: () => prisma.user.findUnique({ where: { id } }),\n      catch: (e) => new DatabaseError(e),\n    }),\n  create: (data) =>\n    Effect.tryPromise({\n      try: () => prisma.user.create({ data }),\n      catch: (e) => new DatabaseError(e),\n    }),\n});\n\n\u002F\u002F Test implementation\nconst UserRepoTest = Layer.succeed(UserRepo, {\n  findById: (id) => Effect.succeed({ id, name: \"Test\", email: \"test@test.com\" }),\n  create: (data) => Effect.succeed({ id: \"new-id\", ...data }),\n});\n\n\u002F\u002F Run with real dependencies\nEffect.runPromise(\n  pipe(getUser(\"123\"), Effect.provide(UserRepoLive))\n);\n\n\u002F\u002F Run with test dependencies\nEffect.runPromise(\n  pipe(getUser(\"123\"), Effect.provide(UserRepoTest))\n);\n```\n\n### Concurrency and Scheduling\n\n```typescript\n\u002F\u002F concurrent.ts — Structured concurrency with Effect\nimport { Effect, Schedule, Duration } from \"effect\";\n\n\u002F\u002F Run tasks concurrently with a limit\nconst processItems = (items: string[]) =>\n  Effect.forEach(items, (item) => processItem(item), {\n    concurrency: 5,    \u002F\u002F Max 5 concurrent\n    batching: true,     \u002F\u002F Batch database calls\n  });\n\n\u002F\u002F Retry with exponential backoff\nconst resilientFetch = (url: string) =>\n  pipe(\n    Effect.tryPromise(() => fetch(url).then((r) => r.json())),\n    Effect.retry(\n      Schedule.exponential(Duration.seconds(1)).pipe(\n        Schedule.compose(Schedule.recurs(3)),  \u002F\u002F Max 3 retries\n        Schedule.jittered,                      \u002F\u002F Add random jitter\n      )\n    ),\n  );\n\n\u002F\u002F Timeout\nconst withTimeout = pipe(\n  slowOperation(),\n  Effect.timeout(Duration.seconds(5)),\n);\n\n\u002F\u002F Race — first to complete wins\nconst fastest = Effect.race(\n  fetchFromPrimary(),\n  fetchFromFallback(),\n);\n```\n\n### Schema — Runtime Validation + Type Inference\n\n```typescript\n\u002F\u002F schema.ts — Validation with Effect Schema (replaces Zod)\nimport { Schema } from \"effect\";\n\nconst User = Schema.Struct({\n  id: Schema.UUID,\n  name: Schema.String.pipe(Schema.minLength(2), Schema.maxLength(100)),\n  email: Schema.String.pipe(Schema.pattern(\u002F^[^@]+@[^@]+\\.[^@]+$\u002F)),\n  age: Schema.Number.pipe(Schema.int(), Schema.between(13, 120)),\n  role: Schema.Literal(\"user\", \"admin\"),\n  createdAt: Schema.Date,\n});\n\n\u002F\u002F Type is inferred — no duplicate definition\ntype User = Schema.Schema.Type\u003Ctypeof User>;\n\n\u002F\u002F Decode (parse + validate)\nconst parseUser = Schema.decodeUnknown(User);\nconst result = Effect.runSync(parseUser({ id: \"...\", name: \"Kai\", email: \"kai@example.com\", age: 25, role: \"user\", createdAt: new Date() }));\n```\n\n## Examples\n\n### Example 1: Build a payment processing pipeline\n\n**User prompt:** \"Build a payment flow with typed errors for each failure case — card declined, insufficient funds, fraud detected, network timeout.\"\n\nThe agent will define tagged error types for each failure, compose the payment pipeline with Effect.pipe, add retry for network errors, and propagate card\u002Ffraud errors to the caller with full type information.\n\n### Example 2: Testable service with dependency injection\n\n**User prompt:** \"I want to test my business logic without hitting the database.\"\n\nThe agent will define services as Effect Context.Tags, write business logic that depends on service interfaces, create Layer.succeed implementations for both production and test, and run the same logic against fake data in tests.\n\n## Guidelines\n\n- **Start with `Effect.tryPromise`** — wrap existing async code first, then gradually adopt more Effect patterns\n- **Tag your errors** — `readonly _tag = \"ErrorName\"` enables `catchTag` for precise error handling\n- **Layers for DI** — define service interfaces with Context.Tag, implement with Layer\n- **`pipe` everything** — Effect uses pipe-based composition; avoid nesting\n- **Don't `runPromise` inside Effects** — compose Effects together, run once at the entry point\n- **Schema over Zod** — Effect Schema integrates with the Effect ecosystem and is more composable\n- **Concurrency is explicit** — `{ concurrency: 5 }` not hidden behind promise pools\n- **Learning curve is real** — Effect is powerful but complex; introduce gradually to a team\n- **Effect is a runtime** — it manages execution; don't mix with raw Promises inside Effects\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Feffect-ts",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill effect-ts",{"tool":39,"command":40},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill effect-ts",{"tool":42,"command":43},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill effect-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Feffect-ts\u002FSKILL.md",true,[47,53,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"customize.toml","OTHER","其他",1642,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fcustomize.toml",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"steps\u002Fstep-01-init.md","REFERENCE","参考文档",5785,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-01-init.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"steps\u002Fstep-01b-continue.md",4862,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-01b-continue.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"steps\u002Fstep-02-discovery.md",6761,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-02-discovery.md",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"steps\u002Fstep-03-core-experience.md",8208,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-03-core-experience.md",{"path":72,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":73,"sourceHtmlUrl":74},"steps\u002Fstep-04-emotional-response.md",8247,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-04-emotional-response.md",{"path":76,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":77,"sourceHtmlUrl":78},"steps\u002Fstep-05-inspiration.md",8649,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-05-inspiration.md",{"path":80,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":81,"sourceHtmlUrl":82},"steps\u002Fstep-06-design-system.md",8749,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-06-design-system.md",{"path":84,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":85,"sourceHtmlUrl":86},"steps\u002Fstep-07-defining-experience.md",8751,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-07-defining-experience.md",{"path":88,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":89,"sourceHtmlUrl":90},"steps\u002Fstep-08-visual-foundation.md",8351,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-08-visual-foundation.md",{"path":92,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":93,"sourceHtmlUrl":94},"steps\u002Fstep-09-design-directions.md",8536,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-09-design-directions.md",{"path":96,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":97,"sourceHtmlUrl":98},"steps\u002Fstep-10-user-journeys.md",8367,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-10-user-journeys.md",{"path":100,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":101,"sourceHtmlUrl":102},"steps\u002Fstep-11-component-strategy.md",8660,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-11-component-strategy.md",{"path":104,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":105,"sourceHtmlUrl":106},"steps\u002Fstep-12-ux-patterns.md",7912,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-12-ux-patterns.md",{"path":108,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":109,"sourceHtmlUrl":110},"steps\u002Fstep-13-responsive-accessibility.md",9012,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-13-responsive-accessibility.md",{"path":112,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":113,"sourceHtmlUrl":114},"steps\u002Fstep-14-complete.md",7082,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fsteps\u002Fstep-14-complete.md",{"path":116,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":117,"sourceHtmlUrl":118},"ux-design-template.md",236,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fgds-create-ux-design\u002Fux-design-template.md",[120,129,138,147,153,159],{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":20},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[126,127,128],"model","model hierarchy","model hierarchy skill",{"skillNo":130,"name":131,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":20},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[135,136,137],"MCP","zoom","zoom mcp",{"skillNo":139,"name":140,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":20},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[144,145,146,136],"sdk","zoom apps sdk","apps",{"skillNo":148,"name":149,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":20},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[149],{"skillNo":154,"name":155,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":20},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[155],{"skillNo":160,"name":161,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":20},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[161]]