m13-domain-error — community m13-domain-error, durable-streams-reference, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Rust-based AI Agents needing robust error handling and domain-specific error analysis Reference implementation of the Durable Streams protocol in Rust, built with axum and tokio. Supports streaming reads (long-poll, SSE), producer idempotency, JSON batch mode, TTL

thesampaton thesampaton
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The m13-domain-error skill by thesampaton is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Rust-based AI Agents needing robust error handling and domain-specific error analysis

Core Value

Empowers agents to categorize and recover from errors using a comprehensive error strategy, supporting streaming reads, producer idempotency, and JSON batch mode with libraries like axum and tokio

Capabilities Granted for m13-domain-error

Debugging internal errors with context
Guiding user action for user-facing errors
Implementing idempotent producers for durable streams

! Prerequisites & Limits

  • Requires Rust programming language
  • Built with axum and tokio libraries
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

m13-domain-error

Install m13-domain-error, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

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 TypeAudienceRecoveryExample
User-facingEnd usersGuide actionInvalidEmail, NotFound
InternalDevelopersDebug infoDatabaseError, ParseError
SystemOps/SREMonitor/alertConnectionTimeout, RateLimited
TransientAutomationRetryNetworkError, ServiceUnavailable
PermanentHumanInvestigateConfigInvalid, 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-web or project requirements
    ↑ Check: SLA (availability requirements)
QuestionTrace ToAsk
Retry policydomain-webWhat's acceptable latency for retry?
User experiencedomain-webWhat message should users see?
ComplianceProject requirementsWhat 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 PatternWhenImplementation
RetryTransient failuresexponential backoff
FallbackDegraded modecached/default value
Circuit BreakerCascading failuresfailsafe-rs
TimeoutSlow operationstokio::time::timeout
BulkheadIsolationseparate thread pools

Error Hierarchy

rust
1#[derive(thiserror::Error, Debug)] 2pub enum AppError { 3 // User-facing 4 #[error("Invalid input: {0}")] 5 Validation(String), 6 7 // Transient (retryable) 8 #[error("Service temporarily unavailable")] 9 ServiceUnavailable(#[source] reqwest::Error), 10 11 // Internal (log details, show generic) 12 #[error("Internal error")] 13 Internal(#[source] anyhow::Error), 14} 15 16impl AppError { 17 pub fn is_retryable(&self) -> bool { 18 matches!(self, Self::ServiceUnavailable(_)) 19 } 20}

Retry Pattern

rust
1use tokio_retry::{Retry, strategy::ExponentialBackoff}; 2 3async fn with_retry<F, Fut, T, E>(f: F) -> Result<T, E> 4where 5 F: Fn() -> Fut, 6 Fut: Future<Output = Result<T, E>>, 7 E: std::fmt::Debug, 8{ 9 let strategy = ExponentialBackoff::from_millis(100) 10 .max_delay(Duration::from_secs(10)) 11 .take(5); 12 13 Retry::spawn(strategy, || f()).await 14}

Common Mistakes

MistakeWhy WrongBetter
Same error for allNo actionabilityCategorize by audience
Retry everythingWasted resourcesOnly transient errors
Infinite retryDoS selfMax attempts + backoff
Expose internal errorsSecurity riskUser-friendly messages
No contextHard to debug.context() everywhere

Anti-Patterns

Anti-PatternWhy BadBetter
String errorsNo structurethiserror types
panic! for recoverableBad UXResult with context
Ignore errorsSilent failuresLog or propagate
Box<dyn Error> everywhereLost type infothiserror
Error in happy pathPerformanceEarly validation

WhenSee
Error handling basicsm06-error-handling
Retry implementationm07-concurrency
Domain modelingm09-domain
User-facing APIsdomain-web

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is m13-domain-error?

Perfect for Rust-based AI Agents needing robust error handling and domain-specific error analysis Reference implementation of the Durable Streams protocol in Rust, built with axum and tokio. Supports streaming reads (long-poll, SSE), producer idempotency, JSON batch mode, TTL

How do I install m13-domain-error?

Run the command: npx killer-skills add thesampaton/durable-streams-reference. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for m13-domain-error?

Key use cases include: Debugging internal errors with context, Guiding user action for user-facing errors, Implementing idempotent producers for durable streams.

Which IDEs are compatible with m13-domain-error?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for m13-domain-error?

Requires Rust programming language. Built with axum and tokio libraries.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add thesampaton/durable-streams-reference. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use m13-domain-error immediately in the current project.

Related Skills

Looking for an alternative to m13-domain-error or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI