Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Error Patterns

  • 93 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

error-patterns is an agent skill that defines multi-agent error categories, first actions, and a three-tier escalation ladder from self-recovery to human handoff.

About

Agent Damage Control (error-patterns) is a Claude Night Market skill that gives solo builders and small teams a shared vocabulary for multi-agent failures. Instead of treating every stall as a generic retry, it classifies issues like agent crashes, context overflow, merge conflicts after parallel edits, and mixed partial failures—each with a first-action table. A three-tier escalation ladder keeps recovery cheap at the agent level, escalates to a lead coordinator after repeated failure, and brings a human in only when severity or deadlock demands it. The patterns extend familiar transient versus permanent error thinking into agent coordination, which matters when you run several specialized agents on one repo. Use it whenever parallel agent work risks file conflicts or silent truncation, not only after incidents in production monitoring.

  • Four agent error categories mapped from service-level taxonomy (crash, context overflow, merge conflict, partial failure
  • Three-tier escalation: self-recovery → lead agent → human with full context
  • Merge-conflict playbook: stop parallel work, resolve, then resume
  • Heartbeat and reassignment guidance when an agent stops responding
  • Truncation handling via summarize state and continuation handoff

Error Patterns by the numbers

  • 93 all-time installs (skills.sh)
  • Ranked #4,673 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill error-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs93
repo stars325
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Recover gracefully when multiple coding agents crash, overflow context, or conflict on files using a defined escalation ladder.

Who is it for?

Best when you're orchestrating multiple agents on one codebase and need merge-conflict stops and crash reassignment without ad-hoc firefighting.

Skip if: Single-threaded one-agent sessions with no parallelism, or pure application runtime errors with no agent coordination angle.

When should I use this skill?

Multi-agent work hits crashes, context limits, file conflicts, truncation, or partial completion and you need categorized first actions and escalation.

What you get

You classify the failure, run the tier-1 playbook (retry, context shed, or conflict stop), escalate to lead reassignment or human review with a state summary when automated recovery fails twice.

  • Classified error category and recommended first action
  • Escalation tier decision with context summary for human handoff
  • Conflict-resolution stop/resume checklist for parallel agents

By the numbers

  • 4 agent-level error categories with mapped service equivalents
  • 3-tier escalation ladder with handoff after 2 failed self-recovery attempts

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Error Patterns

Overview

Standardized error handling patterns for consistent, production-grade behavior across plugins. Provides error classification, recovery strategies, and debugging workflows.

When To Use

  • Building resilient integrations
  • Need consistent error handling
  • Want graceful degradation
  • Debugging production issues

When NOT To Use

  • Project doesn't use the leyline infrastructure patterns
  • Simple scripts without service architecture needs

Error Classification

By Severity

LevelActionExample
CriticalHalt, alertAuth failure, service down
ErrorRetry or secondary strategyRate limit, timeout
WarningLog, continuePartial results, deprecation
InfoLog onlyNon-blocking issues

By Recoverability

class ErrorCategory(Enum):
    TRANSIENT = "transient"      # Retry likely to succeed
    PERMANENT = "permanent"       # Retry won't help
    CONFIGURATION = "config"      # User action needed
    RESOURCE = "resource"         # Quota/limit issue

Verification: Run the command with --help flag to verify availability.

Quick Start

Standard Error Handler

from leyline.error_patterns import handle_error, ErrorCategory

try:
    result = service.execute(prompt)
except RateLimitError as e:
    return handle_error(e, ErrorCategory.RESOURCE, {
        "retry_after": e.retry_after,
        "service": "gemini"
    })
except AuthError as e:
    return handle_error(e, ErrorCategory.CONFIGURATION, {
        "action": "Run 'gemini auth login'"
    })

Verification: Run the command with --help flag to verify availability.

Error Result

@dataclass
class ErrorResult:
    category: ErrorCategory
    message: str
    recoverable: bool
    suggested_action: str
    metadata: dict

Verification: Run the command with --help flag to verify availability.

Common Patterns

Authentication Errors (401/403)

  • Verify credentials exist
  • Check token expiration
  • Validate permissions/scopes
  • Suggest re-authentication

Rate Limit Errors (429)

  • Extract retry-after header
  • Log for quota tracking
  • Implement backoff
  • Consider alternative service

Timeout Errors

  • Increase timeout for retries
  • Break into smaller requests
  • Use async patterns
  • Consider different model

Context Too Large (400)

  • Estimate tokens before request
  • Split into multiple requests
  • Reduce input content
  • Use larger context model

Integration Pattern

# In your skill's frontmatter
dependencies: [leyline:error-patterns]

Verification: Run the command with --help flag to verify availability.

Detailed Resources

  • Classification: See modules/classification.md for error taxonomy
  • Recovery: See modules/recovery-strategies.md for handling patterns
  • Agent Damage Control: See modules/agent-damage-control.md for multi-agent error recovery and escalation

Exit Criteria

  • Error classified correctly
  • Appropriate recovery attempted
  • User-actionable message provided
  • Error logged for debugging

Related skills

How it compares

Use for agent-team incident response—not as a substitute for application error monitoring or Sentry-style stack traces.

FAQ

Who is error-patterns for?

Developers and leads running multi-agent Claude or Cursor workflows who need structured recovery when agents conflict, crash, or lose context.

When should I use error-patterns?

During Build when parallel agents edit the same repo; during Ship when merge conflicts appear after automated review branches; during Operate when agents hang, truncate, or partially complete coordinated tasks.

Is error-patterns safe to install?

It is guidance-only; review the Security Audits panel on this page and ensure escalation steps do not auto-run destructive git commands without your approval.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.