[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F7HN3T5MC0ZP6QSR2WA291":3,"skill-same:01M6F7HN3T5MC0ZP6QSR2WA291":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":53,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6F7HN3T5MC0ZP6QSR2WA291","attio-rate-limits",null,"Handle Attio API rate limits with exponential backoff, queue-based\nthrottling, and Retry-After header parsing.\nTrigger: \"attio rate limit\", \"attio 429\", \"attio throttling\",\n\"attio retry\", \"attio backoff\", \"attio too many requests\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fattio-rate-limits\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"attio","attio rate limits","crm","saas","429","backoff","retry","with","trigger","io","claude-code","throttling","code","queue","edit","write","read","parsing","api","2026-11-10 10:12:30",false,"---\nname: attio-rate-limits\ndescription: |\n  Handle Attio API rate limits with exponential backoff, queue-based\n  throttling, and Retry-After header parsing.\n  Trigger: \"attio rate limit\", \"attio 429\", \"attio throttling\",\n  \"attio retry\", \"attio backoff\", \"attio too many requests\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, crm, attio]\ncompatible-with: claude-code\n---\n\n# Attio Rate Limits\n\n## Overview\n\nAttio 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.\n\n## Rate Limit Response\n\n```\nHTTP\u002F1.1 429 Too Many Requests\nRetry-After: Sat, 22 Mar 2025 14:30:01 GMT\nContent-Type: application\u002Fjson\n\n{\n  \"status_code\": 429,\n  \"type\": \"rate_limit_error\",\n  \"code\": \"rate_limit_exceeded\",\n  \"message\": \"Rate limit exceeded, please try again later\"\n}\n```\n\n**Key fact:** The `Retry-After` header is a date string (not seconds). Parse it as a Date to calculate wait time.\n\n## Instructions\n\n### Step 1: Parse Retry-After Header\n\n```typescript\nfunction parseRetryAfter(headers: Headers): number {\n  const retryAfter = headers.get(\"Retry-After\");\n  if (!retryAfter) return 1000; \u002F\u002F Default 1s\n\n  \u002F\u002F Attio sends a date string\n  const retryDate = new Date(retryAfter);\n  const waitMs = retryDate.getTime() - Date.now();\n  return Math.max(waitMs, 100); \u002F\u002F Minimum 100ms\n}\n```\n\n### Step 2: Exponential Backoff with Retry-After Awareness\n\n```typescript\nimport { AttioApiError } from \".\u002Fclient\";\n\ninterface RetryConfig {\n  maxRetries: number;\n  baseMs: number;\n  maxMs: number;\n}\n\nasync function withRateLimitRetry\u003CT>(\n  operation: () => Promise\u003C{ data: T; headers?: Headers }>,\n  config: RetryConfig = { maxRetries: 5, baseMs: 1000, maxMs: 30000 }\n): Promise\u003CT> {\n  for (let attempt = 0; attempt \u003C= config.maxRetries; attempt++) {\n    try {\n      const result = await operation();\n      return result.data;\n    } catch (err) {\n      if (attempt === config.maxRetries) throw err;\n\n      if (err instanceof AttioApiError) {\n        if (!err.retryable) throw err; \u002F\u002F Only retry 429 and 5xx\n\n        \u002F\u002F Use Retry-After if available, otherwise exponential backoff\n        const backoff = config.baseMs * Math.pow(2, attempt);\n        const jitter = Math.random() * 500;\n        const delay = Math.min(backoff + jitter, config.maxMs);\n\n        console.warn(\n          `Attio ${err.statusCode} on attempt ${attempt + 1}\u002F${config.maxRetries}. ` +\n          `Retrying in ${delay.toFixed(0)}ms...`\n        );\n        await new Promise((r) => setTimeout(r, delay));\n      } else {\n        throw err;\n      }\n    }\n  }\n  throw new Error(\"Unreachable\");\n}\n```\n\n### Step 3: Queue-Based Throttling\n\nPrevent 429s proactively by limiting concurrency and request rate:\n\n```typescript\nimport PQueue from \"p-queue\";\n\n\u002F\u002F Attio: sliding 10-second window. Stay well under the limit.\nconst attioQueue = new PQueue({\n  concurrency: 5,           \u002F\u002F Max parallel requests\n  interval: 1000,           \u002F\u002F 1 second interval\n  intervalCap: 8,           \u002F\u002F Max 8 requests per second\n});\n\nasync function throttledAttioCall\u003CT>(\n  operation: () => Promise\u003CT>\n): Promise\u003CT> {\n  return attioQueue.add(operation) as Promise\u003CT>;\n}\n\n\u002F\u002F Usage\nconst results = await Promise.all(\n  recordIds.map((id) =>\n    throttledAttioCall(() =>\n      client.get(`\u002Fobjects\u002Fpeople\u002Frecords\u002F${id}`)\n    )\n  )\n);\n```\n\n### Step 4: Rate Limit Monitor\n\n```typescript\nclass AttioRateLimitMonitor {\n  private windowStart = Date.now();\n  private requestCount = 0;\n\n  recordRequest(responseHeaders?: Headers): void {\n    const now = Date.now();\n    \u002F\u002F Reset counter every 10 seconds (Attio's sliding window)\n    if (now - this.windowStart > 10000) {\n      this.windowStart = now;\n      this.requestCount = 0;\n    }\n    this.requestCount++;\n  }\n\n  shouldThrottle(threshold = 0.8): boolean {\n    \u002F\u002F Conservative: throttle at 80% of observed capacity\n    return this.requestCount > 50 * threshold; \u002F\u002F Adjust 50 based on your limit\n  }\n\n  getStats(): { requestsInWindow: number; windowAgeMs: number } {\n    return {\n      requestsInWindow: this.requestCount,\n      windowAgeMs: Date.now() - this.windowStart,\n    };\n  }\n}\n```\n\n### Step 5: Batch Operations to Reduce Request Count\n\n```typescript\n\u002F\u002F Instead of N individual GET calls, use the query endpoint (1 POST)\n\u002F\u002F BAD: N requests\nfor (const email of emails) {\n  await client.post(\"\u002Fobjects\u002Fpeople\u002Frecords\u002Fquery\", {\n    filter: { email_addresses: email },\n    limit: 1,\n  });\n}\n\n\u002F\u002F GOOD: 1 request with $in filter\nconst results = await client.post(\"\u002Fobjects\u002Fpeople\u002Frecords\u002Fquery\", {\n  filter: {\n    email_addresses: {\n      email_address: { $in: emails },\n    },\n  },\n  limit: emails.length,\n});\n```\n\n### Step 6: Circuit Breaker for Sustained Rate Limiting\n\n```typescript\nclass AttioCircuitBreaker {\n  private failures = 0;\n  private lastFailure = 0;\n  private state: \"closed\" | \"open\" | \"half-open\" = \"closed\";\n  private readonly threshold = 5;       \u002F\u002F Open after 5 consecutive 429s\n  private readonly resetMs = 30000;     \u002F\u002F Try again after 30s\n\n  async execute\u003CT>(operation: () => Promise\u003CT>): Promise\u003CT> {\n    if (this.state === \"open\") {\n      if (Date.now() - this.lastFailure > this.resetMs) {\n        this.state = \"half-open\";\n      } else {\n        throw new Error(\"Circuit open: Attio rate limited. Retry after 30s.\");\n      }\n    }\n\n    try {\n      const result = await operation();\n      this.failures = 0;\n      this.state = \"closed\";\n      return result;\n    } catch (err) {\n      if (err instanceof AttioApiError && err.statusCode === 429) {\n        this.failures++;\n        this.lastFailure = Date.now();\n        if (this.failures >= this.threshold) {\n          this.state = \"open\";\n        }\n      }\n      throw err;\n    }\n  }\n}\n```\n\n## Error Handling\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| Burst of 429s on startup | No throttling | Add `PQueue` with `intervalCap` |\n| 429s during bulk import | Too many parallel requests | Reduce concurrency, batch with query |\n| Intermittent 429s | Multiple apps sharing limit | Coordinate rate across apps |\n| 429s after long silence | Attio reduced limit during incident | Check `status.attio.com`, honor `Retry-After` |\n\n## Resources\n\n- [Attio Rate Limiting Guide](https:\u002F\u002Fdocs.attio.com\u002Frest-api\u002Fguides\u002Frate-limiting)\n- [p-queue Documentation](https:\u002F\u002Fgithub.com\u002Fsindresorhus\u002Fp-queue)\n- [Attio Status Page](https:\u002F\u002Fstatus.attio.com)\n\n## Next Steps\n\nFor security best practices, see `attio-security-basics`.\n\n","# Attio Rate Limits\n\n## Overview\n\nAttio 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.\n\n## Rate Limit Response\n\n```\nHTTP\u002F1.1 429 Too Many Requests\nRetry-After: Sat, 22 Mar 2025 14:30:01 GMT\nContent-Type: application\u002Fjson\n\n{\n  \"status_code\": 429,\n  \"type\": \"rate_limit_error\",\n  \"code\": \"rate_limit_exceeded\",\n  \"message\": \"Rate limit exceeded, please try again later\"\n}\n```\n\n**Key fact:** The `Retry-After` header is a date string (not seconds). Parse it as a Date to calculate wait time.\n\n## Instructions\n\n### Step 1: Parse Retry-After Header\n\n```typescript\nfunction parseRetryAfter(headers: Headers): number {\n  const retryAfter = headers.get(\"Retry-After\");\n  if (!retryAfter) return 1000; \u002F\u002F Default 1s\n\n  \u002F\u002F Attio sends a date string\n  const retryDate = new Date(retryAfter);\n  const waitMs = retryDate.getTime() - Date.now();\n  return Math.max(waitMs, 100); \u002F\u002F Minimum 100ms\n}\n```\n\n### Step 2: Exponential Backoff with Retry-After Awareness\n\n```typescript\nimport { AttioApiError } from \".\u002Fclient\";\n\ninterface RetryConfig {\n  maxRetries: number;\n  baseMs: number;\n  maxMs: number;\n}\n\nasync function withRateLimitRetry\u003CT>(\n  operation: () => Promise\u003C{ data: T; headers?: Headers }>,\n  config: RetryConfig = { maxRetries: 5, baseMs: 1000, maxMs: 30000 }\n): Promise\u003CT> {\n  for (let attempt = 0; attempt \u003C= config.maxRetries; attempt++) {\n    try {\n      const result = await operation();\n      return result.data;\n    } catch (err) {\n      if (attempt === config.maxRetries) throw err;\n\n      if (err instanceof AttioApiError) {\n        if (!err.retryable) throw err; \u002F\u002F Only retry 429 and 5xx\n\n        \u002F\u002F Use Retry-After if available, otherwise exponential backoff\n        const backoff = config.baseMs * Math.pow(2, attempt);\n        const jitter = Math.random() * 500;\n        const delay = Math.min(backoff + jitter, config.maxMs);\n\n        console.warn(\n          `Attio ${err.statusCode} on attempt ${attempt + 1}\u002F${config.maxRetries}. ` +\n          `Retrying in ${delay.toFixed(0)}ms...`\n        );\n        await new Promise((r) => setTimeout(r, delay));\n      } else {\n        throw err;\n      }\n    }\n  }\n  throw new Error(\"Unreachable\");\n}\n```\n\n### Step 3: Queue-Based Throttling\n\nPrevent 429s proactively by limiting concurrency and request rate:\n\n```typescript\nimport PQueue from \"p-queue\";\n\n\u002F\u002F Attio: sliding 10-second window. Stay well under the limit.\nconst attioQueue = new PQueue({\n  concurrency: 5,           \u002F\u002F Max parallel requests\n  interval: 1000,           \u002F\u002F 1 second interval\n  intervalCap: 8,           \u002F\u002F Max 8 requests per second\n});\n\nasync function throttledAttioCall\u003CT>(\n  operation: () => Promise\u003CT>\n): Promise\u003CT> {\n  return attioQueue.add(operation) as Promise\u003CT>;\n}\n\n\u002F\u002F Usage\nconst results = await Promise.all(\n  recordIds.map((id) =>\n    throttledAttioCall(() =>\n      client.get(`\u002Fobjects\u002Fpeople\u002Frecords\u002F${id}`)\n    )\n  )\n);\n```\n\n### Step 4: Rate Limit Monitor\n\n```typescript\nclass AttioRateLimitMonitor {\n  private windowStart = Date.now();\n  private requestCount = 0;\n\n  recordRequest(responseHeaders?: Headers): void {\n    const now = Date.now();\n    \u002F\u002F Reset counter every 10 seconds (Attio's sliding window)\n    if (now - this.windowStart > 10000) {\n      this.windowStart = now;\n      this.requestCount = 0;\n    }\n    this.requestCount++;\n  }\n\n  shouldThrottle(threshold = 0.8): boolean {\n    \u002F\u002F Conservative: throttle at 80% of observed capacity\n    return this.requestCount > 50 * threshold; \u002F\u002F Adjust 50 based on your limit\n  }\n\n  getStats(): { requestsInWindow: number; windowAgeMs: number } {\n    return {\n      requestsInWindow: this.requestCount,\n      windowAgeMs: Date.now() - this.windowStart,\n    };\n  }\n}\n```\n\n### Step 5: Batch Operations to Reduce Request Count\n\n```typescript\n\u002F\u002F Instead of N individual GET calls, use the query endpoint (1 POST)\n\u002F\u002F BAD: N requests\nfor (const email of emails) {\n  await client.post(\"\u002Fobjects\u002Fpeople\u002Frecords\u002Fquery\", {\n    filter: { email_addresses: email },\n    limit: 1,\n  });\n}\n\n\u002F\u002F GOOD: 1 request with $in filter\nconst results = await client.post(\"\u002Fobjects\u002Fpeople\u002Frecords\u002Fquery\", {\n  filter: {\n    email_addresses: {\n      email_address: { $in: emails },\n    },\n  },\n  limit: emails.length,\n});\n```\n\n### Step 6: Circuit Breaker for Sustained Rate Limiting\n\n```typescript\nclass AttioCircuitBreaker {\n  private failures = 0;\n  private lastFailure = 0;\n  private state: \"closed\" | \"open\" | \"half-open\" = \"closed\";\n  private readonly threshold = 5;       \u002F\u002F Open after 5 consecutive 429s\n  private readonly resetMs = 30000;     \u002F\u002F Try again after 30s\n\n  async execute\u003CT>(operation: () => Promise\u003CT>): Promise\u003CT> {\n    if (this.state === \"open\") {\n      if (Date.now() - this.lastFailure > this.resetMs) {\n        this.state = \"half-open\";\n      } else {\n        throw new Error(\"Circuit open: Attio rate limited. Retry after 30s.\");\n      }\n    }\n\n    try {\n      const result = await operation();\n      this.failures = 0;\n      this.state = \"closed\";\n      return result;\n    } catch (err) {\n      if (err instanceof AttioApiError && err.statusCode === 429) {\n        this.failures++;\n        this.lastFailure = Date.now();\n        if (this.failures >= this.threshold) {\n          this.state = \"open\";\n        }\n      }\n      throw err;\n    }\n  }\n}\n```\n\n## Error Handling\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| Burst of 429s on startup | No throttling | Add `PQueue` with `intervalCap` |\n| 429s during bulk import | Too many parallel requests | Reduce concurrency, batch with query |\n| Intermittent 429s | Multiple apps sharing limit | Coordinate rate across apps |\n| 429s after long silence | Attio reduced limit during incident | Check `status.attio.com`, honor `Retry-After` |\n\n## Resources\n\n- [Attio Rate Limiting Guide](https:\u002F\u002Fdocs.attio.com\u002Frest-api\u002Fguides\u002Frate-limiting)\n- [p-queue Documentation](https:\u002F\u002Fgithub.com\u002Fsindresorhus\u002Fp-queue)\n- [Attio Status Page](https:\u002F\u002Fstatus.attio.com)\n\n## Next Steps\n\nFor security best practices, see `attio-security-basics`.\n\n",{"name":5,"tags":43,"author":44,"license":15,"version":45,"description":46,"allowed-tools":47,"compatible-with":29},[22,21,19],"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Handle Attio API rate limits with exponential backoff, queue-based\nthrottling, and Retry-After header parsing.\nTrigger: \"attio rate limit\", \"attio 429\", \"attio throttling\",\n\"attio retry\", \"attio backoff\", \"attio too many requests\".\n","Read, Write, Edit","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fattio-rate-limits",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill attio-rate-limits",{"tool":63,"command":64},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill attio-rate-limits",{"tool":66,"command":67},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill attio-rate-limits","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fattio-rate-limits\u002FSKILL.md",true,[],[72,81,90,99,105,111],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":38},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[78,79,80],"model","model hierarchy","model hierarchy skill",{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":38},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[87,88,89],"MCP","zoom","zoom mcp",{"skillNo":91,"name":92,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":38},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[96,97,98,88],"sdk","zoom apps sdk","apps",{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":38},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[101],{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":38},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[107],{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":38},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[113]]