Logo di Effect V4

Effect V4

Community
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.

Panoramica

Autorepeterpme
Repositoryskills
Nome della skilleffect-v4
Stelle
28
Fork
0
File inclusi
17
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 17 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da peterpme su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Effect V4 in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/peterpme/skills/tree/main/effect-v4
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Effect V4 in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Effect V4 non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Effect V4 non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello 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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill 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.

Perché usare Effect V4 su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Effect V4 è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Effect V4 in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/peterpme/skills/tree/main/effect-v4. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Effect V4?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Effect V4?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Effect V4: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Effect V4 è gratuita?

È pubblicata su GitHub da peterpme. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇