# M13 domain error

> M13 domain error is an open-source agent skill for developer tools. Guides an agent in designing domain error types, categories, and retry or fallback. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/k1-c/linear-tui/tree/main/.claude/skills/m13-domain-error
- **Repository:** https://github.com/k1-c/linear-tui
- **GitHub stars:** 21
- **License:** MIT
- **Skill name:** m13-domain-error
- **Collection:** https://github.com/k1-c/linear-tui
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill gives the agent a decision framework for error design in Rust-style domain code. It starts from the question of who will handle an error (end user, developer, or operations) and whether recovery is possible, then sorts errors into user-facing, internal, system, transient, and permanent groups with matching responses.

The guidance covers recovery patterns such as retry with exponential backoff, fallback values, circuit breakers, timeouts, and bulkheads, along with a sample thiserror error enum that marks retryable variants and a retry helper built on tokio-retry. It also lists common mistakes and anti-patterns, such as retrying every error, exposing internal details to users, and using string errors.

The skill is a Markdown reference with no scripts. It points to related skills for error basics, concurrency, and domain modeling, and it expects a Rust project that uses thiserror, anyhow, and tokio.

## When your agent uses it

> Use when designing domain error handling. Keywords: domain error, error categorization, recovery strategy, retry, fallback, domain error hierarchy, user-facing vs internal errors, error code design, circuit breaker, graceful degradation, resilience, error context, backoff, retry with backoff, error recovery, transient vs permanent error, 领域错误, 错误分类, 恢复策略, 重试, 熔断器, 优雅降级

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/m13-domain-error)
- [License: MIT](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/m13-domain-error)

## Features

- **Error audience categories:** Sorts errors into user-facing, internal, system, transient, and permanent groups, each with a suggested response.
- **Recovery pattern reference:** Summarizes retry, fallback, circuit breaker, timeout, and bulkhead patterns and when each applies.
- **Rust error hierarchy example:** Shows a thiserror enum separating validation, retryable, and internal errors with an is_retryable check.
- **Retry with backoff example:** Provides an async retry helper using exponential backoff with a delay cap and attempt limit.
- **Common mistakes checklist:** Lists frequent error-handling mistakes such as infinite retries and leaking internal messages, with better alternatives.
- **Trace links to related skills:** Points to neighboring skills for error basics, concurrency, domain modeling, and user-facing APIs.

## Good for

- Design an error type hierarchy for a Rust service
- Decide which failures should be retried and how
- Add exponential backoff retry around a flaky API call
- Plan graceful degradation with cached fallback values
- Review error handling for leaked internal details

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/m13-domain-error` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/m13-domain-error &&
cp -R "$tmp/.claude/skills/m13-domain-error" ~/.claude/skills/m13-domain-error &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/m13-domain-error` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/m13-domain-error` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/m13-domain-error &&
cp -R "$tmp/.claude/skills/m13-domain-error" ~/.agents/skills/m13-domain-error &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/m13-domain-error` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/m13-domain-error` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/m13-domain-error &&
cp -R "$tmp/.claude/skills/m13-domain-error" ~/.cursor/skills/m13-domain-error &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/m13-domain-error` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/m13-domain-error
```

Or copy the folder to `~/.gemini/skills/m13-domain-error` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/m13-domain-error`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/m13-domain-error &&
cp -R "$tmp/.claude/skills/m13-domain-error" ~/.copilot/skills/m13-domain-error &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/m13-domain-error` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/k1-c/linear-tui.git
```

Then copy `linear-tui/.claude/skills/m13-domain-error` into your agent's skills folder as `m13-domain-error`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does M13 domain error run any scripts?

No. The skill is a single SKILL.md file with reference guidance and code examples, and it ships no scripts.

### What language does the skill assume?

Its examples are in Rust and reference thiserror, anyhow, tokio, tokio-retry, and failsafe-rs.

### When does the skill trigger?

It is meant for tasks about designing domain error handling, and its frontmatter lists keywords such as retry, backoff, circuit breaker, and error categorization.

### How do I install M13 domain error in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/m13-domain-error to use it in all your projects, or to .claude/skills/m13-domain-error in one project.

### Does M13 domain error run scripts?

No. It is instructions only, with no scripts. 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 M13 domain error?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to M13 domain error?

The closest alternatives to M13 domain error are M06 error handling, Error handling, M09 domain, Go error handling and M03 mutability.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [M06 error handling](https://ai-powered.com/skills/m06-error-handling): M06 error handling is an open-source agent skill for developer tools.
- [Error handling](https://ai-powered.com/skills/error-handling): Error handling is an open-source agent skill for developer tools.
- [M09 domain](https://ai-powered.com/skills/m09-domain): M09 domain is an open-source agent skill for developer tools.
- [Go error handling](https://ai-powered.com/skills/go-error-handling): Go error handling is an open-source agent skill for developer tools.
- [M03 mutability](https://ai-powered.com/skills/m03-mutability): M03 mutability is an open-source agent skill for developer tools.
- [M04 zero cost](https://ai-powered.com/skills/m04-zero-cost): M04 zero cost is an open-source agent skill for developer tools.
- [M11 ecosystem](https://ai-powered.com/skills/m11-ecosystem): M11 ecosystem is an open-source agent skill for developer tools.
- [M01 ownership](https://ai-powered.com/skills/m01-ownership): M01 ownership is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/m13-domain-error
