Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implement rate limiting for Anima API code generation requests. Use when batching component generation, handling rate limit errors, or optimizing API throughput for large design systems. Trigger: "anima rate limit", "anima throttling", "anima batch generation".
.claude/skills/jeremylongshore-anima-rate-limits/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 98% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -20% | 0% |
Handle Figma rate limits from the current SDK's structured callback and treat any Anima generation quota as account-specific until the provider or agreement says otherwise. Never encode an invented requests-per-minute or concurrency allowance.
| Surface | Signal | Required action | |---------|--------|-----------------| | FigmaRestApi.onRateLimited | retryAfter, figmaPlanTier, figmaRateLimitType | Retry only inside a bounded elapsed-time budget | | figmaRateLimitMaxWait | 1–180 seconds; default 60 | Set explicitly for the request's latency budget | | Anima generation | Returned error/progress state and account contract | Stop or queue; do not infer a numeric quota |
ANIMA_TOKEN, FIGMA_TOKEN, and FIGMA_FILE_KEY in the runtime secret manager or injected environment, and verify that the token has only the scopes required for the selected file. Never put tokens in source, fixtures, logs, generated receipts, or retry payloads.typescript// src/anima/client.ts import { Anima, FigmaRestApi } from '@animaapp/anima-sdk'; const figmaRestApi = new FigmaRestApi({ defaultOptions: { token: process.env.FIGMA_TOKEN!, onRateLimited: async ({ retryAfter, figmaPlanTier, figmaRateLimitType }) => { console.warn({ retryAfter, figmaPlanTier, figmaRateLimitType }); return retryAfter > 0 && retryAfter <= 5; // Repository latency budget. }, }, }); export const anima = new Anima({ auth: { token: process.env.ANIMA_TOKEN! }, figmaRestApi, });
typescriptconst result = await anima.generateCode({ fileKey: process.env.FIGMA_FILE_KEY!, nodesId: ['1:2'], figmaRateLimitMaxWait: 5, settings: { framework: 'react', language: 'typescript', styling: 'tailwind' }, }); console.log({ fileCount: Object.keys(result.files).length, sessionId: result.sessionId });
FigmaRestApi own Figma retry decisions. Do not add a second uncoordinated retry loop around the same request.For a sandbox batch, keep the work bounded and make the outcome auditable without exposing design data:
typescriptconst nodeIds = ['synthetic-card', 'synthetic-button']; const receipt = { batchId: 'sandbox-2026-01-15-a', requested: nodeIds.length, succeeded: 0, failed: 0, contactsExported: 0, }; for (const nodeId of nodeIds) { try { await anima.generateCode({ fileKey: process.env.FIGMA_FILE_KEY!, nodesId: [nodeId], figmaRateLimitMaxWait: 5, settings }); receipt.succeeded++; } catch (error) { receipt.failed++; // Store only a redacted status and node fingerprint; never serialize `error` or source. } } console.log(JSON.stringify({ ...receipt, tokenPresent: Boolean(process.env.ANIMA_TOKEN) }));
An acceptable completion receipt is requested=2; succeeded=2; failed=0; contacts_exported=0 with the sandbox ID and limiter settings recorded separately. A production batch should use the same controls, a reviewed allowlist, and an owner-approved change record before increasing concurrency.
Use Read and Grep to inspect the existing integration and generated diff before changing anything. Use Write or Edit only inside the approved generated-code, test, or configuration paths. Use the declared Bash commands only for the explicit install, validation, or diagnostic steps in this workflow; never print tokens, source designs, generated source, or private website captures.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 15,225 | 9,233 | -39% | 1 | 1 | 0% | 3,400 | 2,893 | -15% | 0 | 0 | — |
case-02 | fail→fail | 12,802 | 10,244 | -20% | 1 | 1 | 0% | 2,768 | 3,002 | +8% | 0 | 0 | — |
case-03 | fail→fail | 14,428 | 12,552 | -13% | 1 | 1 | 0% | 3,149 | 3,465 | +10% | 0 | 0 | — |
case-04 | fail→pass | 11,062 | 3,191 | -71% | 1 | 1 | 0% | 691 | 1,365 | +98% | 0 | 0 | — |
case-05 | fail→pass | 7,369 | 1,429 | -81% | 1 | 1 | 0% | 1,385 | 998 | -28% | 0 | 0 | — |
case-06 | fail→pass | 20,585 | 3,213 | -84% | 1 | 1 | 0% | 1,069 | 1,376 | +29% | 0 | 0 | — |
case-07 | fail→pass | 8,551 | 1,652 | -81% | 1 | 1 | 0% | 1,205 | 962 | -20% | 0 | 0 | — |
case-08 | pass→pass | 9,925 | 2,732 | -72% | 1 | 1 | 0% | 753 | 1,245 | +65% | 0 | 0 | — |
case-09 | fail→pass | 7,956 | 2,186 | -73% | 1 | 1 | 0% | 1,572 | 1,113 | -29% | 0 | 0 | — |
case-10 | fail→pass | 9,978 | 3,654 | -63% | 1 | 1 | 0% | 1,842 | 1,472 | -20% | 0 | 0 | — |
case-11 | fail→pass | 6,212 | 2,588 | -58% | 1 | 1 | 0% | 1,229 | 1,253 | +2% | 0 | 0 | — |
case-12 | pass→pass | 6,044 | 1,896 | -69% | 1 | 1 | 0% | 981 | 978 | -0% | 0 | 0 | — |
case-13 | fail→pass | 9,027 | 2,548 | -72% | 1 | 1 | 0% | 1,628 | 1,178 | -28% | 0 | 0 | — |
case-14 | pass→pass | 7,215 | 2,788 | -61% | 1 | 1 | 0% | 1,361 | 1,153 | -15% | 0 | 0 | — |
case-15 | fail→pass | 9,665 | 1,613 | -83% | 1 | 1 | 0% | 1,572 | 1,027 | -35% | 0 | 0 | — |
case-16 | pass→pass | 6,960 | 2,092 | -70% | 1 | 1 | 0% | 1,249 | 1,162 | -7% | 0 | 0 | — |
case-17 | pass→pass | 7,310 | 2,238 | -69% | 1 | 1 | 0% | 1,420 | 1,129 | -20% | 0 | 0 | — |
case-18 | fail→pass | 10,043 | 2,360 | -77% | 1 | 1 | 0% | 1,781 | 1,144 | -36% | 0 | 0 | — |
case-19 | fail→pass | 11,383 | 2,795 | -75% | 1 | 1 | 0% | 2,070 | 1,279 | -38% | 0 | 0 | — |
case-20 | pass→pass | 14,129 | 12,747 | -10% | 1 | 1 | 0% | 2,435 | 3,160 | +30% | 0 | 0 | — |
case-21 | pass→pass | 10,883 | 10,354 | -5% | 1 | 1 | 0% | 1,932 | 2,631 | +36% | 0 | 0 | — |
case-22 | pass→pass | 12,164 | 9,601 | -21% | 1 | 1 | 0% | 2,480 | 2,769 | +12% | 0 | 0 | — |
case-23 | fail→pass | 9,954 | 2,630 | -74% | 1 | 1 | 0% | 1,787 | 1,230 | -31% | 0 | 0 | — |
case-24 | pass→pass | 2,413 | 2,373 | -2% | 1 | 1 | 0% | 536 | 1,108 | +107% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted, and 22 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +54 percentage points is the difference between those two pass rates over the 22 comparable cases.
The publisher has shipped newer versions since this run, so these numbers describe v1, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.