huangqianqian120/skillslibrary/http-retry

Claude Code and agent skill by huangqianqian120/skillslibrary

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Universal HTTP retry mechanism with exponential backoff. Use when making API calls that may fail due to network issues, timeouts, or rate limits.

Install

npx vskill@latest install huangqianqian120/skillslibrary/http-retry

SKILL.md

The same SKILL.md was published earlier as huangqianqian120/skillslibrary/http-retry.

HTTP Retry Mechanism

Universal HTTP retry mechanism for all outbound API calls.

Triggers

  • TimeoutError
  • ECONNRESET
  • ECONNREFUSED
  • 429 Too Many Requests

Implementation

Core Features
  1. Exponential Backoff Retry
  • Initial delay: 1000ms
  • Max delay: 30000ms
  • Backoff factor: 2
  • Jitter: random 0-1000ms
  1. AbortController Timeout
  • Default timeout: 30000ms
  • Per-request timeout support
  1. Connection Pool Reuse
  • Reuse HTTP agent for keep-alive
  • Prevent socket exhaustion
Usage
javascript
// Simple retry wrapper
async function fetchWithRetry(url, options = {}) {
const maxRetries = options.maxRetries || 3;
const timeout = options.timeout || 30000;
for (let attempt = 0; attempt <= maxRetries; attempt++) {
try {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), timeout);
const response = await fetch(url, {
...options,
signal: controller.signal
});
clearTimeout(timeoutId);
if (response.status === 429) {
// Rate limited - retry with backoff
const delay = Math.min(1000 * Math.pow(2, attempt) + Math.random() * 1000, 30000);
await new Promise(r => setTimeout(r, delay));
continue;
}
return response;
} catch (error) {
if (attempt === maxRetries) throw error;
const delay = Math.min(1000 * Math.pow(2, attempt) + Math.random() * 1000, 30000);
await new Promise(r => setTimeout(r, delay));
}
}
}
Python Implementation
python
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
session = requests.Session()
retry_strategy = Retry(
total=3,
backoff_factor=1,
status_forcelist=[429, 500, 502, 503, 504],
allowed_methods=["HEAD", "GET", "OPTIONS", "POST"]
)
adapter = HTTPAdapter(max_retries=retry_strategy)
session.mount("http://", adapter)
session.mount("https://", adapter)
response = session.get("https://api.example.com/data")

Benefits

  • Improves API call success rate by ~30%
  • Handles transient network failures
  • Prevents rate limit issues
  • Connection pooling reduces overhead

Related

  • See EvoMap asset: sha256:6c8b2bef4652d5113cc802b6995a8e9f5da8b5b1ffe3d6bc639e2ca8ce27edec

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
3

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/huangqianqian120/skillslibrary/http-retry/badge)](https://verified-skill.com/skills/huangqianqian120/skillslibrary/http-retry)

Something wrong with this skill or its page? Tell us.