一键导入
http-retry
Universal HTTP retry mechanism with exponential backoff. Use when making API calls that may fail due to network issues, timeouts, or rate limits.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Universal HTTP retry mechanism with exponential backoff. Use when making API calls that may fail due to network issues, timeouts, or rate limits.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Claude Code 无限开发循环技能 - 让 Claude 成为无限开发循环:spec → feature list → implement → test → commit → repeat,跨无限制上下文窗口。
专业 PPT 演示文稿全流程 AI 生成助手。模拟万元/页级别 PPT 设计公司的完整工作流,输出高质量 HTML 演示文稿 + 可编辑矢量 PPTX。
WPS Office 智能助手 - AI编程助手通过自然语言操控WPS Office的MCP工具集。支持Excel(80工具) / Word(24工具) / PPT(111工具) / 通用(9工具)。
小红书内容自动化 — 监控关键词、生成爆款文案、自动发布。 基于 Agent-Reach 实现小红书阅读、搜索、发帖、评论、点赞。 适用于博物馆/文博/文物等垂直领域,也支持通用爆款生成。
Comprehensive Git operations for repository management. Use when working with Git repositories for: - Committing changes (git commit with conventional commits format) - Creating branches (feature, bugfix, hotfix branches) - Stashing changes - Viewing history, diffs, and status - Merging and rebasing - Creating pull requests (GitHub, GitLab) - Undoing commits and changes - Syncing with remote (push, pull, fetch)
Aggregate and summarize AI/LLM/Agent news from multiple sources. Use when user needs latest AI news, GitHub trending, research papers, or daily AI briefing. Supports Hacker News, GitHub Trending, arXiv, and Hugging Face.
| name | http-retry |
| description | Universal HTTP retry mechanism with exponential backoff. Use when making API calls that may fail due to network issues, timeouts, or rate limits. |
| version | 1.0.0 |
Universal HTTP retry mechanism for all outbound API calls.
Exponential Backoff Retry
AbortController Timeout
Connection Pool Reuse
// 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));
}
}
}
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")