effect-and-errors

effect-and-errors is a skill for Claude Code, Codex from latitude-dev/latitude-llm. It costs 26 tokens per session (2,046 once invoked), scanned A, original, MIT.

Guidance for writing Effect TypeScript programs and handling application and HTTP errors. Effect is a TypeScript library for structuring asynchronous work, dependencies, and failures.

In plain words
What is it for?
Building Effect programs, defining domain-specific errors, handling repository failures, and passing errors correctly through HTTP endpoints.
Why use it?
It helps avoid guessing how Effect handles errors and composition by directing developers to existing guides and examples before they write code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/latitude-dev/latitude-llm/effect-and-errors
Any agent
npx skills add latitude-dev/latitude-llm --skill effect-and-errors
Clone the repo
git clone --depth 1 https://github.com/latitude-dev/latitude-llm

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-and-errors

README.md
[![agentmods](https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/effect-and-errors.svg)](https://agentmods.dev/skills/latitude-dev/latitude-llm/effect-and-errors)
Your own site
<a href="https://agentmods.dev/skills/latitude-dev/latitude-llm/effect-and-errors"><img src="https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/effect-and-errors.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.02046
Opus 5 $0.00013 $0.01023
Sonnet 5 $0.00005 $0.00409
Haiku 4.5 $0.00003 $0.00205

Measured 4d ago against content hash 1bd450c76ea9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

effect-and-errors 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 4d 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.

.agents/skills/effect-and-errors/SKILL.md · 190 lines

How it starts

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

Effect TS and HTTP-aware errors

When to use: Composing Effect programs, domain errors, HttpError, repository error types, or error propagation at HTTP boundaries.

Effect Best Practices

IMPORTANT: Always consult effect-solutions before writing Effect code.

  1. Run effect-solutions list to see available guides
  2. Run effect-solutions show <topic>... for relevant patterns (supports multiple topics)
  3. Search ~/.local/share/effect-solutions/effect for real implementations

Topics: quick-start, project-setup, tsconfig, basics, services-and-layers, data-modeling, error-handling, config, testing, cli.

Never guess at Effect patterns - check the guide first.

Local Effect Source

The Effect v4 repository is cloned to ~/.local/share/effect-solutions/effect for reference. Use this to explore APIs, find usage examples, and understand implementation details when the documentation isn't enough.

Effect patterns

  • Prefer Effect.gen for sequential effect composition
  • Wrap promise-based APIs with Effect.tryPromise and typed errors
  • Use Data.TaggedError for domain-specific error types
  • Use Effect.repeat with Schedule for polling/recurring tasks
  • Use Fiber for lifecycle management of long-running effects

Never capture scope-bound services at layer build

Inside Layer.effect(Tag, Effect.gen(...)), do not store a service read via yield* in a closure that methods use later. Resolve the service again inside each method.

Services bound to request/job scope (anything provided at a boundary per invocation — SqlClient, ChSqlClient, HttpServerRequest, session-scoped auth context) must be resolved per call. If the layer-build closure captures such a service, concurrent callers with different scopes share the first-built reference and silently operate on the wrong context.

// ❌ WRONG — captures the service at layer build; every method uses the stale closure
export const FooRepositoryLive = Layer.effect(
  FooRepository,
  Effect.gen(function* () {
    const sqlClient = yield* SqlClient
    return {
      save: (x) => sqlClient.query(...),
    }
  }),
)

// ✅ RIGHT — layer build does not yield the service at all; each method resolves fresh
export const FooRepositoryLive = Layer.effect(
  FooRepository,
  Effect.gen(function* () {
    return {
      save: (x) =>
        Effect.gen(function* () {
          const sqlClient = yield* SqlClient
          yield* sqlClient.query(...)
        }),
    }
  }),
)

Read the full file on GitHub · 190 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. 4d ago First seen · 190 lines · 26 tokens per session scan A 1bd450c76ea9

Subscribe to this mod's changes

effect-and-errors is a skill published in the GitHub repository latitude-dev/latitude-llm (4,619 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 2,046 once invoked, about $0.0001 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.