OP

openevidence-rate-limits

Ensures reliable performance by implementing backoff and rate limiting logic for OpenEvidence APIs.

Install

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

Installs to .claude/skills/openevidence-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.

Rate Limits for OpenEvidence.
29 charsno explicit “when” trigger
Advanced

Key capabilities

  • Implement request queuing for clinical queries
  • Apply exponential backoff for API retries
  • Batch process research queries during off-peak hours

How it works

A token-bucket rate limiter tracks request counts per minute, while a retry function handles 429 errors using jittered backoff intervals.

Inputs & outputs

You give it
Array of clinical query strings
You get back
Processed query results with retry logic

When to use openevidence-rate-limits

  • Handling rate limit errors
  • Implementing backoff strategies
  • Optimizing API throughput
  • Managing query queueing

About this skill

OpenEvidence Rate Limits

Overview

OpenEvidence's clinical decision support API enforces strict rate limits to ensure reliable evidence retrieval for healthcare applications. Clinical query endpoints are throttled per API key, with lower limits on evidence synthesis calls that involve AI-powered literature analysis. In clinical settings, rate limiting directly impacts patient care workflows, so implementations must prioritize graceful degradation over retry storms. Batch research queries during off-peak hours and cache evidence summaries aggressively since medical literature changes infrequently.

Rate Limit Reference

EndpointLimitWindowScope
Clinical query30 req1 minutePer API key
Evidence synthesis10 req1 minutePer API key
Literature search60 req1 minutePer API key
Citation retrieval120 req1 minutePer API key
Bulk evidence export5 req1 hourPer API key

Rate Limiter Implementation

class OpenEvidenceRateLimiter {
  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 queryLimiter = new OpenEvidenceRateLimiter(25);
const synthesisLimiter = new OpenEvidenceRateLimiter(8);

Retry Strategy

async function openEvidenceRetry<T>(
  limiter: OpenEvidenceRateLimiter, 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") || "30", 10);
      const jitter = Math.random() * 2000;
      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) * 3000));
      continue;
    }
    throw new Error(`OpenEvidence API ${res.status}: ${await res.text()}`);
  }
  throw new Error("Max retries exceeded");
}

Batch Processing

async function batchClinicalQueries(queries: string[], batchSize = 5) {
  const results: any[] = [];
  for (let i = 0; i < queries.length; i += batchSize) {
    const batch = queries.slice(i, i + batchSize);
    const batchResults = await Promise.all(
      batch.map(q => openEvidenceRetry(queryLimiter, () =>
        fetch(`${OE_BASE}/api/v1/clinical/query`, {
          method: "POST", headers,
          body: JSON.stringify({ question: q, includeEvidence: true }),
        })
      ))
    );
    results.push(...batchResults);
    if (i + batchSize < queries.length) await new Promise(r => setTimeout(r, 12_000));
  }
  return results;
}

Error Handling

IssueCauseFix
429 on clinical queryExceeded 30 req/min query capQueue queries, return cached if available
429 on synthesisSynthesis limit (10/min) is strictPre-cache common drug interaction queries
Synthesis timeoutComplex multi-study analysisSet 120s timeout, poll async endpoint
401 key expiredAPI key rotation missedAutomate key rotation with 7-day buffer
Stale evidenceCached result older than 30 daysSet TTL on cache, re-query on expiry

Resources

Next Steps

See openevidence-performance-tuning.

When not to use it

  • Ignoring 429 status codes in production
  • Retrying synthesis calls without jitter

Prerequisites

OpenEvidence API key

Limitations

  • Synthesis limit is strictly 10 requests per minute
  • Bulk evidence export limited to 5 requests per hour

How it compares

This implementation prioritizes graceful degradation in clinical workflows rather than simple retry loops.

Compared to similar skills

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

SkillInstallsUpdatedSafetyDifficulty
openevidence-rate-limits (this skill)125dNo flagsAdvanced
java-pro344moNo flagsAdvanced
bullmq-specialist256moNo flagsIntermediate
golang-pro144moNo flagsAdvanced

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

java-pro

sickn33

Master Java 21+ with modern features like virtual threads, pattern matching, and Spring Boot 3.x. Expert in the latest Java ecosystem including GraalVM, Project Loom, and cloud-native patterns. Use PROACTIVELY for Java development, microservices architecture, or performance optimization.

3492

bullmq-specialist

davila7

BullMQ expert for Redis-backed job queues, background processing, and reliable async execution in Node.js/TypeScript applications. Use when: bullmq, bull queue, redis queue, background job, job queue.

2595

golang-pro

sickn33

Master Go 1.21+ with modern patterns, advanced concurrency, performance optimization, and production-ready microservices. Expert in the latest Go ecosystem including generics, workspaces, and cutting-edge frameworks. Use PROACTIVELY for Go development, architecture design, or performance optimization.

1479

go-concurrency-patterns

wshobson

Master Go concurrency with goroutines, channels, sync primitives, and context. Use when building concurrent Go applications, implementing worker pools, or debugging race conditions.

782

rust-async-patterns

wshobson

Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns. Use when building async Rust applications, implementing concurrent systems, or debugging async code.

1132

graphql

davila7

GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.

624

Search skills

Search the agent skills registry