[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71H6498M3S2HE1RFACWS1TC":3,"skill-same:01M71H6498M3S2HE1RFACWS1TC":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":25,"linkOnly":26,"markdownContent":27,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":13,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M71H6498M3S2HE1RFACWS1TC","05-concurrency",null,"Effect-TS 4 concurrency — Effect.all, Effect.forEach, fibers, Ref, and structured concurrency patterns","lambda-solver\u002Flambdabench-pro","lambda-solver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F279071046?v=4","01M71H55W2WK3PM6RRAY9JZWAJ","01M71H55WRT9XAFDAVACTCC2XP",0,"MIT","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Feffect-ts\u002Fcore\u002F05-concurrency\u002FSKILL.md",[],[18,19,20,21,22,23,24],"concurrency","05 concurrency","effect","opencode","concurrency patterns","patterns","structured","2026-11-10 10:12:30",false,"---\nname: 05-concurrency\ndescription: Effect-TS 4 concurrency — Effect.all, Effect.forEach, fibers, Ref, and structured concurrency patterns\nlicense: MIT\ncompatibility: opencode\n---\n\n# Concurrency\n\n## Effect.all — run multiple effects\n\n```typescript\nimport { Effect } from \"effect\";\n\n\u002F\u002F Sequential (default)\nconst [a, b] = yield * Effect.all([effectA, effectB]);\n\n\u002F\u002F Concurrent — bounded\nconst [a, b] = yield * Effect.all([effectA, effectB], { concurrency: 2 });\n\n\u002F\u002F Concurrent — unbounded\nconst results = yield * Effect.all(effects, { concurrency: \"unbounded\" });\n\n\u002F\u002F Discard results — only side effects matter\nyield * Effect.all(effects, { concurrency: 4, discard: true });\n```\n\n## Effect.forEach — map an array effectfully\n\n```typescript\n\u002F\u002F Concurrent processing of a list\nconst results = yield * Effect.forEach(items, (item) => processItem(item), { concurrency: 8 });\n```\n\n## Ref — shared mutable state inside Effect\n\n```typescript\nimport { Effect, Ref } from \"effect\";\n\nconst counter = yield * Ref.make(0);\nyield * Ref.update(counter, (n) => n + 1);\nconst value = yield * Ref.get(counter);\nconst old = yield * Ref.getAndUpdate(counter, (n) => n + 1);\n```\n\n## Fibers — structured fork\u002Fjoin\n\n```typescript\n\u002F\u002F Fork and forget\nyield * Effect.fork(backgroundTask);\n\n\u002F\u002F Fork and join later\nconst fiber = yield * Effect.fork(longTask);\nconst result = yield * Fiber.join(fiber);\n\n\u002F\u002F Fork scoped — interrupted when scope closes\nyield *\n  Effect.forkScoped(\n    Effect.gen(function* () {\n      while (true) {\n        yield* Effect.sleep(\"5 seconds\");\n        yield* Effect.log(\"tick\");\n      }\n    }),\n  );\n```\n\n## Effect.race — first one wins\n\n```typescript\n\u002F\u002F Returns whichever Effect finishes first; interrupts the other\nconst result = yield * Effect.race(fastPath, slowPath);\n\n\u002F\u002F With timeout\nconst result = yield * Effect.timeout(program, \"30 seconds\");\n```\n\n## Semaphore — bounded concurrency gate\n\n```typescript\nimport { Effect } from \"effect\";\n\nconst sem = yield * Effect.makeSemaphore(3); \u002F\u002F max 3 concurrent\nyield * sem.withPermits(1)(expensiveTask);\n```\n\n## PubSub — broadcast events\n\n```typescript\nimport { PubSub, Stream } from \"effect\";\n\nconst pubsub = yield * PubSub.bounded\u003CEvent>({ capacity: 256 });\nyield * Effect.addFinalizer(() => PubSub.shutdown(pubsub));\n\nyield * PubSub.publish(pubsub, event);\nconst stream = Stream.fromPubSub(pubsub);\n```\n\n## Scheduling — retry and polling\n\n```typescript\nimport { Schedule } from \"effect\";\n\n\u002F\u002F Retry with exponential backoff, max 3 times\nprogram.pipe(Effect.retry(Schedule.exponential(\"100 millis\").pipe(Schedule.upTo(3))));\n\n\u002F\u002F Repeat on a fixed interval\nprogram.pipe(Effect.repeat(Schedule.spaced(\"30 seconds\")));\n```\n\n## Tail recursion — use Effect.suspend\n\n`Effect.iterate` does NOT exist in Effect 4. Use `Effect.suspend` for\nrecursive effectful loops to avoid stack overflow.\n\n```typescript\nconst loop = (n: number): Effect.Effect\u003Cnumber> =>\n  n \u003C= 0 ? Effect.succeed(0) : Effect.suspend(() => loop(n - 1).pipe(Effect.map((x) => x + 1)));\n```\n","# Concurrency\n\n## Effect.all — run multiple effects\n\n```typescript\nimport { Effect } from \"effect\";\n\n\u002F\u002F Sequential (default)\nconst [a, b] = yield * Effect.all([effectA, effectB]);\n\n\u002F\u002F Concurrent — bounded\nconst [a, b] = yield * Effect.all([effectA, effectB], { concurrency: 2 });\n\n\u002F\u002F Concurrent — unbounded\nconst results = yield * Effect.all(effects, { concurrency: \"unbounded\" });\n\n\u002F\u002F Discard results — only side effects matter\nyield * Effect.all(effects, { concurrency: 4, discard: true });\n```\n\n## Effect.forEach — map an array effectfully\n\n```typescript\n\u002F\u002F Concurrent processing of a list\nconst results = yield * Effect.forEach(items, (item) => processItem(item), { concurrency: 8 });\n```\n\n## Ref — shared mutable state inside Effect\n\n```typescript\nimport { Effect, Ref } from \"effect\";\n\nconst counter = yield * Ref.make(0);\nyield * Ref.update(counter, (n) => n + 1);\nconst value = yield * Ref.get(counter);\nconst old = yield * Ref.getAndUpdate(counter, (n) => n + 1);\n```\n\n## Fibers — structured fork\u002Fjoin\n\n```typescript\n\u002F\u002F Fork and forget\nyield * Effect.fork(backgroundTask);\n\n\u002F\u002F Fork and join later\nconst fiber = yield * Effect.fork(longTask);\nconst result = yield * Fiber.join(fiber);\n\n\u002F\u002F Fork scoped — interrupted when scope closes\nyield *\n  Effect.forkScoped(\n    Effect.gen(function* () {\n      while (true) {\n        yield* Effect.sleep(\"5 seconds\");\n        yield* Effect.log(\"tick\");\n      }\n    }),\n  );\n```\n\n## Effect.race — first one wins\n\n```typescript\n\u002F\u002F Returns whichever Effect finishes first; interrupts the other\nconst result = yield * Effect.race(fastPath, slowPath);\n\n\u002F\u002F With timeout\nconst result = yield * Effect.timeout(program, \"30 seconds\");\n```\n\n## Semaphore — bounded concurrency gate\n\n```typescript\nimport { Effect } from \"effect\";\n\nconst sem = yield * Effect.makeSemaphore(3); \u002F\u002F max 3 concurrent\nyield * sem.withPermits(1)(expensiveTask);\n```\n\n## PubSub — broadcast events\n\n```typescript\nimport { PubSub, Stream } from \"effect\";\n\nconst pubsub = yield * PubSub.bounded\u003CEvent>({ capacity: 256 });\nyield * Effect.addFinalizer(() => PubSub.shutdown(pubsub));\n\nyield * PubSub.publish(pubsub, event);\nconst stream = Stream.fromPubSub(pubsub);\n```\n\n## Scheduling — retry and polling\n\n```typescript\nimport { Schedule } from \"effect\";\n\n\u002F\u002F Retry with exponential backoff, max 3 times\nprogram.pipe(Effect.retry(Schedule.exponential(\"100 millis\").pipe(Schedule.upTo(3))));\n\n\u002F\u002F Repeat on a fixed interval\nprogram.pipe(Effect.repeat(Schedule.spaced(\"30 seconds\")));\n```\n\n## Tail recursion — use Effect.suspend\n\n`Effect.iterate` does NOT exist in Effect 4. Use `Effect.suspend` for\nrecursive effectful loops to avoid stack overflow.\n\n```typescript\nconst loop = (n: number): Effect.Effect\u003Cnumber> =>\n  n \u003C= 0 ? Effect.succeed(0) : Effect.suspend(() => loop(n - 1).pipe(Effect.map((x) => x + 1)));\n```\n",{"name":5,"license":14,"description":7,"compatibility":21},"main","816c073aaf171300af3605b06f7ec5aa7370ef0b",".opencode\u002Fskills\u002Feffect-ts\u002Fcore\u002F05-concurrency","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro","https:\u002F\u002Fgithub.com\u002Flambda-solver","2026-05-31 17:08:46",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lambda-solver\u002Flambdabench-pro --skill 05-concurrency",{"tool":42,"command":43},"bunx","bunx skills add lambda-solver\u002Flambdabench-pro --skill 05-concurrency",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lambda-solver\u002Flambdabench-pro --skill 05-concurrency","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002F.opencode\u002Fskills\u002Feffect-ts\u002Fcore\u002F05-concurrency\u002FSKILL.md",true,[],[51,82,103,122,143,161],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":62,"publishedAt":25},"01M71H9FNA5D6Y4ANXD18Z1Z3X","tmux-workflow","Development workflow with tmux — run dev servers, Storybook, and background processes in persistent sessions with live logs, while keeping OpenCode free for chat","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Ftmux\u002FSKILL.md",[57],{"categoryNo":58,"categoryName":59,"taxonomyType":60,"taxonomyTypeDesc":61},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[63,64,65,66,67,68,69,70,71,72,73,21,74,75,76,77,78,79,80,81],"tmux","workflow","tmux workflow","chat","dev servers","background","processes","storybook","live","servers","run","with","logs","development workflow","free","dev","sessions","for","development",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":91,"publishedAt":25},"01M71H9DQJDAJVZX37NDN99D3P","04-anti-patterns","React anti-patterns to avoid — manual JSX repetition, useEffect misuse, reference instability, prop drilling, conditional hooks, and common performance traps","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F04-anti-patterns\u002FSKILL.md",[88],{"categoryNo":89,"categoryName":90,"taxonomyType":60,"taxonomyTypeDesc":61},"01JBSEEDCAT000000000000009","前端开发",[23,92,93,94,95,96,97,98,99,100,101,21,102],"anti patterns","04 anti patterns","common","jsx","reference","conditional","hooks","manual","performance","anti-patterns","react",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":110,"publishedAt":25},"01M71H9BXF511W2R3B73S5P9ZN","03-state-management","React state management patterns — lifting state, colocation, URL state, server state with TanStack Query, local state with useState\u002FuseReducer","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F03-state-management\u002FSKILL.md",[109],{"categoryNo":89,"categoryName":90,"taxonomyType":60,"taxonomyTypeDesc":61},[111,112,113,114,102,115,23,116,117,118,119,21,120,74,121],"management","state management","state","03 state management","query","URL","tanstack","react state management","local","server","tanstack query",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":129,"publishedAt":25},"01M71H9AAGVWMYQ4NG82QPYCTE","02-component-composition","React component composition patterns — render props, compound components, list rendering with map, slot patterns, and layout primitives","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F02-component-composition\u002FSKILL.md",[128],{"categoryNo":89,"categoryName":90,"taxonomyType":60,"taxonomyTypeDesc":61},[130,131,132,21,74,133,134,102,135,23,136,137,138,139,140,141,142],"02 component composition","component","Composition","compound","components","primitives","composition patterns","list","map","rendering","render","react component","layout",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":150,"publishedAt":25},"01M71H98RDXRQZDR496SRD906M","01-fp-style","React functional programming style — pure components, hooks conventions, Effect Atom integration, and Tailwind patterns","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fpatterns\u002F01-fp-style\u002FSKILL.md",[149],{"categoryNo":89,"categoryName":90,"taxonomyType":60,"taxonomyTypeDesc":61},[151,152,153,23,154,155,21,156,102,157,134,98,158,159,160,20],"01 fp style","style","atom","conventions","integration","functional","programming","Tailwind","tailwind patterns","functional programming",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":168,"publishedAt":25},"01M71H95PYGAWBS5C8KN0C4WGT","react-animation","React animation with react\u002Fmotion (Framer Motion) — declarative animations, gestures, layout animations, and performance best practices","https:\u002F\u002Fgithub.com\u002Flambda-solver\u002Flambdabench-pro\u002Fblob\u002Fmain\u002Freference\u002Fghui\u002F.opencode\u002Fskills\u002Freact\u002Fanimation\u002FSKILL.md",[167],{"categoryNo":89,"categoryName":90,"taxonomyType":60,"taxonomyTypeDesc":61},[102,169,170,100,171,21,142,172,173,74,174,175,176,177],"react animation","Animation","framer motion","motion","best practices","framer","gestures","animations","declarative"]