Agent skill

Error Patterns

by athola in athola/claude-night-market

Provides error classification, recovery, and graceful-degradation patterns.

MITAuto-check passedDevelopment

Install Error Patterns

skills CLI
$ npx skills add athola/claude-night-market --skill error-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market error-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/leyline/skills/error-patterns .claude/skills/error-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
error-patterns
GitHub stars
342
Token cost
~969 tokens
SKILL.md length
244 words
Files
4
Skills in repo
160
Repo updated
First seen
Licence
MIT

At a glance

Provides error classification, recovery, and graceful-degradation patterns.

  • Implementing error handling
  • SKILL.md covers Overview, When To Use, When NOT To Use and Error Classification, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Debugging resilience failures in any skill

What it does

Error Patterns is an agent skill from athola/claude-night-market. Provides error classification, recovery, and graceful-degradation patterns. Use when implementing error handling or debugging resilience failures in any skill.

Its SKILL.md is about 970 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `modules/agent-damage-control.md`, `modules/classification.md` and `modules/recovery-strategies.md`).

It sits in Development, covering Error handling and Debugging. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Implementing error handling
  • Debugging resilience failures in any skill

Example prompts

  • “Use the error-patterns skill to provide error classification, recovery, and graceful-degradation patterns”
  • “/error-patterns”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Error Patterns loads about 969 tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 244 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~969

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 244 words, ~969 tokens.

Download SKILL.mdSave it as .claude/skills/error-patterns/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
error-patterns
description
Provides error classification, recovery, and graceful-degradation patterns. Use when implementing error handling or debugging resilience failures in any skill.
alwaysApply
false
category
infrastructure
tags
errors, error-handling, recovery, resilience, debugging
dependencies
usage-logging
provides.infrastructure
error-handling, error-classification, recovery
provides.patterns
graceful-degradation, error-logging, debugging
usage_patterns
error-handling, resilience-patterns, debugging-workflows
complexity
beginner
model_hint
fast
estimated_tokens
450

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
python
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
python
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
python
@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

yaml
# 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

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in plugins/leyline/skills/error-patterns of athola/claude-night-market.

  • SKILL.md
  • modules/agent-damage-control.md
  • modules/classification.md
  • modules/recovery-strategies.md

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Error Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Error Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Error Patterns this skillathola/claude-night-market342—~969Automated safety check: PassMIT
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Python Script Runnercongchuanling-dot/Cohort199—~577Automated safety check: NotesMIT
Error Handling FundamentalsDanielPodolsky/ownyourcode2901 repos~1.5kAutomated safety check: PassMIT
Smart File Writerforyourhealth111-pixel/Vibe-Skills3.6k—~2.6kAutomated safety check: PassApache-2.0
Batch Filesgithub/awesome-copilot40k1 repos~4.3kAutomated safety check: PassMIT

Similar skills

  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Python Script Runner

    congchuanling-dot/Cohort

    Runs a Python script with checks first: confirms the interpreter version, compiles it for syntax errors, verifies imports, then explains any traceback in plain language.

    199 GitHub stars~577 tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Error Handling Fundamentals

    DanielPodolsky/ownyourcode

    Guides error handling for async operations and API calls. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed
  • Smart File Writer

    foryourhealth111-pixel/Vibe-Skills

    Diagnoses why a file write failed (permissions, disk space, path length, locks, read-only mounts) before retrying, instead of repeating the same call blindly.

    3.6k GitHub stars~2.6k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Batch Files

    github/awesome-copilot

    Official

    Expert-level Windows batch file (.bat/.cmd) skill for writing, debugging, and maintaining CMD scripts.

    40k GitHub starsUsed in 1 repo~4.3k tokens
    DevelopmentAuto-check passed
  • Golang Samber Oops

    context-labs/whip

    Structured error handling in Golang with samber/oops — error builders, stack traces, codes, context, wrapping, attributes, user-facing vs developer messages, panic recovery, logger integration.

    1.1k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed

More from athola/claude-night-market

All 160 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    342 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    342 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    342 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    342 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    342 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    342 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Error Patterns

What does Error Patterns do?

Provides error classification, recovery, and graceful-degradation patterns. Error Patterns is an agent skill from athola/claude-night-market. Provides error classification, recovery, and graceful-degradation patterns.

When should I use Error Patterns?

Error Patterns fits situations like: implementing error handling; debugging resilience failures in any skill.

How do I install Error Patterns in Claude Code?

Run `npx skills add athola/claude-night-market --skill error-patterns -a claude-code`. Or copy the skill folder (plugins/leyline/skills/error-patterns in athola/claude-night-market) into .claude/skills/error-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Error Patterns in Codex?

Run `npx skills add athola/claude-night-market --skill error-patterns -a codex`. Or copy the skill folder (plugins/leyline/skills/error-patterns in athola/claude-night-market) into .agents/skills/error-patterns in your project. Codex loads it when a task matches its description.

Can I use Error Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill error-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-patterns, .gemini/skills/error-patterns, .github/skills/error-patterns and .opencode/skills/error-patterns in your project.

What does Error Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Error Patterns is instructions for the agent only. Our summary lists: Python 3.

Does Error Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Error Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Error Patterns use?

Error Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Error Patterns use?

About 969 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Error Patterns?

Skills that share tags, products or a category with Error Patterns: Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Python Script Runner (congchuanling-dot/Cohort, 199 stars), Error Handling Fundamentals (DanielPodolsky/ownyourcode, 290 stars) and Smart File Writer (foryourhealth111-pixel/Vibe-Skills, 3.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Error Patterns?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 342 GitHub stars. The repository holds 160 skills in this directory. The repository was last updated on October 6, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.