api-rate-limiting

Implement retry logic, circuit breakers, and rate limiting for external API calls.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Naw3/skillsrepo --skill api-rate-limiting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-rate-limiting
Source: https://github.com/Naw3/skillsrepo/tree/main/api-rate-limiting
Command: npx skills add https://github.com/Naw3/skillsrepo --skill api-rate-limiting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mitigate unreliable external API calls by providing robust resilience patterns. It helps teams handle transient failures, throttle traffic, and isolate upstream outages.

Core Features & Use Cases

  • Retry logic: Automatically retry transient failures with configurable backoff and jitter.
  • Circuit breakers: Prevent cascading failures by opening the circuit when error rates rise, then half-open to test recovery.
  • Request deduplication: Debounce in-flight identical requests to reduce unnecessary calls and contention.
  • Rate limiting: Enforce token-bucket style limits to protect downstream services and manage throughput.
  • Use Case: A service calling multiple external APIs can apply these patterns to improve reliability and maintain stable latency.

Quick Start

Initialize the resilience components in your service and begin using the provided APIs (Fetch with Retry, Circuit Breaker, Rate Limiter, and Batch Queue) to perform GET/POST requests with built-in fault tolerance.

Frequently Asked Questions about api-rate-limiting

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

FAQPage Schema
How do I handle transient failures and retry external API calls in TypeScript?

To handle transient failures, retry logic automatically reattempts failed external API calls using configurable backoff and jitter. This mitigates unreliable network conditions without crashing your service.

What is a circuit breaker pattern and when do I need it for microservices?

A circuit breaker prevents cascading failures in microservices by stopping requests to an external API when error rates rise. You need it to isolate upstream outages and maintain stable latency by half-opening the circuit to test recovery safely.

How do I enforce rate limiting and prevent exceeding API throughput limits?

You can enforce rate limiting by applying token-bucket style limits to your outbound requests. This controls throughput and protects downstream services from being overwhelmed by excessive traffic during peak operational periods.

Can I deduplicate in-flight identical API requests to reduce contention?

Yes, you can deduplicate in-flight identical requests to debounce redundant API calls. By intercepting duplicate concurrent requests, this mechanism reduces unnecessary network overhead and resource contention on your external services.

What is the best way to batch queue API requests for reliable data pipelines?

The best way to manage reliable data pipelines is using a batch queuing system for your API requests. This approach structures request handling to meet strict reliability and performance requirements during external service communication.

Does this API resilience approach require any external dependencies?

No, this API resilience approach does not require any external dependencies to implement. You can initialize the resilience components directly in your TypeScript service and use the provided APIs for fault-tolerant GET and POST requests.