agentsclimarketplace

Openevidence ci integration

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/openevidence-pack/skills/openevidence-ci-integration

'Ci Integration for OpenEvidence.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill openevidence-ci-integration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.6 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

OpenEvidence CI Integration

Overview

Set up CI/CD for OpenEvidence clinical decision support integrations: run unit tests with mocked evidence query and citation responses on every PR, validate live API connectivity for clinical queries on merge to main. OpenEvidence provides AI-powered medical evidence retrieval and clinical decision support, so CI pipelines verify query formatting, evidence parsing, citation extraction, and response quality scoring.

GitHub Actions Workflow

# .github/workflows/openevidence-ci.yml
name: OpenEvidence CI
on:
  pull_request:
    paths: ['src/openevidence/**', 'tests/**']
  push:
    branches: [main]

jobs:
  unit-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: npm test -- --reporter=verbose

  integration-tests:
    if: github.ref == 'refs/heads/main'
    needs: unit-tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: '20' }
      - run: npm ci
      - run: npm run test:integration
        env:
          OPENEVIDENCE_API_KEY: ${{ secrets.OPENEVIDENCE_API_KEY }}

Mock-Based Unit Tests

// tests/openevidence-service.test.ts
import { describe, it, expect, vi } from 'vitest';
import { queryEvidence, extractCitations } from '../src/openevidence-service';

vi.mock('../src/openevidence-client', () => ({
  OpenEvidenceClient: vi.fn().mockImplementation(() => ({
    query: vi.fn().mockResolvedValue({
      answer: 'Current evidence supports early intervention with GLP-1 agonists...',
      confidence: 0.92,
      citations: [
        { title: 'NEJM 2025 Meta-Analysis', doi: '10.1056/NEJMoa2501234', year: 2025 },
        { title: 'Lancet Diabetes Review', doi: '10.1016/S2213-8587(25)00123', year: 2025 },
      ],
      evidenceLevel: 'high',
    }),
    listQueries: vi.fn().mockResolvedValue({
      queries: [{ id: 'q_abc', question: 'GLP-1 efficacy', status: 'completed' }],
    }),
  })),
}));

describe('OpenEvidence Service', () => {
  it('queries clinical evidence with citations', async () => {
    const result = await queryEvidence('GLP-1 agonist efficacy for type 2 diabetes');
    expect(result.confidence).toBeGreaterThan(0.9);
    expect(result.citations).toHaveLength(2);
  });

  it('extracts citation DOIs from response', async () => {
    const citations = await extractCitations('q_abc');
    expect(citations[0].doi).toMatch(/^10\.\d+/);
  });
});

Integration Tests

// tests/integration/openevidence.integration.test.ts
import { describe, it, expect } from 'vitest';

const hasKey = !!process.env.OPENEVIDENCE_API_KEY;

describe.skipIf(!hasKey)('OpenEvidence Live API', () => {
  it('queries clinical evidence', async () => {
    const res = await fetch('https://api.openevidence.com/v1/query', {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${process.env.OPENEVIDENCE_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ question: 'Aspirin dosing for secondary prevention' }),
    });
    expect(res.status).toBe(200);
    const body = await res.json();
    expect(body).toHaveProperty('answer');
    expect(body).toHaveProperty('citations');
  });
});

Error Handling

CI IssueCauseFix
401 UnauthorizedInvalid API keyRegenerate at openevidence.com account settings
Empty citations arrayQuery too vague for evidence matchingUse specific clinical terms with condition and intervention
Low confidence scoreInsufficient published evidenceCheck evidence level field and handle low confidence gracefully
Rate limit (429)Too many queries in test suiteAdd throttling between clinical queries (1 req/sec)
Response timeoutComplex query requiring deep searchIncrease fetch timeout to 30s for clinical evidence lookups

Resources

Next Steps

See openevidence-deploy-integration.

What ships with it: 1 file

2.0 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.