effect-patterns-error-management

effect-patterns-error-management is a skill for Claude Code from PaulJPhilp/EffectPatterns. It costs 26 tokens per session (12,166 once invoked), scanned A, original, MIT.

A set of 15 Effect-TS patterns for handling errors and optional values in TypeScript applications. Effect-TS is a TypeScript library for making program failures and missing values explicit in code.

In plain words
What is it for?
Use it when writing or reviewing Effect-TS code for error handling, validation results, optional data, and related best practices.
Why use it?
It gives you documented ways to represent and handle expected failures, instead of scattering unclear checks and error logic throughout the application.

Skill for Claude Code

Written for Claude Code: a Claude Code plugin manifest.

Part of the effect-patterns plugin — 24 skills, 2 commands shipped together

Good fit Use it when writing or reviewing Effect-TS code for error handling, validation results, optional data, and related best practices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pauljphilp/effectpatterns/effect-patterns-error-management
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 PaulJPhilp/EffectPatterns --skill effect-patterns-error-management
Clone the repo
git clone --depth 1 https://github.com/PaulJPhilp/EffectPatterns

Made for: Claude Code.

Or install effect-patterns, the plugin that ships this one along with the rest of its 24 skills, 2 commands.

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-patterns-error-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/pauljphilp/effectpatterns/effect-patterns-error-management/github.svg)](https://agentmods.dev/skills/pauljphilp/effectpatterns/effect-patterns-error-management)
Your own site
<a href="https://agentmods.dev/skills/pauljphilp/effectpatterns/effect-patterns-error-management"><img src="https://agentmods.dev/badge/skills/pauljphilp/effectpatterns/effect-patterns-error-management/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-patterns-error-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/pauljphilp/effectpatterns/effect-patterns-error-management"><img src="https://agentmods.dev/badge/skills/pauljphilp/effectpatterns/effect-patterns-error-management.svg" alt="Reviewed on agentmods" width="80" 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 12,166 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00026 $0.12166
Opus 5.5 $0.00010 $0.04866
Sonnet 5.5 $0.00005 $0.02433
Haiku 4.5 $0.00003 $0.01217

Measured 1mo ago against content hash 138c841cda2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

effect-patterns-error-management 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 1mo 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.

config/.claude-plugin/plugins/effect-patterns/skills/effect-patterns-error-management/SKILL.md · 1,669 lines

How it starts

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

Effect-TS Patterns: Error Management

This skill provides 15 curated Effect-TS patterns for error management. Use this skill when working on tasks related to:

  • error management
  • Best practices in Effect-TS applications
  • Real-world patterns and solutions

🟢 Beginner Patterns

Pattern Match on Option and Either

Rule: Use Option.match() and Either.match() for declarative pattern matching on optional and error-prone values

Good Example:

Basic Option Matching

import { Option } from "effect";

const getUserName = (id: number): Option.Option<string> => {
  return id === 1 ? Option.some("Alice") : Option.none();
};

// Using .match() for declarative pattern matching
const displayUser = (id: number): string =>
  getUserName(id).pipe(
    Option.match({
      onNone: () => "Guest User",
      onSome: (name) => `Hello, ${name}!`,
    })
  );

console.log(displayUser(1));   // "Hello, Alice!"
console.log(displayUser(999)); // "Guest User"

Basic Either Matching

import { Either } from "effect";

const validateAge = (age: number): Either.Either<number, string> => {
  return age >= 18
    ? Either.right(age)
    : Either.left("Must be 18 or older");
};

// Using .match() for error handling
const processAge = (age: number): string =>
  validateAge(age).pipe(
    Either.match({
      onLeft: (error) => `Validation failed: ${error}`,
      onRight: (validAge) => `Age ${validAge} is valid`,
    })
  );

console.log(processAge(25)); // "Age 25 is valid"
console.log(processAge(15)); // "Validation failed: Must be 18 or older"

Advanced: Nested Matching

When dealing with nested Option and Either, use nested .match() calls:

import { Option, Either } from "effect";

interface UserProfile {
  name: string;
  age: number;
}

const getUserProfile = (
  id: number
): Option.Option<Either.Either<string, UserProfile>> => {
  if (id === 0) return Option.none(); // User not found
  if (id === 1) return Option.some(Either.left("Profile incomplete"));
  return Option.some(Either.right({ name: "Bob", age: 25 }));
};

// Nested matching - first on Option, then on Either
const displayProfile = (id: number): string =>
  getUserProfile(id).pipe(
    Option.match({
      onNone: () => "User not found",
      onSome: (result) =>
        result.pipe(
          Either.match({
            onLeft: (error) => `Error: ${error}`,
            onRight: (profile) => `${profile.name} (${profile.age})`,
          })
        ),
    })
  );

console.log(displayProfile(0)); // "User not found"
console.log(displayProfile(1)); // "Error: Profile incomplete"
console.log(displayProfile(2)); // "Bob (25)"

Read the full file on GitHub · 1,669 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. 1mo ago First seen · 1,669 lines · 26 tokens per session scan A 138c841cda2d

Subscribe to this mod's changes

effect-patterns-error-management is a skill published in the GitHub repository PaulJPhilp/EffectPatterns (807 stars, last pushed 4mo ago), licensed MIT. It adds 26 tokens to every session and 12,166 once invoked, about $0.0001 per session on Opus 5.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

effect-error-handling

Implement typed error handling in Effect v4 using Schema.TaggedErrorClass, catchTag/catchTags, catchReason/catchReasons, Cause, ErrorReporter, and recovery patterns. Use this skill when working with Effect error channels, handling expected failures, or designing error recovery strategies.

mpsuesser/pi-effect-harness · 61 tokens

mindos

MindOS: local knowledge assistant & shared KB. Keeps decisions, notes, SOPs, debugging lessons, research findings, preferences across sessions/agents. Core: save notes, search KB, organize files, run workflows, review, append CSV, hand off context, distill lessons. NOT for app source or paths outside KB. Triggers…

GeminiLight/MindOS · 136 tokens

misakanet-failure-memory

Search and record failure-recovery lessons from real engineering sessions; submit and verify debugging lessons across the MisakaNet network.

Ikalus1988/MisakaNet · 31 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/obsidian-mcp-server · 54 tokens

report-issue-local

File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.

cyanheads/obsidian-mcp-server · 44 tokens

workspace-doctor

Diagnose DocMason workspace readiness and report actionable remediation without mutating the repository.

JetXu-LLM/DocMason · 21 tokens