attio-rate-limits
Handle Attio API rate limits with exponential backoff, queue-based throttling, and Retry-After header parsing. Trigger: "attio rate limit", "attio 429", "attio throttling", "attio retry", "attio backoff", "attio too many requests".
Best use case
attio-rate-limits is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Handle Attio API rate limits with exponential backoff, queue-based throttling, and Retry-After header parsing. Trigger: "attio rate limit", "attio 429", "attio throttling", "attio retry", "attio backoff", "attio too many requests".
Teams using attio-rate-limits should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/attio-rate-limits/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How attio-rate-limits Compares
| Feature / Agent | attio-rate-limits | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Handle Attio API rate limits with exponential backoff, queue-based throttling, and Retry-After header parsing. Trigger: "attio rate limit", "attio 429", "attio throttling", "attio retry", "attio backoff", "attio too many requests".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Attio Rate Limits
## Overview
Attio uses a **sliding window algorithm** with a **10-second window**. Rate limit scores are summed across all apps and access tokens hitting the API. When exceeded, you get HTTP 429 with a `Retry-After` header containing a date (usually the next second). Attio may temporarily reduce limits during incidents.
## Rate Limit Response
```
HTTP/1.1 429 Too Many Requests
Retry-After: Sat, 22 Mar 2025 14:30:01 GMT
Content-Type: application/json
{
"status_code": 429,
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded, please try again later"
}
```
**Key fact:** The `Retry-After` header is a date string (not seconds). Parse it as a Date to calculate wait time.
## Instructions
### Step 1: Parse Retry-After Header
```typescript
function parseRetryAfter(headers: Headers): number {
const retryAfter = headers.get("Retry-After");
if (!retryAfter) return 1000; // Default 1s
// Attio sends a date string
const retryDate = new Date(retryAfter);
const waitMs = retryDate.getTime() - Date.now();
return Math.max(waitMs, 100); // Minimum 100ms
}
```
### Step 2: Exponential Backoff with Retry-After Awareness
```typescript
import { AttioApiError } from "./client";
interface RetryConfig {
maxRetries: number;
baseMs: number;
maxMs: number;
}
async function withRateLimitRetry<T>(
operation: () => Promise<{ data: T; headers?: Headers }>,
config: RetryConfig = { maxRetries: 5, baseMs: 1000, maxMs: 30000 }
): Promise<T> {
for (let attempt = 0; attempt <= config.maxRetries; attempt++) {
try {
const result = await operation();
return result.data;
} catch (err) {
if (attempt === config.maxRetries) throw err;
if (err instanceof AttioApiError) {
if (!err.retryable) throw err; // Only retry 429 and 5xx
// Use Retry-After if available, otherwise exponential backoff
const backoff = config.baseMs * Math.pow(2, attempt);
const jitter = Math.random() * 500;
const delay = Math.min(backoff + jitter, config.maxMs);
console.warn(
`Attio ${err.statusCode} on attempt ${attempt + 1}/${config.maxRetries}. ` +
`Retrying in ${delay.toFixed(0)}ms...`
);
await new Promise((r) => setTimeout(r, delay));
} else {
throw err;
}
}
}
throw new Error("Unreachable");
}
```
### Step 3: Queue-Based Throttling
Prevent 429s proactively by limiting concurrency and request rate:
```typescript
import PQueue from "p-queue";
// Attio: sliding 10-second window. Stay well under the limit.
const attioQueue = new PQueue({
concurrency: 5, // Max parallel requests
interval: 1000, // 1 second interval
intervalCap: 8, // Max 8 requests per second
});
async function throttledAttioCall<T>(
operation: () => Promise<T>
): Promise<T> {
return attioQueue.add(operation) as Promise<T>;
}
// Usage
const results = await Promise.all(
recordIds.map((id) =>
throttledAttioCall(() =>
client.get(`/objects/people/records/${id}`)
)
)
);
```
### Step 4: Rate Limit Monitor
```typescript
class AttioRateLimitMonitor {
private windowStart = Date.now();
private requestCount = 0;
recordRequest(responseHeaders?: Headers): void {
const now = Date.now();
// Reset counter every 10 seconds (Attio's sliding window)
if (now - this.windowStart > 10000) {
this.windowStart = now;
this.requestCount = 0;
}
this.requestCount++;
}
shouldThrottle(threshold = 0.8): boolean {
// Conservative: throttle at 80% of observed capacity
return this.requestCount > 50 * threshold; // Adjust 50 based on your limit
}
getStats(): { requestsInWindow: number; windowAgeMs: number } {
return {
requestsInWindow: this.requestCount,
windowAgeMs: Date.now() - this.windowStart,
};
}
}
```
### Step 5: Batch Operations to Reduce Request Count
```typescript
// Instead of N individual GET calls, use the query endpoint (1 POST)
// BAD: N requests
for (const email of emails) {
await client.post("/objects/people/records/query", {
filter: { email_addresses: email },
limit: 1,
});
}
// GOOD: 1 request with $in filter
const results = await client.post("/objects/people/records/query", {
filter: {
email_addresses: {
email_address: { $in: emails },
},
},
limit: emails.length,
});
```
### Step 6: Circuit Breaker for Sustained Rate Limiting
```typescript
class AttioCircuitBreaker {
private failures = 0;
private lastFailure = 0;
private state: "closed" | "open" | "half-open" = "closed";
private readonly threshold = 5; // Open after 5 consecutive 429s
private readonly resetMs = 30000; // Try again after 30s
async execute<T>(operation: () => Promise<T>): Promise<T> {
if (this.state === "open") {
if (Date.now() - this.lastFailure > this.resetMs) {
this.state = "half-open";
} else {
throw new Error("Circuit open: Attio rate limited. Retry after 30s.");
}
}
try {
const result = await operation();
this.failures = 0;
this.state = "closed";
return result;
} catch (err) {
if (err instanceof AttioApiError && err.statusCode === 429) {
this.failures++;
this.lastFailure = Date.now();
if (this.failures >= this.threshold) {
this.state = "open";
}
}
throw err;
}
}
}
```
## Error Handling
| Symptom | Cause | Solution |
|---------|-------|----------|
| Burst of 429s on startup | No throttling | Add `PQueue` with `intervalCap` |
| 429s during bulk import | Too many parallel requests | Reduce concurrency, batch with query |
| Intermittent 429s | Multiple apps sharing limit | Coordinate rate across apps |
| 429s after long silence | Attio reduced limit during incident | Check `status.attio.com`, honor `Retry-After` |
## Resources
- [Attio Rate Limiting Guide](https://docs.attio.com/rest-api/guides/rate-limiting)
- [p-queue Documentation](https://github.com/sindresorhus/p-queue)
- [Attio Status Page](https://status.attio.com)
## Next Steps
For security best practices, see `attio-security-basics`.Related Skills
workhuman-rate-limits
Workhuman rate limits for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman rate limits".
wispr-rate-limits
Wispr Flow rate limits for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr rate limits".
windsurf-rate-limits
Understand and manage Windsurf credit system, usage limits, and model selection. Use when running out of credits, optimizing AI usage costs, or understanding the credit-per-model pricing structure. Trigger with phrases like "windsurf credits", "windsurf rate limit", "windsurf usage", "windsurf out of credits", "windsurf model costs".
webflow-rate-limits
Handle Webflow Data API v2 rate limits — per-key limits, Retry-After headers, exponential backoff, request queuing, and bulk endpoint optimization. Use when hitting 429 errors, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "webflow rate limit", "webflow throttling", "webflow 429", "webflow retry", "webflow backoff", "webflow too many requests".
vercel-rate-limits
Handle Vercel API rate limits, implement retry logic, and configure WAF rate limiting. Use when hitting 429 errors, implementing retry logic, or setting up rate limiting for your Vercel-deployed API endpoints. Trigger with phrases like "vercel rate limit", "vercel throttling", "vercel 429", "vercel retry", "vercel backoff", "vercel WAF rate limit".
veeva-rate-limits
Veeva Vault rate limits for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva rate limits".
vastai-rate-limits
Handle Vast.ai API rate limits with backoff and request optimization. Use when encountering 429 errors, implementing retry logic, or optimizing API request throughput. Trigger with phrases like "vastai rate limit", "vastai throttling", "vastai 429", "vastai retry", "vastai backoff".
twinmind-rate-limits
Implement TwinMind rate limiting, backoff, and optimization patterns. Use when handling rate limit errors, implementing retry logic, or optimizing API request throughput for TwinMind. Trigger with phrases like "twinmind rate limit", "twinmind throttling", "twinmind 429", "twinmind retry", "twinmind backoff".
together-rate-limits
Together AI rate limits for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together rate limits".
techsmith-rate-limits
TechSmith rate limits for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith rate limits".
supabase-rate-limits
Manage Supabase rate limits and quotas across all plan tiers. Use when hitting 429 errors, configuring connection pooling, optimizing API throughput, or understanding tier-specific quotas for Auth, Storage, Realtime, and Edge Functions. Trigger: "supabase rate limit", "supabase 429", "supabase throttle", "supabase quota", "supabase connection pool", "supabase too many requests".
stackblitz-rate-limits
WebContainer resource limits: memory, CPU, file system size, process count. Use when working with WebContainers or StackBlitz SDK. Trigger: "webcontainer limits".