PlugWiki

python-resilience Skill (wshobson) for Claude: Retries and Timeouts

Makes Claude add retries, exponential backoff, timeouts and fault-tolerant decorators to Python code that calls other services.

Installs
12K
on skills.sh
Stars
42.1K
on GitHub
Files
1
besides SKILL.md
Updated
Oct 2026
last repo commit

python-resilience makes Claude add retry logic to Python code the safe way. It retries only transient errors, backs off exponentially with jitter, caps both the number of attempts and the total time, and logs every retry. Its patterns use the tenacity library with httpx examples.

SKILL.md walks through four basic patterns: a basic retry, retrying only the right errors, retrying on HTTP status codes such as 429, 502, 503 and 504, and combining both. A reference file adds five more: logging retries, a timeout decorator, stacking decorators, dependency injection for tests and fail-safe defaults. The skill bundles no scripts, and its examples use tenacity and httpx, which your project must install.

Good for

  • Python developers calling APIs or services that fail now and then
  • Teams building fault-tolerant microservices
  • Developers who want retry logic kept out of business logic

Install python-resilience

Claude Code

  1. 1

    Copy this prompt.

    Install the python-resilience skill in Claude Code. Run this command:
    
    /plugin marketplace add wshobson/agents
    /plugin install python-development@claude-code-workflows
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

The plugin adds 16 skills, 3 agents and 1 command (counted from the repo). Its marketplace entry lists no hooks or MCP servers. The skills CLI command installs only this skill, without the plugin's agents or commands (the README says so).

From the project README. Source.

What's in the skill

When it loads

Python resilience patterns including automatic retries, exponential backoff, timeouts, and fault-tolerant decorators. Use when adding retry logic, implementing timeouts, building fault-tolerant services, or handling transient failures.

Sections in SKILL.md

  1. When to Use This Skill
  2. Core Concepts
  3. 1. Transient vs Permanent Failures
  4. 2. Exponential Backoff
  5. 3. Jitter
  6. 4. Bounded Retries
  7. Quick Start
  8. Fundamental Patterns
  9. Pattern 1: Basic Retry with Tenacity
  10. Pattern 2: Retry Only Appropriate Errors
  11. Pattern 3: HTTP Status Code Retries
  12. Pattern 4: Combined Exception and Status Retry
  13. Detailed worked examples and patterns
  14. Best Practices Summary

Key facts

Installs on skills.sh
12,021 (Nov 2, 2026)

What it includes

  • Transient vs permanent errors, backoff, jitter and bounded retries.

    Retry network timeouts and temporary service issues; do not retry invalid credentials or bad requests.

    Core concepts

  • Retries on transient errors with exponential backoff and jitter.

    Stops after 5 attempts or 60 seconds, whichever comes first.

    Pattern 1: basic retry with tenacity

  • Whitelist network errors; never retry ValueError, auth errors or most 4xx.

    HTTP 429 is the exception for 4xx responses.

    Pattern 2: retry only the right errors

  • Retries on 429, 502, 503 and 504 responses.

    Uses a check on the response status code.

    Pattern 3: HTTP status code retries

  • Combines both checks and logs a warning before each wait.

    Retries on 429, 500, 502, 503 and 504.

    Pattern 4: exceptions and status together

  • Logging retries, timeout decorator, stacked decorators, injection and safe defaults.

    Read when the main file is not enough.

    Patterns 5 to 9 (references/details.md)

  • Ten rules, such as cap total duration, log every retry and set timeouts everywhere.

    Also covers monitoring retry rates.

    Best practices summary

From the official docs

Questions

What does python-resilience do?

It makes Claude add retries, backoff, timeouts and decorators for failure handling to Python code. It retries only transient errors and caps attempts and total time.

How do I install python-resilience?

Use the install box above. On Claude Code the README route is the python-development plugin, which also adds 15 other skills, 3 agents and a command (counted from the repo). The skills CLI command installs only this skill.

Which libraries does it use?

Its examples use tenacity for retries and httpx for HTTP calls. Your project must have them installed.

Does it need an API key or scripts?

SKILL.md names no API key, and the folder bundles no scripts. It holds SKILL.md and one reference file.

Is it safe to install?

The folder is two markdown files with code examples. The plugin route also adds agents and a command, so install just the skill with the skills CLI if you want the smaller footprint.

When should I not retry?

SKILL.md says never to retry ValueError, TypeError, authentication errors or HTTP 4xx responses other than 429, because those are bugs or permanent failures.

Information

updated Nov 2, 2026

Repository
wshobson/agents
Folder
plugins/python-development/skills/python-resilience

wshobson/agentsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 7
  1. wshobson/agents README · github.com
  2. marketplace.json · github.com
  3. python-development plugin.json · github.com
  4. python-resilience SKILL.md · github.com
  5. details.md · github.com
  6. python-resilience on skills.sh · skills.sh
  7. wshobson/agents · github.com

Updated Nov 2, 2026.