Logotipo de Effect V4

Effect V4

Comunidad
peterpme
effect-v4

Effect v4 (4.0.0) for TypeScript. Use when writing, reviewing, or testing Effect code — Effect.gen, Effect.fn, Schema, TaggedError, Context.Service, Layer, ManagedRuntime, Config, Scope, Fiber, Queue, Ref, Schedule, Stream, Cache, HttpClient, HttpRouter, HttpApi, SqlClient, SqlSchema, effect/ai, the Vercel AI SDK inside Effect, @effect/vitest, TestClock — or running Effect on Cloudflare Workers.

Descripción general

Editorpeterpme
Repositorioskills
Nombre de la habilidadeffect-v4
Estrellas
28
Forks
0
Archivos incluidos
17
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 17 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por peterpme en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Effect V4 en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/peterpme/skills/tree/main/effect-v4
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterpme/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/effect-v4 .claude/skills/effect-v4
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Effect V4 en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Effect V4 automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Effect V4 no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Effect v4

Effect 4.0.0 is the stable release. Write v4. Model memory and effect.website default to v3. Do not trust either. Every example that starts with import compiles against effect@4.0.0. Blocks under Fail review on are wrong on purpose.

The model

Effect.Effect<A, E, R> describes work. Building it runs nothing.

  • A is the success value.
  • E is the expected failures, as tagged errors.
  • R is the services still required. A Layer provides them.

Run an Effect once, at the program edge. Everything below the edge returns an Effect. Hover A, E, and R. Inference is the documentation.

Imports

NeedImport
Coreimport { Effect, Layer, Schema, Context } from "effect"
HTTP client and servereffect/http
HttpApieffect/http-api
SQLeffect/sql
LLMseffect/ai
Test serviceseffect/testing
Everything elseeffect/<area>: cli, rpc, workflow, cluster, persistence, reactivity, observability, encoding, process, socket, workers, eventlog, schema
Runtimes, drivers, providers@effect/platform-node, @effect/sql-sqlite-node, @effect/sql-d1, @effect/ai-openai, @effect/ai-anthropic, @effect/vitest

effect/unstable/*, @effect/platform, @effect/sql, and @effect/ai are prerelease paths. They do not exist in 4.0.0.

Most of effect/<area> is tagged @stability unstable. It is production code, but a 4.x minor can break it. Pin effect and every @effect/* to one exact version. Upgrade them together.

House rules

Write

  1. A reusable effectful function is Effect.fn("Owner.method"). One-off sequencing is inline Effect.gen. The name is the span.
  2. Pure work stays plain TypeScript. xs.map(f), never Effect.forEach(xs, (x) => Effect.succeed(f(x))).
  3. No ambient globals in Effect code. fetch → HttpClient. Date.now() → Clock or DateTime. console → Effect.log*. setTimeout → Effect.sleep. Math.random() → Random.
  4. Run effects only at the entry point. Never Effect.runPromise inside a helper.

Errors

  1. An expected failure is a Schema.TaggedError class. Fail with return yield* new ItemMissing({ id }). Returning { _tag: "ItemMissing" } is a success.
  2. _tag is the only discriminant. Success unions use Data.taggedEnum. Never write { _tag: "X" as const }.
  3. Handle an error only where you have a real answer: a fallback, a retry, a response, a settlement. Otherwise leave it in E.
  4. Never swallow. No Effect.ignore, no catch-to-void. Best-effort work returns a tagged outcome and logs it.
  5. Bugs and impossible states die. Only the entry point inspects Cause.

Data

  1. Decode unknown input once, at the boundary, with Schema. Do not decode values you just built.

Services

  1. A service owns I/O, state, credentials, or policy. Everything else is a function.
  2. Yield dependencies once in Layer.effect and close over them. Public methods have R = never.
  3. Service keys are path-shaped and unique: "@app/store/ItemStore".
  4. Provide shared infrastructure once, at the composition root: HTTP transport, SQL driver, logger.

Config

  1. Read env and host bindings only at the entry point. Pass plain typed values into layer constructors: catalogLayer({ baseUrl, apiKey }).
  2. Every setting is required. No ?? fallbacks. No Config.withDefault for business constants. Keep constants in one config module.

Retry

  1. One retry owner per failure. Bound every retry with times and a schedule. Set SDK retries to zero when Effect retries.

Testing

  1. No module mocks. No fake services. No stubbed HttpClient. Test pure functions, recorded fixtures through the production schema, and real local engines (SQLite :memory:, temp directories) with TestClock.
  2. Prove a workflow change with the project's real end-to-end run. Show the output.

Style

  1. No comments on functions. Names and types are the docs.

Choose

I needUseRead
Sequence effectsEffect.gen + yield*core
A named, traced operationEffect.fn("X.y")core
A value that may be absentOptioncore
A success-or-failure value, not an effectResultcore
Exhaustive branching on a unionMatch, $matchcore
Durations and datesDuration, DateTimecore
A typed expected failureSchema.TaggedErrorerrors
Recover from one failurecatchTag, catchTags, catchReasonerrors
Wrap a Promise or SDK callEffect.tryPromiseerrors
Validate unknown inputSchema.decodeUnknownEffectschema
Parse JSON textSchema.fromJsonStringschema
A dependency or capabilityContext.Service + Layerservices
Settings and secretsConfig, Redacted at the entryservices
Start the programNodeRuntime.runMain, ManagedRuntimeservices
Do work in parallelEffect.forEach(xs, f, { concurrency }), Effect.allconcurrency
Open and close a resourceEffect.acquireRelease, Scopeconcurrency
A background loopEffect.forkScoped in a layerconcurrency
Shared mutable stateRef, SynchronizedRef, SubscriptionRefconcurrency
Wait for a signal, limit accessDeferred, Latch, Semaphoreconcurrency
A work queue or fan-outQueue, PubSubconcurrency
Retry, repeat, pollEffect.retry, Effect.repeat, Scheduletime
A deadlineEffect.timeoutOrElsetime
Values over time, pagination, SSEStreamstreams
Memoize a lookupCache, Effect.cachedWithTTLcaching
Batch many lookups into one callRequest, RequestResolvercaching
Logs, spans, metricsEffect.log*, Effect.fn, Metricobservability
Call an HTTP APIHttpClienthttp
Serve HTTPHttpRouter, HttpApihttp
Query SQLSqlClient, SqlSchemasql
Call an LLMVercel AI SDK or effect/aillm
Files, paths, child processes, CLIsFileSystem, Path, ChildProcess, effect/cliplatform
Write a test@effect/vitest, TestClocktesting
RPC, durable workflows, cluster, persistence, atoms, event logs—modules
You wrote a v3 or prerelease name—v3 traps
Cloudflare Workers—cloudflare

Verify an API

Do not guess a signature. The installed package ships its source and docs:

  • node_modules/effect/src/<Module>.ts, or src/<area>/ for subpaths. Exports carry When to use and Gotchas JSDoc.
  • node_modules/effect/ai-docs/src/ holds the official examples by topic.
  • node_modules/effect/AGENTS.md is the upstream agent guide.

With pnpm, look under the package that depends on effect: <package>/node_modules/effect. rg smart case makes lowercase patterns case-insensitive. Search with rg -s. The Effect language service (@effect/tsgo) reports v3 names as outdatedApi. Run the typecheck.

Cloudflare Workers

Effect runs on Workers with no platform package. Build the layer graph per invocation from env. Use FetchHttpClient.layer and @effect/sql-d1. D1 has no transactions. Use batch([...]) on the D1Client service. Read cloudflare only for Workers work. Nothing else in this skill depends on it.

Review

  • Hover R. A service in R that no layer provides defects at run time → reject.
  • Hover E. A new error class with no catchTag update means an exhaustive edge is lying.
  • Effect.forEach whose callback only wraps a pure value → reject. That is xs.map.
  • { _tag: "X" as const } → reject. Use a constructor.
  • yield* of a service inside a public method → reject. Capture it in the layer.
  • Global fetch inside tryPromise for an HTTP API → reject. Use HttpClient.
  • Effect.ignore, catchCause, or a handler returning Effect.void below the entry → reject.
  • A retry without times → reject. It retries forever.
  • Cache.make without timeToLive → reject. It caches failures forever.
  • vi.mock, Layer.mock, Layer.succeed of an app service, or HttpClient.make in a test → reject.

Provenance

A copy of this skill also lives in a work repository. Update both copies when either changes.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Effect V4?

Effect v4 (4.0.0) for TypeScript. Use when writing, reviewing, or testing Effect code — Effect.gen, Effect.fn, Schema, TaggedError, Context.Service, Layer, ManagedRuntime, Config, Scope, Fiber, Queue, Ref, Schedule, Stream, Cache, HttpClient, HttpRouter, HttpApi, SqlClient, SqlSchema, effect/ai, the Vercel AI SDK inside Effect, @effect/vitest, TestClock — or running Effect on Cloudflare Workers.

¿Por qué usar Effect V4 en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Effect V4 está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Effect V4 en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/peterpme/skills/tree/main/effect-v4. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Effect V4?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Effect V4?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Effect V4 con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Effect V4?

peterpme la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇