
Error handling typed results
Makes the agent model expected failures as typed Result values in React Native apps
Error handling typed results is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- JavaScript, TypeScript
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 16
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Error handling typed results
This skill sets up a typed error-handling spine for React Native and Expo apps. Expected failures such as missing records, offline state, full storage or invalid input are returned as a Result value with a kebab-case kind and typed parameters, while true bugs still throw. It explains where to convert vendor errors at each boundary, how every catch must record, map or rethrow, and how to keep Results from being silently dropped.
The workflow walks the agent through a shared Result module, one failure family per boundary, message tables keyed by kind for translated UI, and a global error net that catches unhandled rejections and render errors with a recording root error boundary. It also covers rules that stop error paths from deleting or resetting user data and keep form input after a failed save.
The skill ships two zero-dependency checkers that scan the code for these rules, and it expects a TypeScript codebase with Jest, ESLint and an i18n catalog setup. Its companion skills cover the surrounding app structure, persistence and crash reporting.
When your agent uses it
Builds a typed Result spine - failures converted at boundaries, exhaustive handling. Use when writing try/catch, .catch or a Result, or fixing swallowed errors or unhandled rejections. Not for error UI (ui-states-and-feedback).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Runs JavaScript and TypeScript scripts(see the files on GitHub)
- Network calls found in its scripts(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 56 files (520 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the react-native plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add zakariaf/ReactNative-Skills
/plugin install react-native@react-native-skillsOr copy only this skill to ~/.claude/skills/error-handling-typed-results:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/error-handling-typed-results &&
cp -R "$tmp/skills/error-handling-typed-results" ~/.claude/skills/error-handling-typed-results &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/error-handling-typed-results inside it instead.
Copy the skill folder to ~/.agents/skills/error-handling-typed-results to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/error-handling-typed-results &&
cp -R "$tmp/skills/error-handling-typed-results" ~/.agents/skills/error-handling-typed-results &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/error-handling-typed-results inside it instead.
Copy the skill folder to ~/.cursor/skills/error-handling-typed-results to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/error-handling-typed-results &&
cp -R "$tmp/skills/error-handling-typed-results" ~/.cursor/skills/error-handling-typed-results &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/error-handling-typed-results inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/zakariaf/ReactNative-Skills.git --path skills/error-handling-typed-resultsOr copy the folder to ~/.gemini/skills/error-handling-typed-results yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/error-handling-typed-results:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/error-handling-typed-results &&
cp -R "$tmp/skills/error-handling-typed-results" ~/.copilot/skills/error-handling-typed-results &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/error-handling-typed-results inside it instead.
Get the folder:
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.gitThen copy ReactNative-Skills/skills/error-handling-typed-results into your agent's skills folder as error-handling-typed-results. Agents that support SKILL.md read one folder per skill.
What it does
- Typed Result module
- Provides one Result type with ok, err, attempt and attemptAsync helpers shared from the core layer.
- Kind-based failure design
- Guides designing failure families as kebab-case kinds with typed parameters rather than strings or Error objects.
- Boundary conversion rules
- Explains converting vendor errors such as SQLite or fetch failures once at adapters and repositories.
- Exhaustive failure handling
- Covers switch statements and typed record tables so new failure kinds fail compilation where handled.
- Global error net
- Installs a single handler for unhandled rejections and render errors that records unexpected failures.
- Data-safe error paths
- Rules against deleting or resetting data in catch blocks and for keeping user input after a failed write.
Good for
- Convert SQLite errors into typed storage failures in a React Native app
- Replace try/catch blocks that swallow errors with typed Result returns
- Map failure kinds to translated messages for the UI
- Install a global error handler that records unhandled promise rejections
- Add a root error boundary with a single restart button
- Keep a form's input when saving fails
Error handling typed results FAQ
What does Error handling typed results need before it can be used?
It assumes a React Native or Expo TypeScript project with Jest, ESLint and an i18n catalog, and it relies on companion skills for app startup, persistence and the error log port.
Does Error handling typed results add a new Result library?
No. It copies a small in-repo Result module at src/core/result.ts and forbids a second Result type or any result library.
Which AI clients does Error handling typed results work with?
It follows the shared agent skills format, so it works with all supported clients listed on the page.
Does Error handling typed results include automated checks?
Yes. It ships two zero-dependency checker scripts that scan for the rules and print a PASS or FAIL result.
How do I install Error handling typed results in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/error-handling-typed-results to use it in all your projects, or to .claude/skills/error-handling-typed-results in one project. Or install the react-native plugin, which includes it: /plugin marketplace add zakariaf/ReactNative-Skills, then /plugin install react-native@react-native-skills.
Does Error handling typed results run scripts?
Yes. It runs JavaScript and TypeScript scripts. Its scripts contain network calls. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Error handling typed results?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Error handling typed results?
The closest alternatives to Error handling typed results are Error handling, Game session host, TypeScript best practices, Async safety and Debugging and error recovery.
Where this comes from
- Description: from the skill's own SKILL.md.
More from zakariaf/ReactNative-Skills

Turns canvas taps, swipes and drags into typed intents hit-tested on the drawn layout
- Open source
- 16 GitHub stars
- Developer tools

Adds a gated debug menu, debug deep link and simulated clock and offline mode to React
- Open source
- 16 GitHub stars
- Developer tools

Checks React Native code for accessibility labels, touch targets, text scaling
- Open source
- 16 GitHub stars
- Developer tools

Sells a one-time Premium unlock through the App Store and Google Play
- Open source
- 16 GitHub stars
- Finance and payments

Walks an Expo app through an SDK, Xcode or Android toolchain upgrade in one commit
- Open source
- 16 GitHub stars
- Developer tools

Builds React Native forms with one valibot schema, catalog-key errors and keyboard-aware
- Open source
- 16 GitHub stars
- Developer tools



