Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

effect-ts-v4效果 ts v4

Agent Skill

effect-ts-v4 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

210

周安装

9

GitHub Stars

公开资料未说明

下载量

73
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:effect-ts-v4(效果 ts v4)
来源仓库:https://github.com/zwarunek/effect-ts-v4
仓库路径:skills/effect-ts-v4
安装命令:
npx skills add https://github.com/zwarunek/effect-ts-v4 --skill effect-ts-v4
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/zwarunek/effect-ts-v4 --skill effect-ts-v4

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装方式:github,安装命令:npx skills add https://github.com/zwarunek/effect-ts-v4 --skill effect-ts-v4。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Effect 4.0 Reference Skill

Comprehensive reference for building applications with Effect 4.0 (TypeScript). Use this skill when writing, reviewing, or refactoring code that uses the effect package.

When to Load Docs

Use the decision tree below to determine which doc files to read. Always start with the most relevant file for the user's task. Read additional files only as needed.

Doc Files

FileTopicsRead When
docs/01-core-effect.mdEffect type, pipe/flow, Effect.gen, Result, Exit, Cause, Scope, error handlingWriting or understanding core Effect code, error handling, resource management
docs/02-services-layers.mdServiceMap.Service, Layer, Config, ConfigProvider, ManagedRuntimeDefining services, dependency injection, layer composition, configuration
docs/03-data-types.mdOption, Result, Array, Chunk, HashMap, HashSet, Duration, DateTime, Data, Brand, Order, EquivalenceWorking with Effect data types, collections, domain modeling
docs/04-concurrency.mdFiber, FiberHandle, FiberMap, FiberSet, Ref, SynchronizedRef, SubscriptionRef, Deferred, Queue, PubSub, Pool, Cache, ScopedCache, Semaphore, Latch, ScheduleConcurrency, parallelism, synchronization, queues, caching, scheduling
docs/05-streaming.mdStream, Sink, Channel, PullStreaming data, pull-based processing, stream composition
docs/06-schema.mdSchema, SchemaAST, SchemaParser, validation, parsing, serializationData validation, parsing, encoding/decoding, API schemas
docs/07-transactions.mdTxRef, TxHashMap, TxHashSet, TxQueue, TxSemaphore, Effect.atomicSoftware transactional memory, atomic operations, STM migration
docs/08-patterns.mdRcRef, RcMap, ScopedRef, LayerMap, ManagedRuntime, Match, composition patternsResource lifecycle, pattern matching, best practices, "which module should I use"
docs/09-migration.mdv3 to v4 migration, all breaking changes, rename tablesMigrating from Effect v3, understanding what changed
docs/10-ecosystem.md@effect/platform-*, @effect/vitest, @effect/opentelemetry, testing, TestClock, unstable modules: HTTP, HTTP API, RPC, SQL, CLI, AI, Cluster, WorkflowPlatform setup, testing, observability, HTTP servers/clients, database access, CLI tools, AI integration, distributed systems

Decision Tree

What is the user doing?
│
├─ Writing/reading core Effect code (Effect.gen, pipe, map, flatMap)
│  └─ Read: docs/01-core-effect.md
│
├─ Defining services, layers, or dependency injection
│  └─ Read: docs/02-services-layers.md
│
├─ Working with Option, Result, collections, or domain types
│  └─ Read: docs/03-data-types.md
│
├─ Concurrency (fibers, refs, queues, semaphores, scheduling)
│  └─ Read: docs/04-concurrency.md
│
├─ Streaming data (Stream, Sink, Channel)
│  └─ Read: docs/05-streaming.md
│
├─ Validation, parsing, or Schema
│  └─ Read: docs/06-schema.md
│
├─ Transactions or STM
│  └─ Read: docs/07-transactions.md
│
├─ Resource management patterns, pattern matching, "which module?"
│  └─ Read: docs/08-patterns.md
│
├─ Migrating from v3, understanding renames
│  └─ Read: docs/09-migration.md
│
├─ Testing, platform setup, ecosystem packages
│  └─ Read: docs/10-ecosystem.md
│
├─ HTTP server/client, API definitions, RPC, SQL, CLI, AI, Cluster, Workflow
│  └─ Read: docs/10-ecosystem.md (unstable modules section)
│
└─ Not sure / general question
   └─ Read: docs/01-core-effect.md, then others as needed

Critical v4 Rules

When generating Effect 4.0 code, always follow these rules:

  1. Services use ServiceMap.Service, not Context.Tag or Effect.Tag
  2. Ref, Deferred, Fiber are NOT Effect subtypes -- use Ref.get(), Deferred.await(), Fiber.join()
  3. Effect.fork is now Effect.forkChild, Effect.forkDaemon is now Effect.forkDetach
  4. Effect.catchAll is now Effect.catch, Effect.catchAllCause is now Effect.catchCause
  5. Either is now Result -- constructors: Result.succeed(value), Result.fail(error). Fields: .success, .failure. Tags: "Success", "Failure"
  6. FiberRef is removed -- use ServiceMap.Reference / References.*
  7. Schema is in core effect package -- no @effect/schema import
  8. Layer naming convention: use .layer not .Default or .Live
  9. Generator this: use Effect.gen({self: this}, function*() {...}) not Effect.gen(this, function*() {...})
  10. Cause is flat: cause.reasons array, not a recursive tree
  11. Tagged errors with fields: use Schema.TaggedErrorClass<Self>()("Tag", {field: Schema.String}), NOT Data.TaggedError("Tag")<{field: string}> (the <{}> generic syntax breaks in v4 types). Errors without fields can still use Data.TaggedError("Tag").
  12. Schema.Union takes an array: Schema.Union([A, B]) not Schema.Union(A, B)
  13. Schema.Literal is single-value: use Schema.Literals(["a", "b"]) for multiple literals, not Schema.Literal("a", "b")
  14. Schema.decodeUnknown → Schema.decodeUnknownEffect (the Effect-returning variant was renamed; decodeUnknownSync is unchanged)
  15. Schema.Class.make → Schema.Class.makeUnsafe
  16. @effect/platform is removed -- import HttpClient, HttpBody, HttpClientRequest, FetchHttpClient from effect/unstable/http
  17. LogLevel is a string union ("Info", "Error", etc.), not an object with .label
  18. Logger.replace is removed -- use Logger.layer([myLogger]) to provide a custom logger
  19. Effect.zipRight → Effect.andThen, Effect.firstSuccessOf → Effect.raceAll, Schedule.upTo → Schedule.compose(Schedule.recurs(n))
  20. Brand.make → callable: Schema.brand("X") produces a schema; Brand.nominal<T>() produces a callable constructor (UserId("123") not UserId.make("123"))
  21. Config is NOT an Effect subtype -- Config is Yieldable (works with yield*) but CANNOT be passed to Effect.orDie, Effect.map, etc. Wrap in Effect.gen first.
  22. class extends Schema.Struct({...}) breaks -- this pattern (distinct from Schema.Class) is invalid in v4. Convert to const MySchema = Schema.Struct({...}) with a separate type MySchema = Schema.Type<typeof MySchema>.
  23. Effect.tryPromise(async () => v) bare overload removed -- must use Effect.tryPromise({try:..., catch:...}) object form.
  24. Effect.tap callback must return Effect -- Effect.tap(voidFn) breaks; wrap as Effect.tap((x) => Effect.sync(() => voidFn(x))).
  25. Schema.Object is removed -- use Schema.Unknown instead.
  26. Schema.transformSchema.decodeTo -- decode/encode must be wrapped in SchemaGetter.transform(fn).
  27. Effect.orDieWith(f) is removed -- use Effect.mapError(f) then Effect.orDie chained.
  28. Namespace flattening: Effect.Effect.Error<T>Effect.Error<T>, Effect.Effect.Success<T>Effect.Success<T>, Layer.Layer.Success<T> removed, ManagedRuntime.ManagedRuntime.Context<T> removed.
  29. Span.parent is no longer yieldable -- it's a plain property that may be undefined. Guard with if (span.parent) before access.

Migration Workflow

When migrating a codebase from v3 to v4, always read docs/09-migration.md first. It contains a phased checklist. The recommended order is:

  1. Packages first (update versions, remove @effect/platform and @effect/schema)
  2. Services second (these are the foundation; everything else depends on them)
  3. Error classes third (Data.TaggedErrorSchema.TaggedErrorClass)
  4. API renames fourth (bulk find-and-replace for catchAll, decodeUnknown, Union, etc.)
  5. Logger/runtime last (these are leaf concerns)
  6. Verify: typecheck → tests → bundle size

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.67%
按下载量换算27

Claude

27.66%
按下载量换算20

Cursor

18.92%
按下载量换算14

Gemini CLI

9.47%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills