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-errorInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
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.
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 foundOur 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.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| m13-domain-error (this skill)by actionbook | 89 | 1.5k | 3mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.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.
Skill content
View source on GitHubname: 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:
-
Who sees this error?
- End user β friendly message, actionable
- Developer β detailed, debuggable
- Ops β structured, alertable
-
Can we recover?
- Transient β retry with backoff
- Degradable β fallback value
- Permanent β fail fast, alert
-
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
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code β from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio β 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
