effect-best-practices

effect-best-practices is a skill for Claude Code, Codex from betalyra/effect-skills. It costs 45 tokens per session (3,743 once invoked), scanned A, original, MIT.

A coding guide for Effect-TS, a TypeScript library for describing computations, errors, and dependencies, plus effect-atom React components. It sets patterns for services, typed errors, dependency layers, composition, and schema imports.

In plain words
What is it for?
Use it when writing or reviewing Effect.Service, Schema.TaggedError, Layer composition, or effect-atom React code, especially when composing operations with pipe and handling typed errors.
Why use it?
It keeps Effect-TS code consistent and makes errors and dependencies explicit. It also prevents use of the deprecated @effect/schema package.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing or reviewing Effect.Service, Schema.TaggedError, Layer composition, or effect-atom React code, especially when composing operations with pipe and handling typed errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/betalyra/effect-skills/effect-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add betalyra/effect-skills --skill effect-best-practices
Clone the repo
git clone --depth 1 https://github.com/betalyra/effect-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for effect-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/betalyra/effect-skills/effect-best-practices/github.svg)](https://agentmods.dev/skills/betalyra/effect-skills/effect-best-practices)
Your own site
<a href="https://agentmods.dev/skills/betalyra/effect-skills/effect-best-practices"><img src="https://agentmods.dev/badge/skills/betalyra/effect-skills/effect-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for effect-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/betalyra/effect-skills/effect-best-practices"><img src="https://agentmods.dev/badge/skills/betalyra/effect-skills/effect-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,743 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.03743
Opus 5 $0.00023 $0.01871
Sonnet 5 $0.00009 $0.00749
Haiku 4.5 $0.00005 $0.00374

Measured 10d ago against content hash b53b6903a438, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

effect-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

effect-best-practices/SKILL.md · 482 lines

How it starts

The opening of the file, as written. The whole thing — 482 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Effect-TS Best Practices

This skill enforces opinionated, consistent patterns for Effect-TS codebases. These patterns optimize for type safety, testability, observability, and maintainability.

Core Principles

Effect Type Signature

Effect<Success, Error, Requirements>
//      ↑        ↑       ↑
//      |        |       └── Dependencies (provided via Layers)
//      |        └── Expected errors (typed, must be handled)
//      └── Success value

Data-First Piped Style

ALWAYS prefer data-first pipe style for composition:

// ✅ GOOD: Data-first with pipe
const result = value.pipe(
  Effect.map((n) => n * 2),
  Effect.flatMap((n) => processValue(n)),
  Effect.catchTag("NetworkError", () => Effect.succeed(fallback)),
);

// ❌ BAD: Function-first style
const result = Effect.catchTag(
  Effect.flatMap(
    Effect.map(value, (n) => n * 2),
    (n) => processValue(n),
  ),
  "NetworkError",
  () => Effect.succeed(fallback),
);

"@effect/schema" is deprecated

Don't try to install nor import from "@effect/schema", it is deprecated. Instead just import from "effect" package.

// ✅ GOOD
import { Schema } from "effect";

// ❌ BAD
import { Schema } from "@effect/schema";

Quick Reference: Critical Rules

Category DO DON'T
Services Effect.Service Context.Tag for business logic
Dependencies dependencies: [Dep.Default] at the top of the service Manual Layer.provide at usage sites
Errors Schema.TaggedError with message and cause fields Plain classes or generic Error
Error Specificity UserNotFoundError, SessionExpiredError Generic NotFoundError, BadRequestError
Error Handling catchTag (supports multiple tags) / catchTags catchAll or mapError
IDs Schema.UUID.pipe(Schema.brand("@App/EntityId")) Plain string for entity IDs
Functions Effect.fn("Service.method") Anonymous generators
Logging Effect.log with structured data console.log
Config Config.* with validation process.env directly
Options Option.match with both cases Option.getOrThrow
Nullability Option<T> in domain types null/undefined
Atoms Atom.make outside components Creating atoms inside render
Atom State Atom.keepAlive for global state Forgetting keepAlive for persistent state
Atom Updates useAtomSet in React components Atom.update imperatively from React
Atom Cleanup get.addFinalizer() for side effects Missing cleanup for event listeners
Atom Results Result.builder with onErrorTag Ignoring loading/error states

Read the full file on GitHub · 482 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 482 lines · 45 tokens per session scan A b53b6903a438

Subscribe to this mod's changes

effect-best-practices is a skill published in the GitHub repository betalyra/effect-skills (20 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 3,743 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

typescript-style

Validate TypeScript/React code against style and architectural conventions.

peteski22/agent-pragma · 14 tokens

senior-frontend

Frontend development for React 19, Next.js 15, TypeScript, and Tailwind CSS v4 / Pengembangan frontend dengan React 19, Next.js 15, TypeScript, dan Tailwind CSS v4.

roedyrustam/vibes-plug · 50 tokens

flockion_engineering_typescript_react

Forces the simplest, shortest, safest solution that actually works for Flockion engineering work. Combines lazy senior-developer pragmatism with practical clean-code standards for TypeScript, React, frontend, Python, backend, APIs, cloud platforms, AI agents, orchestration services, YAML workflows, and infrastructure…

error505/Flockion_AI_Engineering · 202 tokens

react-patterns

Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices. Use when writing or reviewing React components, applying hooks and composition patterns, or improving React performance and TypeScript usage.

shipshitdev/skills · 44 tokens

senior-frontend

Use when the user needs production-grade React/Next.js/TypeScript development with rigorous component architecture, state management, performance optimization, and >85% test coverage. Triggers: React component development, Next.js page creation, state management design, frontend performance audit, component library…

Pixel-Process-UG/superkit-agents · 62 tokens

nextjs-react-typescript

Expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.

sutchan/Agent-Skills-Hub · 32 tokens