OP

openevidence-upgrade-migration

Guides the process of detecting API versions and migrating between OpenEvidence releases.

Install

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

Installs to .claude/skills/openevidence-upgrade-migration

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.

Upgrade Migration for OpenEvidence.
35 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Detect current OpenEvidence API version
  • Validate clinical query response schema
  • Migrate legacy query responses to structured format
  • Implement client-side fallback to v1 API
  • Map evidence grades and citation identifiers

How it works

The skill provides scripts to detect API versions and migrate flat query responses into structured objects containing evidence grades, confidence levels, and disclaimers. It also includes a client wrapper that automatically falls back to v1 if v2 requests fail.

Inputs & outputs

You give it
Legacy OpenEvidence query response
You get back
Migrated structured query response with evidence grading

When to use openevidence-upgrade-migration

  • Upgrading SDK versions
  • Migrating API versions
  • Planning platform updates
  • Testing schema compatibility

About this skill

OpenEvidence Upgrade & Migration

Overview

OpenEvidence is a clinical AI platform that provides evidence-based medical answers and clinical decision support. The API exposes endpoints for clinical queries, evidence retrieval, and citation management. Tracking API changes is critical because OpenEvidence evolves its evidence grading schema, citation format, and clinical query response structure — and breaking changes in a healthcare context can surface outdated medical evidence, alter confidence scores, or remove critical safety disclaimers that downstream clinical applications depend on.

Version Detection

const OPENEVIDENCE_BASE = "https://api.openevidence.com/v1";

async function detectOpenEvidenceVersion(apiKey: string): Promise<void> {
  const res = await fetch(`${OPENEVIDENCE_BASE}/status`, {
    headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  });
  const version = res.headers.get("x-openevidence-api-version") ?? "v1";
  console.log(`OpenEvidence API version: ${version}`);

  // Test clinical query response schema
  const queryRes = await fetch(`${OPENEVIDENCE_BASE}/query`, {
    method: "POST",
    headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
    body: JSON.stringify({ question: "What is the recommended treatment for hypertension?", max_citations: 1 }),
  });
  const data = await queryRes.json();
  const hasStructuredCitations = data.citations?.[0]?.evidence_grade !== undefined;
  console.log(`Structured citations: ${hasStructuredCitations}`);
  const hasDisclaimers = data.disclaimers !== undefined;
  console.log(`Disclaimers field present: ${hasDisclaimers}`);
}

Migration Checklist

  • Review OpenEvidence release notes for API schema changes
  • Verify clinical query response structure (answer, citations, confidence)
  • Check evidence grading scale — letter grades vs. numeric scores may change
  • Validate citation format (PMID references, DOI links, journal metadata)
  • Test disclaimer and safety warning fields in query responses
  • Update clinical specialty filters if taxonomy was expanded
  • Check rate limits for clinical query endpoints (may differ by plan tier)
  • Verify streaming response format if using real-time query mode
  • Update evidence date range filters if temporal query syntax changed
  • Run clinical validation suite against known question-answer pairs

Schema Migration

// OpenEvidence query response: flat answer → structured evidence with grading
interface OldQueryResponse {
  answer: string;
  citations: Array<{ title: string; url: string; source: string }>;
  confidence: number;
}

interface NewQueryResponse {
  answer: { text: string; sections: Array<{ heading: string; content: string }> };
  citations: Array<{
    title: string;
    url: string;
    source: string;
    pmid?: string;
    doi?: string;
    evidence_grade: "A" | "B" | "C" | "D" | "expert_opinion";
    publication_year: number;
  }>;
  confidence: { score: number; level: "high" | "moderate" | "low"; basis: string };
  disclaimers: string[];
  query_metadata: { specialty: string; guidelines_version: string };
}

function migrateQueryResponse(old: OldQueryResponse): NewQueryResponse {
  return {
    answer: { text: old.answer, sections: [{ heading: "Summary", content: old.answer }] },
    citations: old.citations.map((c) => ({
      ...c,
      evidence_grade: "C" as const,
      publication_year: 0,
    })),
    confidence: { score: old.confidence, level: old.confidence > 0.7 ? "high" : "moderate", basis: "legacy" },
    disclaimers: ["This information is for educational purposes. Consult a healthcare provider."],
    query_metadata: { specialty: "general", guidelines_version: "unknown" },
  };
}

Rollback Strategy

class OpenEvidenceClient {
  private apiVersion: "v1" | "v2";

  constructor(private apiKey: string, version: "v1" | "v2" = "v2") {
    this.apiVersion = version;
  }

  async query(question: string, options?: { specialty?: string }): Promise<any> {
    try {
      const res = await fetch(`https://api.openevidence.com/${this.apiVersion}/query`, {
        method: "POST",
        headers: { Authorization: `Bearer ${this.apiKey}`, "Content-Type": "application/json" },
        body: JSON.stringify({ question, ...options }),
      });
      if (!res.ok) throw new Error(`OpenEvidence ${res.status}`);
      return await res.json();
    } catch (err) {
      if (this.apiVersion === "v2") {
        console.warn("Falling back to OpenEvidence API v1");
        this.apiVersion = "v1";
        return this.query(question, options);
      }
      throw err;
    }
  }
}

Error Handling

Migration IssueSymptomFix
Evidence grade scale changedGrade returns "level-1" instead of "A"Map new grade scale to internal representation using lookup table
Citation format restructuredMissing pmid field, now nested under identifiers.pmidUpdate citation parser for new nested identifier structure
Disclaimer field requiredIntegration missing safety warnings in user-facing outputAlways render disclaimers[] array from query response
Specialty taxonomy expanded400 with unknown specialty on filtered queriesFetch current specialties from /specialties endpoint
Streaming format changedSSE parser breaks on new event structureUpdate event stream parser for new data: payload format

Resources

Next Steps

For CI pipeline integration, see openevidence-ci-integration.

When not to use it

  • When using non-clinical AI platforms
  • When bypassing safety disclaimer requirements

Prerequisites

OpenEvidence API key

Limitations

  • Requires manual mapping for custom grade scales
  • Streaming parser updates needed for new event structures

How it compares

Unlike manual updates, this skill provides automated schema migration logic and a resilient client wrapper to handle breaking changes in clinical data structures.

Compared to similar skills

openevidence-upgrade-migration side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
openevidence-upgrade-migration (this skill)125dNo flagsIntermediate
fastapi-templates5202moNo flagsIntermediate
android-kotlin-development2685moReviewAdvanced
fastapi-pro794moNo 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

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

5201,086

android-kotlin-development

aj-geddes

Develop native Android apps with Kotlin. Covers MVVM with Jetpack, Compose for modern UI, Retrofit for API calls, Room for local storage, and navigation architecture.

268679

fastapi-pro

sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

79181

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

telegram-mini-app

davila7

Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.

62163

stripe-integration

wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

48165

Search skills

Search the agent skills registry