Logo: Cats Effect Io

Cats Effect Io

Communautéit
alexandru
cats-effect-io

Helps agents write and review Scala Cats Effect IO code. Use for suspending side effects and non-determinism in IO or F[_], choosing Sync/Async/Temporal/Concurrent/Clock/Random, handling blocking I/O, testing with TestControl, and composing resources, fibers, races, and structured concurrency safely.

Add to TypingMind

Iwwersiicht

Editeuralexandru
Repositoryskills
Skill-Nummcats-effect-io
Stären
51
Forks
3
Matgeliwwert Dateien
2
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    alexandru huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Cats Effect Io an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/alexandru/skills/tree/main/skills/coding/cats-effect-io
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alexandru/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/coding/cats-effect-io .claude/skills/cats-effect-io
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Cats Effect Io an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Cats Effect Io automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Cats Effect Io net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Cats Effect IO (Scala)

Quick start

  • Treat every side effect and source of non-determinism as an effect value: return IO[A], SyncIO[A], or F[A] with the smallest needed Cats Effect capability.
  • Suspend each side-effectful call, not a precomputed result. Instant.now(), random/UUID generation, environment reads, and mutable allocation such as new Array[...] belong inside IO(...), Sync[F].delay, Clock, Random, or an effectful factory.
  • Initialize shared mutable state through IO/F/Resource factories and pass the resulting reference or service around. Do not hide effects in constructors, top-level vals, or default arguments.
  • Wrap Java blocking use-phase calls with IO.interruptible by default (or Sync[F].interruptible); use blocking for acquisition, finalizers, and operations that must not be interrupted.
  • Use Resource to acquire/release resources and IOApp for program entry points.
  • Prefer structured concurrency (parTraverse, parMapN, background, Supervisor) over manual fiber management.
  • Do not use unsafeRun* (unsafeRunSync, unsafeRunAndForget, etc.) in app code or tests; for interop with non-Cats-Effect callback APIs, use Dispatcher.
  • Read references/cats-effect-io.md for concepts, recipes, FAQ guidance, and verified samples.
  • For deeper Resource guidance, use the cats-effect-resource skill (install: npx skills add https://github.com/alexandru/skills --skill cats-effect-resource).

Workflow

  1. Identify every side effect and non-deterministic value, including time, random values, mutable allocation, and shared-state reads/writes.
  2. Choose the effect type: concrete IO or polymorphic F[_] with the smallest capability (Clock, Random, Sync, Async, Temporal, Concurrent, etc.).
  3. Wrap side-effectful code using IO(...), IO.interruptible, IO.blocking, IO.async, or the corresponding typeclass operation.
  4. Move initialization of stateful services into create/resource factories returning F[A] or Resource[F, A].
  5. Compose effects with flatMap/for-comprehensions and collection combinators (traverse, parTraverse).
  6. Use concurrency primitives (Ref, Deferred, Queue, Semaphore, Supervisor) and structured concurrency to avoid fiber leaks.
  7. Keep effect execution at boundaries (IOApp, framework runtime); for callback-style interop, bridge with Dispatcher.

Side-effect rules (apply to IO, SyncIO, and to F[_]: Sync/Async)

  • All side-effectful functions must return results wrapped in IO (or F[_] with Cats Effect typeclasses/capabilities).
  • Side effects include all non-determinism (call sites are not referentially transparent):
    • Any I/O (files, sockets, console, databases).
    • Instant.now(), System.currentTimeMillis(), Random.nextInt(), UUID.randomUUID().
    • Reads from environment variables, system properties, clocks, random sources, or shared mutable state.
    • Allocating or returning mutable structures when identity or mutation can escape (Array, mutable.Map, Java collections, AtomicReference, caches).
  • Private local mutation is acceptable only when the whole mutable block is suspended and no mutable value escapes.

Blocking I/O rules

  • Prefer IO.interruptible/Sync[F].interruptible for blocking use-phase operations. This gives cancellation a chance to interrupt the underlying thread and is the right default for network/socket-style blocking APIs.
  • Do not require a proof that every Java API honors interruption before using interruptible; some APIs still ignore interruption, so add a resource-specific cancellation protocol when cancellation responsiveness matters and testing shows interruption is not enough.
  • Use IO.blocking/Sync[F].blocking for acquisition, cleanup, and disposal (Closeable#close, AutoCloseable#close), where attempted interruption can leave lifecycle state ambiguous.

Output expectations

  • Make side effects explicit in signatures (IO/SyncIO or F[_]: Sync/Async); the guidance here applies equally to concrete IO and polymorphic F[_].
  • Use the smallest typeclass constraint that supports the needed operations.
  • Keep effects as values; do not execute effects in constructors or top-level vals.
  • When adding or changing Scala examples, update and compile the bundled scripts/verify-examples.scala script.

Execution and test rules

  • unsafeRun* is forbidden in production and test code, including import cats.effect.unsafe.implicits.global.
  • If interop requires running effects from non-Cats-Effect callbacks, use Dispatcher.
  • Prefer effect-native test styles (return IO[Assertion]/F[Assertion]) instead of manually running effects.
  • Avoid IO.sleep/Thread.sleep in unit tests unless using virtual time with TestControl.

References

  • Load references/cats-effect-io.md for documentation summary and patterns.
  • For concrete samples, read references/cats-effect-io.md; the representative check is scripts/verify-examples.scala.
  • Use the cats-effect-resource skill for Resource-specific workflows and patterns (install: npx skills add https://github.com/alexandru/skills --skill cats-effect-resource).

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Cats Effect Io?

Helps agents write and review Scala Cats Effect IO code. Use for suspending side effects and non-determinism in IO or F[_], choosing Sync/Async/Temporal/Concurrent/Clock/Random, handling blocking I/O, testing with TestControl, and composing resources, fibers, races, and structured concurrency safely.

Firwat Cats Effect Io op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Cats Effect Io besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Cats Effect Io an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/alexandru/skills/tree/main/skills/coding/cats-effect-io an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Cats Effect Io benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Cats Effect Io benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Cats Effect Io domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Cats Effect Io gratis?

alexandru huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇