Skip to content
    ↑↓ select↵ openesc close
    mpsuesser

    Effect Enforcer

    opencode-effect-enforcer·v0.3.0·Tools & Commands

    OpenCode V2 plugin for Effect v4 skills, guidance, and pattern enforcement

    GitHub stars

    6

    +4 in 30 days

    Monthly installs

    946

    202 in 7 days

    Composite score

    49.9

    Multi-signal model

    Last commit

    2 days ago

    2026-10-02

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-effect-enforcer@0.3.0"]
    }

    OpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    npm version license

    Spend less time teaching your coding agent Effect.

    If you keep reminding your agent to use typed errors, decode with Schema, or check the current API, this plugin gives those reminders a permanent home in OpenCode V2. It includes Effect guidance and skills the agent can consult while working, plus checks that send common mistakes back for correction after edits.

    How it helps

    Guidance is included before every model call. Four documents cover Effect-first design, schema-first modeling, typed dependencies, and how to choose the relevant skills.

    Skills explain how to use specific Effect APIs. The agent loads the relevant guides through OpenCode's native skill tool, with 53 to choose from across services, streams, HTTP, SQL, React, AI, and more.

    Patterns check the code after edits. 45 tested checks look for common TypeScript and TSX mistakes and return correction advice and relevant skill suggestions to the agent for its next turn.

    Checks run after successful write, edit, patch, and apply_patch calls. Edits and patches are checked only in newly added text; full-file writes and new files are checked in full. Feedback asks the agent to fix valid findings or explain intentional exceptions. Checks are advisory and do not block writes.

    The bundled guidance and skills target Effect 4.0.0 (stable). See the rc.116 → 4.0.0 migration audit and complete upstream release notes.

    Install

    Add the plugin to opencode.jsonc in your project, or ~/.config/opencode/opencode.jsonc for all projects:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugins": ["opencode-effect-enforcer"],
    }
    

    Start a new session. OpenCode installs the package automatically.

    Explore what's included

    Browse the guidance, find a skill for your next task, or see what the patterns look for.

    Guidance (4)

    Skills (53)

    Modeling and core APIs
    Services, lifecycle, and concurrency
    • effect-context-witness: Choose between service witnesses and capability-based dependency injection.
    • effect-service-implementation: Implement focused Effect services without monolithic interfaces.
    • effect-layer-design: Design and compose Layers with explicit dependency wiring.
    • effect-scope: Manage resource acquisition, finalization, and scope ownership safely.
    • effect-fiber: Fork, supervise, interrupt, and coordinate fibers and keyed fiber collections.
    • effect-parallelization: Run, race, gate, and concurrency-limit Effect computations.
    • effect-scheduling: Define retries, repeats, polling, backoff, pacing, and timeouts with Schedule.
    • effect-cache: Cache effectful lookups with TTL, invalidation, deduplication, and scoped entries.
    • effect-batching: Batch and deduplicate requests with Request, RequestResolver, and SqlResolver.
    • effect-stream: Build resource-safe streaming pipelines with transformations, concurrency, and codecs.
    • effect-pubsub-event-bus: Implement typed publish/subscribe event buses with PubSub and Stream.
    • effect-workflow: Build durable workflows, activities, queues, clocks, and compensating transactions.
    Platform and runtime integration
    • effect-platform-abstraction: Keep filesystem, process, HTTP, crypto, and terminal code portable.
    • effect-platform-layers: Provide platform implementations cleanly at application boundaries.
    • effect-managed-runtime: Run Effect services inside frameworks and runtimes Effect does not own.
    • effect-filesystem: Perform platform-independent file I/O through Effect's FileSystem.
    • effect-path: Join, resolve, normalize, and convert paths through Effect's Path service.
    • effect-command-executor: Spawn, stream, pipe, and safely manage child processes.
    • effect-socket: Build TCP, Unix-domain, and WebSocket clients, servers, and framed transports.
    • effect-cli: Build type-safe command-line interfaces with arguments, options, commands, and Layers.
    HTTP, RPC, and persistence
    • effect-http-api: Define typed HTTP APIs with schemas, security, handlers, clients, and OpenAPI.
    • effect-http-client: Make typed outgoing HTTP requests with decoding, retries, streaming, and test transports.
    • effect-http-server: Serve routes, middleware, uploads, static files, streams, and WebSockets.
    • effect-rpc-api: Define shared typed RPC contracts, middleware, errors, and streaming procedures.
    • effect-rpc-client: Consume RPC contracts over HTTP, WebSocket, TCP, workers, or in-memory transports.
    • effect-rpc-server: Implement and serve RPC handlers with middleware, streaming, and interruption support.
    • effect-rpc-cluster: Build clustered RPC entities, sharding, singletons, cron jobs, and workflows.
    • effect-sql: Query databases and build schemas, models, resolvers, repositories, and migrations.
    AI and MCP
    • effect-ai-language-model: Generate text, structured output, streams, and tool calls through LanguageModel.
    • effect-ai-prompt: Construct and compose prompts from messages and multimodal parts.
    • effect-ai-tool: Define type-safe AI tools, toolkits, schemas, and handlers.
    • effect-ai-provider: Configure provider Layers, models, runtime overrides, and fallback execution plans.
    • effect-ai-streaming: Consume AI start/delta/end streams with safe accumulation and history updates.
    • effect-ai-chat: Build persistent multi-turn chats and agentic tool-calling loops.
    • effect-mcp-server: Expose MCP tools, resources, and prompts over stdio or HTTP.
    Frontend state and composition
    Configuration, operations, and testing

    Patterns (45)

    Types, modeling, and collections
    Errors and Effect boundaries
    Services, concurrency, and time
    Platform, I/O, and configuration
    React and testing conventions
    • avoid-react-hooks: Reviews React state and effects for Effect Atom alternatives.
    • avoid-expect-in-if: Prevents conditional assertions that allow tests to pass without checking behavior.

    License

    MIT

    Similar plugins