effect
できること
Effectライブラリを使い、サービス、スキーマ、型付きエラー、複数手順のワークフローを含むTypeScriptコードを書く手助けをします。Effectを使い、正確で新しいコードがほしい開発者向けです。
使う場面
- ✓Effectを使うTypeScriptのコードを書いているか、変更しているとき。
- ✓Effectで作る型付きエラー、スキーマ、サービスが必要なとき。
- ✓最新のEffect v4のパターンを、ライブラリのソースで確認したいとき。
スキルのリンク
https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/effect/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“TypeScriptのバックエンドで、Effectを使うサービスが必要です。型付きのエラーと、リクエストデータのスキーマを持たせてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、正確なAPIと例について現在のEffectライブラリのソースを確認し、プロジェクトの既存のパターンに従ってからコードを書きます。HTTPのハンドラーは薄く保ち、業務ルールはサービスに置きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Effect
This codebase uses Effect for typed, composable TypeScript services, schemas, and workflows.
Source Of Truth
Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 examples.
- If
.opencode/references/effect-smolis missing, clonehttps://github.com/Effect-TS/effect-smolthere. Do this in the project, not in the skill folder. - Search
.opencode/references/effect-smolfor exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code. - Also inspect existing repo code for local house style before introducing new patterns.
- Prefer answers and implementations backed by specific source files or nearby repo examples.
Guidelines
- Prefer current Effect v4 APIs and project-local patterns over old blog posts, examples, or package-memory guesses.
- Use
Effect.gen(function* () { ... })for multi-step workflows. - Use
Effect.fn("Name")orEffect.fnUntraced(...)for named effects when adding reusable service methods or important workflows. - Prefer Effect
Schemafor API and domain data shapes. Use branded schemas for IDs andSchema.TaggedErrorClassfor typed domain errors when modeling new error surfaces. - Keep HTTP handlers thin: decode input, read request context, call services, and map transport errors. Put business rules in services.
- In Effect service code, prefer Effect-aware platform abstractions and dependencies over ad hoc promises where the surrounding code already does so.
- Keep layer composition explicit. Avoid broad hidden provisioning that makes missing dependencies hard to see.
- In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior.
- Do not introduce
any, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types. - Do not answer from memory. Verify against
.opencode/references/effect-smolor nearby code first.
Testing Patterns
- Use
testEffect(...)frompackages/opencode/test/lib/effect.tsfor tests that exercise Effect services, layers, runtime context, scoped resources, or platform integrations. - Use
it.live(...)for filesystem, git repositories, HTTP servers, sockets, child processes, locks, real time, and other live platform behavior. - Run tests from package directories such as
packages/opencode; never run package tests from the repo root. - Prefer explicit test layers over ad hoc managed runtimes. Keep dependency provisioning visible in the test file.
- Use scoped fixtures and finalizers for resources that must be cleaned up, including temporary directories, flags, databases, fibers, servers, and global state.
よくある質問
どのEffectのバージョンを対象にしていますか?
古いv2やv3の例ではなく、effect-smolとも呼ばれるEffect v4を対象にしています。
APIはどこで確認しますか?
effect-smolのソースのローカルコピーを検索し、なければそれをクローンします。
エラーはどう扱いますか?
ドメインのエラーはタグ付きのエラークラスを使い、型で処理できるようにします。
詳細
人気
- GitHubのスター
- 28k
- ランキング
- #9874
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
chart
28k依頼があったときに、エージェントが棒、折れ線、円、散布図などのグラフを描けるよう支援します。データを描画するグラフツールを使います。
jetbrains-sandbox
28kエージェントが、LinuxのクラウドサンドボックスにIntelliJをインストールし、ブラウザで見られる画面と、検査や自動化のためにIDEを操作するツールを用意できるよう支援します。
rtl-aware-development
28kエージェントが、右から左に書く言語に対応したインターフェースを作れるよう支援します。論理的なレイアウトと、方向の混在するテキストの分離を使います。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。