Cats Effect Ioのロゴ

Cats Effect Io

コミュニティ
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

概要

公開者alexandru
リポジトリskills
スキル名cats-effect-io
スター
51
フォーク
3
同梱ファイル
2
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    alexandruがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Cats Effect Io」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/alexandru/skills/tree/main/skills/coding/cats-effect-io
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCats Effect Ioを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にCats Effect Ioを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Cats Effect Ioは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでCats Effect Ioを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Cats Effect Ioはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCats Effect Ioをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/alexandru/skills/tree/main/skills/coding/cats-effect-ioを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Cats Effect Ioを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Cats Effect Ioで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCats Effect Ioを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Cats Effect Io」は無料ですか?

alexandruがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇