retry-strategy

Implement retry and resilience patterns for Python and TypeScript network clients.

1|Updated Sep 14, 2025
One-click install
npx skills add https://github.com/CleanExpo/DR-NRPG --skill retry-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: retry-strategy
Source: https://github.com/CleanExpo/DR-NRPG/tree/main/.skills/custom/retry-strategy
Command: npx skills add https://github.com/CleanExpo/DR-NRPG --skill retry-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps prevent application failures by implementing sophisticated retry and resilience patterns, ensuring services remain available even when dependencies experience transient issues.

Core Features & Use Cases

  • Exponential Backoff with Jitter: Automatically retries failed operations with increasing delays and random variations to avoid overwhelming services.
  • Circuit Breaker: Prevents cascading failures by temporarily stopping requests to a failing service.
  • Agent Self-Correction: Enables AI agents to learn from failures and adjust their approach on subsequent attempts.
  • Use Case: When your application calls an external API that is experiencing temporary network issues, this Skill will automatically retry the call with increasing delays, eventually succeeding once the API is back online, without manual intervention.

Quick Start

Use the retry-strategy skill to wrap an httpx call to an external API with exponential backoff and jitter.

Frequently Asked Questions about retry-strategy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement exponential backoff with jitter for network requests?

Exponential backoff with jitter automatically retries failed network requests using increasing delays and random variations, preventing your application from overwhelming recovering APIs. This approach ensures calls succeed once transient issues resolve without manual intervention.

When do I need a circuit breaker pattern for fault tolerance?

A circuit breaker is needed for fault tolerance when an external dependency experiences cascading outages. It temporarily stops outgoing requests to a failing service, preventing cascading failures and ensuring your application degrades gracefully under adverse conditions.

Can I use retry patterns with both Python and TypeScript clients?

Yes, retry and resilience patterns can be implemented for network clients using both Python and TypeScript. This allows you to address transient failures, API rate limits, and network issues consistently across different technology stacks within your application.

How do AI agents self-correct after experiencing execution failures?

Agent self-correction enables AI agents to learn from execution failures and adjust their approach on subsequent retry attempts. This mechanism allows autonomous systems to recover from transient errors by modifying their execution strategy dynamically.

What is the best way to handle API rate limits without manual intervention?

The best way to handle API rate limits is using automated retry patterns with exponential backoff. This approach progressively increases delay between retries, eventually succeeding once the API rate limit window resets, ensuring application stability without manual oversight.

Why does retrying failed API calls immediately make outages worse?

Retrying failed API calls immediately worsens outages by overwhelming an already struggling service with synchronized request floods. Implementing exponential backoff with jitter spaces out retries, giving the dependency time to recover and preventing cascading failures.