JU

juicebox-rate-limits

Adds rate limiting and backoff logic to Juicebox API requests.

Install

mkdir -p .claude/skills/juicebox-rate-limits && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2743" && unzip -o skill.zip -d .claude/skills/juicebox-rate-limits && rm skill.zip

Installs to .claude/skills/juicebox-rate-limits

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Implement Juicebox rate limiting.
33 charsno explicit “when” trigger
Advanced

Key capabilities

  • Implement plan-tiered rate limits
  • Manage API request queues
  • Apply retry strategies with exponential backoff
  • Handle 429 (Too Many Requests) responses
  • Process batch operations with spacing

How it works

This skill implements a token bucket rate limiter and a retry strategy with exponential backoff to manage Juicebox API requests, ensuring compliance with various endpoint-specific rate limits.

Inputs & outputs

You give it
API requests to Juicebox endpoints (e.g., dataset upload, analysis trigger, data enrichment)
You get back
Successful API responses, managed within rate limits

When to use juicebox-rate-limits

  • Implement request retries
  • Handle API throttling
  • Optimize request throughput

About this skill

Juicebox Rate Limits

Overview

Juicebox's AI-powered data analysis API enforces plan-tiered rate limits across dataset uploads, analysis triggers, and result retrieval. Heavy analytical workloads like running comparative analyses across multiple datasets or batch-processing survey results hit the analysis trigger limit first. The enrichment endpoints for augmenting datasets with external data sources have separate, lower caps, making it essential to prioritize enrichment calls and batch analysis runs during off-peak windows.

Rate Limit Reference

EndpointLimitWindowScope
Dataset upload20 req1 minutePer API key
Analysis trigger30 req1 minutePer API key
Result retrieval120 req1 minutePer API key
Data enrichment15 req1 minutePer API key
Export download10 req1 minutePer API key

Rate Limiter Implementation

class JuiceboxRateLimiter {
  private tokens: number;
  private lastRefill: number;
  private readonly max: number;
  private readonly refillRate: number;
  private queue: Array<{ resolve: () => void }> = [];

  constructor(maxPerMinute: number) {
    this.max = maxPerMinute;
    this.tokens = maxPerMinute;
    this.lastRefill = Date.now();
    this.refillRate = maxPerMinute / 60_000;
  }

  async acquire(): Promise<void> {
    this.refill();
    if (this.tokens >= 1) { this.tokens -= 1; return; }
    return new Promise(resolve => this.queue.push({ resolve }));
  }

  private refill() {
    const now = Date.now();
    this.tokens = Math.min(this.max, this.tokens + (now - this.lastRefill) * this.refillRate);
    this.lastRefill = now;
    while (this.tokens >= 1 && this.queue.length) {
      this.tokens -= 1;
      this.queue.shift()!.resolve();
    }
  }
}

const analysisLimiter = new JuiceboxRateLimiter(25);
const enrichLimiter = new JuiceboxRateLimiter(12);

Retry Strategy

async function juiceboxRetry<T>(
  limiter: JuiceboxRateLimiter, fn: () => Promise<Response>, maxRetries = 3
): Promise<T> {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    await limiter.acquire();
    const res = await fn();
    if (res.ok) return res.json();
    if (res.status === 429) {
      const retryAfter = parseInt(res.headers.get("Retry-After") || "15", 10);
      const jitter = Math.random() * 3000;
      await new Promise(r => setTimeout(r, retryAfter * 1000 + jitter));
      continue;
    }
    if (res.status >= 500 && attempt < maxRetries) {
      await new Promise(r => setTimeout(r, Math.pow(2, attempt) * 2000));
      continue;
    }
    throw new Error(`Juicebox API ${res.status}: ${await res.text()}`);
  }
  throw new Error("Max retries exceeded");
}

Batch Processing

async function batchAnalyzeDatasets(datasetIds: string[], query: string, batchSize = 5) {
  const results: any[] = [];
  for (let i = 0; i < datasetIds.length; i += batchSize) {
    const batch = datasetIds.slice(i, i + batchSize);
    const batchResults = await Promise.all(
      batch.map(id => juiceboxRetry(analysisLimiter, () =>
        fetch(`${BASE}/api/v1/datasets/${id}/analyze`, {
          method: "POST", headers,
          body: JSON.stringify({ query }),
        })
      ))
    );
    results.push(...batchResults);
    if (i + batchSize < datasetIds.length) await new Promise(r => setTimeout(r, 8000));
  }
  return results;
}

Error Handling

IssueCauseFix
429 on analysis triggerExceeded 30 req/min analysis capQueue analyses, space 3s apart
429 on enrichmentEnrichment limit (15/min) is lowestBatch enrichments separately with wider spacing
Upload timeoutDataset exceeds 50MBCompress CSV, use chunked upload endpoint
Analysis still processingComplex query on large datasetPoll status every 10s, timeout at 10 min
403 on exportPlan does not include export featureVerify plan tier supports data export

Resources

  • Juicebox API Documentation

Next Steps

See juicebox-performance-tuning.

When not to use it

  • When API rate limits are not a concern
  • When real-time processing without delays is critical

Limitations

  • Analysis trigger limit is 30 requests per minute per API key
  • Data enrichment limit is 15 requests per minute per API key
  • Batch processing requires spacing between batches to avoid rate limits

How it compares

This approach proactively manages API request frequency and retries, preventing 429 errors and ensuring stable performance, unlike making unthrottled requests that can lead to service interruptions.

Compared to similar skills

juicebox-rate-limits side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
juicebox-rate-limits (this skill)225dNo flagsAdvanced
mcporter72moNo flagsIntermediate
calcom-api23moNo flagsIntermediate
dust-mcp-server125dReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

mcporter

openclaw

Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.

726

calcom-api

calcom

Interact with the Cal.com API v2 to manage scheduling, bookings, event types, availability, and calendars. Use this skill when building integrations that need to create or manage bookings, check availability, configure event types, or sync calendars with Cal.com's scheduling infrastructure.

216

dust-mcp-server

dust-tt

Step-by-step guide for creating new internal MCP server integrations in Dust that connect to remote platforms (Jira, HubSpot, Salesforce, etc.). Use when adding a new MCP server, implementing a platform integration, or connecting Dust to a new external service.

19

developing-genkit-tooling

firebase

Best practices for authoring Genkit tooling, including CLI commands and MCP server tools. Covers naming conventions, architectural patterns, and consistency guidelines.

27

clay-sdk-patterns

jeremylongshore

Apply production-ready Clay SDK patterns for TypeScript and Python. Use when implementing Clay integrations, refactoring SDK usage, or establishing team coding standards for Clay. Trigger with phrases like "clay SDK patterns", "clay best practices", "clay code patterns", "idiomatic clay".

04

vercel-sdk-patterns

jeremylongshore

Execute apply production-ready Vercel SDK patterns for TypeScript and Python. Use when implementing Vercel integrations, refactoring SDK usage, or establishing team coding standards for Vercel. Trigger with phrases like "vercel SDK patterns", "vercel best practices", "vercel code patterns", "idiomatic vercel".

13

Search skills

Search the agent skills registry