Langsung ke konten
Skillpedia
API & server (backend)28k · #9874

effect

Fungsinya

Skill ini memandu penulisan kode TypeScript dengan pustaka Effect, mencakup layanan, skema, error bertipe, dan alur kerja beberapa langkah. Ditujukan untuk pengembang yang memakai Effect dan menginginkan kode yang akurat serta mutakhir.

Kapan dipakai

  • ✓Saat Anda menulis atau mengubah kode TypeScript yang memakai Effect.
  • ✓Ketika Anda memerlukan error bertipe, skema, atau layanan yang dibangun dengan Effect.
  • ✓Saat Anda ingin pola Effect v4 terkini diperiksa terhadap sumber pustakanya.

Link skill

https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/effect/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/effect/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Saya memerlukan layanan di backend TypeScript saya yang memakai Effect dengan error bertipe dan skema untuk data permintaan.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memeriksa sumber pustaka Effect terkini untuk API dan contoh yang tepat, mengikuti pola yang sudah ada di proyek, lalu menulis kodenya. Ia menjaga handler HTTP tetap ringan dan menaruh aturan bisnis di dalam layanan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.

  1. If .opencode/references/effect-smol is missing, clone https://github.com/Effect-TS/effect-smol there. Do this in the project, not in the skill folder.
  2. Search .opencode/references/effect-smol for exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code.
  3. Also inspect existing repo code for local house style before introducing new patterns.
  4. 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") or Effect.fnUntraced(...) for named effects when adding reusable service methods or important workflows.
  • Prefer Effect Schema for API and domain data shapes. Use branded schemas for IDs and Schema.TaggedErrorClass for 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-smol or nearby code first.

Testing Patterns

  • Use testEffect(...) from packages/opencode/test/lib/effect.ts for 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.
Pertanyaan umum

Versi Effect mana yang ditargetkan?

Ia menargetkan Effect v4, yang juga dikenal sebagai effect-smol, bukan contoh v2 atau v3 yang lebih lama.

Di mana ia mencari API?

Ia mencari di salinan lokal sumber effect-smol, dan mengklonnya jika tidak ada.

Bagaimana error ditangani?

Error domain memakai kelas error ber-tag sehingga dapat ditangani dengan tipe.

Detail

Deskripsi asli dari pembuat

Work with Effect v4 / effect-smol TypeScript code in this repo

repo: Kilo-Org/kilocode

Popularitas

Bintang GitHub
28k
Peringkat
#9874
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa