SkillAgentSearch skills...

m13-domain-error

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…

Install / Use

npx skills add actionbook/rust-skills --skill m13-domain-error

Installs into whichever agent you are using.

About this skill
πŸ“„

SKILL.md

Installable skill definition

Quality Score

89/100

Supported Platforms

Universal

Our assessment of m13-domain-error

m13-domain-error scores 89/100 on our quality scale, 1636th of 4,700 Development & Engineering skills we index (top 35%).

Its SKILL.md is 4.7 KB long, well organised into 12 sections with 4 code examples: a solid amount of guidance for an agent.

With 1,479 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
26/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 3 months ago, so m13-domain-error is actively maintained.
  • Our last check on 2026-10-31 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit β€” read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-03. Automated pattern scan on 2026-10-03. It catches known dangerous patterns, not every risk β€” read a skill before letting an agent act on it.

m13-domain-error compared with similar skills

All 4 of these similar skills score higher than m13-domain-error; compare them before choosing.

SkillScoreStarsUpdatedFormat
m13-domain-error (this skill)by actionbook891.5k3mo agoSKILL.md
taste-skillby Leonxlnx100116.8k8d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10072.1ktodayCLAUDE.md
claude-howtoby luongnv8910047.3k2d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.7k7d agoCLAUDE.md

Frequently asked questions

How do I install m13-domain-error?
Run npx skills add actionbook/rust-skills --skill m13-domain-error. The install tabs above show the steps for each supported agent.
Which AI agents does m13-domain-error work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is m13-domain-error safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is m13-domain-error still maintained?
The repository was last updated about 3 months ago, so m13-domain-error is actively maintained.

name: m13-domain-error description: "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, ι’†εŸŸι”™θ――, ι”™θ――εˆ†η±», 恒倍策η•₯, 重试, 熔断器, δΌ˜ι›…ι™ηΊ§" user-invocable: false

Domain Error Strategy

Layer 2: Design Choices

Core Question

Who needs to handle this error, and how should they recover?

Before designing error types:

  • Is this user-facing or internal?
  • Is recovery possible?
  • What context is needed for debugging?

Error Categorization

| Error Type | Audience | Recovery | Example | |------------|----------|----------|---------| | User-facing | End users | Guide action | InvalidEmail, NotFound | | Internal | Developers | Debug info | DatabaseError, ParseError | | System | Ops/SRE | Monitor/alert | ConnectionTimeout, RateLimited | | Transient | Automation | Retry | NetworkError, ServiceUnavailable | | Permanent | Human | Investigate | ConfigInvalid, DataCorrupted |


Thinking Prompt

Before designing error types:

  1. Who sees this error?

    • End user β†’ friendly message, actionable
    • Developer β†’ detailed, debuggable
    • Ops β†’ structured, alertable
  2. Can we recover?

    • Transient β†’ retry with backoff
    • Degradable β†’ fallback value
    • Permanent β†’ fail fast, alert
  3. What context is needed?

    • Call chain β†’ anyhow::Context
    • Request ID β†’ structured logging
    • Input data β†’ error payload

Trace Up ↑

To domain constraints (Layer 3):

"How should I handle payment failures?"
    ↑ Ask: What are the business rules for retries?
    ↑ Check: domain-fintech (transaction requirements)
    ↑ Check: SLA (availability requirements)

| Question | Trace To | Ask | |----------|----------|-----| | Retry policy | domain-* | What's acceptable latency for retry? | | User experience | domain-* | What message should users see? | | Compliance | domain-* | What must be logged for audit? |


Trace Down ↓

To implementation (Layer 1):

"Need typed errors"
    ↓ m06-error-handling: thiserror for library
    ↓ m04-zero-cost: Error enum design

"Need error context"
    ↓ m06-error-handling: anyhow::Context
    ↓ Logging: tracing with fields

"Need retry logic"
    ↓ m07-concurrency: async retry patterns
    ↓ Crates: tokio-retry, backoff

Quick Reference

| Recovery Pattern | When | Implementation | |------------------|------|----------------| | Retry | Transient failures | exponential backoff | | Fallback | Degraded mode | cached/default value | | Circuit Breaker | Cascading failures | failsafe-rs | | Timeout | Slow operations | tokio::time::timeout | | Bulkhead | Isolation | separate thread pools |

Error Hierarchy

#[derive(thiserror::Error, Debug)]
pub enum AppError {
    // User-facing
    #[error("Invalid input: {0}")]
    Validation(String),

    // Transient (retryable)
    #[error("Service temporarily unavailable")]
    ServiceUnavailable(#[source] reqwest::Error),

    // Internal (log details, show generic)
    #[error("Internal error")]
    Internal(#[source] anyhow::Error),
}

impl AppError {
    pub fn is_retryable(&self) -> bool {
        matches!(self, Self::ServiceUnavailable(_))
    }
}

Retry Pattern

use tokio_retry::{Retry, strategy::ExponentialBackoff};

async fn with_retry<F, T, E>(f: F) -> Result<T, E>
where
    F: Fn() -> impl Future<Output = Result<T, E>>,
    E: std::fmt::Debug,
{
    let strategy = ExponentialBackoff::from_millis(100)
        .max_delay(Duration::from_secs(10))
        .take(5);

    Retry::spawn(strategy, || f()).await
}

Common Mistakes

| Mistake | Why Wrong | Better | |---------|-----------|--------| | Same error for all | No actionability | Categorize by audience | | Retry everything | Wasted resources | Only transient errors | | Infinite retry | DoS self | Max attempts + backoff | | Expose internal errors | Security risk | User-friendly messages | | No context | Hard to debug | .context() everywhere |


Anti-Patterns

| Anti-Pattern | Why Bad | Better | |--------------|---------|--------| | String errors | No structure | thiserror types | | panic! for recoverable | Bad UX | Result with context | | Ignore errors | Silent failures | Log or propagate | | Box<dyn Error> everywhere | Lost type info | thiserror | | Error in happy path | Performance | Early validation |


Related Skills

| When | See | |------|-----| | Error handling basics | m06-error-handling | | Retry implementation | m07-concurrency | | Domain modeling | m09-domain | | User-facing APIs | domain-* |

Related Skills

View on GitHub
GitHub Stars1.5k
CategoryDevelopment
Updated2mo ago
Forks114

Languages

Shell

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit β€” see the Safety scan above for what the skill file itself contains.

1 medium
m13-domain-error β€” Universal Skill: Install & Safety Check | SkillAgent