fp-ts-errors
Replace try/catch with Either and TaskEither for predictable, type-safe error handling.
Install
mkdir -p .claude/skills/fp-ts-errors && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6532" && unzip -o skill.zip -d .claude/skills/fp-ts-errors && rm skill.zipInstalls to .claude/skills/fp-ts-errors
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.Key capabilities
- →Replace runtime try/catch blocks with Either
- →Model explicit error types as data
- →Map operation failures to descriptive types
- →Validate inputs into reliable result types
How it works
Replaces procedural exception control flow with monad-based return types by wrapping functional outputs in Either constructors.
Inputs & outputs
When to use fp-ts-errors
- →Refactor try/catch blocks
- →Implement explicit error types
- →Build reliable API services
About this skill
Practical Error Handling with fp-ts
This skill teaches you how to handle errors without try/catch spaghetti. No academic jargon - just practical patterns for real problems.
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use This Skill
- When you want type-safe error handling in TypeScript
- When replacing try/catch with Either and TaskEither patterns
- When building APIs or services that need explicit error types
- When accumulating multiple validation errors
The core idea: Errors are just data. Instead of throwing them into the void and hoping someone catches them, return them as values that TypeScript can track.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
When not to use it
- →Simple scripts where overhead outweighs clarity
- →Legacy codebases that rely on global exception handlers
Prerequisites
Limitations
- →Increases initial code verbosity
- →Requires team-wide adoption for effective type tracking
How it compares
It forces developers to handle errors at the type level rather than relying on runtime bubble-up behavior.
Compared to similar skills
fp-ts-errors side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| fp-ts-errors (this skill) | 1 | 5mo | Review | Intermediate |
| typescript-review | 39 | 3mo | No flags | Intermediate |
| typescript | 28 | 4mo | No flags | Beginner |
| react-patterns | 9 | 8mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by sickn33
View all by sickn33 →You might also like
typescript-review
metabase
Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
typescript
lobehub
TypeScript code style and optimization guidelines. Use when writing TypeScript code (.ts, .tsx, .mts files), reviewing code quality, or implementing type-safe patterns. Triggers on TypeScript development, type safety questions, or code style discussions.
react-patterns
davila7
Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
antfu
antfu
Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.
obsidian-sdk-patterns
jeremylongshore
Apply production-ready Obsidian plugin patterns for TypeScript. Use when implementing complex features, refactoring plugins, or establishing coding standards for Obsidian development. Trigger with phrases like "obsidian patterns", "obsidian best practices", "obsidian code patterns", "idiomatic obsidian plugin".
ast-grep-find
parcadei
AST-based code search and refactoring via ast-grep MCP