abridge-hello-world
Create a minimal Abridge ambient AI clinical documentation example. Use when testing Abridge integration, verifying EHR connectivity, or learning how Abridge captures and structures clinical conversations. Trigger: "abridge hello world", "abridge example", "abridge quick start", "test abridge".
What this skill does
# Abridge Hello World
## Overview
Minimal working example demonstrating Abridge's ambient clinical documentation. This creates a simulated encounter session, sends audio/transcript data, and receives a structured clinical note.
## Prerequisites
- Completed `abridge-install-auth` setup
- Abridge sandbox credentials configured
- Node.js 18+ with TypeScript
## Instructions
### Step 1: Create Project Structure
```bash
mkdir abridge-hello-world && cd abridge-hello-world
npm init -y
npm install axios dotenv typescript @types/node
npx tsc --init --target ES2022 --module NodeNext --moduleResolution NodeNext
```
### Step 2: Build the Encounter Session Client
```typescript
// src/encounter-session.ts
import axios, { AxiosInstance } from 'axios';
interface EncounterSession {
session_id: string;
patient_id: string;
provider_id: string;
encounter_type: 'outpatient' | 'inpatient' | 'emergency';
status: 'active' | 'processing' | 'completed';
created_at: string;
}
interface ClinicalNote {
note_id: string;
session_id: string;
sections: {
chief_complaint: string;
history_present_illness: string;
review_of_systems: string;
physical_exam: string;
assessment: string;
plan: string;
};
icd10_codes: Array<{ code: string; description: string }>;
cpt_codes: Array<{ code: string; description: string }>;
confidence_score: number;
source_citations: Array<{
section: string;
text: string;
audio_timestamp_start: number;
audio_timestamp_end: number;
}>;
}
class AbridgeClient {
private api: AxiosInstance;
constructor() {
this.api = axios.create({
baseURL: process.env.ABRIDGE_SANDBOX_URL || 'https://sandbox.api.abridge.com/v1',
headers: {
'Authorization': `Bearer ${process.env.ABRIDGE_CLIENT_SECRET}`,
'X-Org-Id': process.env.ABRIDGE_ORG_ID!,
'Content-Type': 'application/json',
},
timeout: 30000,
});
}
async createSession(
patientId: string,
providerId: string,
encounterType: EncounterSession['encounter_type'] = 'outpatient'
): Promise<EncounterSession> {
const { data } = await this.api.post('/sessions', {
patient_id: patientId,
provider_id: providerId,
encounter_type: encounterType,
specialty: 'internal_medicine',
language: 'en',
});
return data;
}
async submitTranscript(sessionId: string, transcript: string): Promise<void> {
await this.api.post(`/sessions/${sessionId}/transcript`, {
text: transcript,
format: 'plain_text',
});
}
async generateNote(sessionId: string): Promise<ClinicalNote> {
// Trigger note generation
await this.api.post(`/sessions/${sessionId}/generate`);
// Poll for completion (Abridge processes asynchronously)
let attempts = 0;
while (attempts < 30) {
const { data: session } = await this.api.get(`/sessions/${sessionId}`);
if (session.status === 'completed') {
const { data: note } = await this.api.get(`/sessions/${sessionId}/note`);
return note;
}
await new Promise(r => setTimeout(r, 2000));
attempts++;
}
throw new Error('Note generation timed out after 60s');
}
}
export { AbridgeClient, EncounterSession, ClinicalNote };
```
### Step 3: Run the Hello World Example
```typescript
// src/main.ts
import 'dotenv/config';
import { AbridgeClient } from './encounter-session';
// Sample clinical conversation transcript (de-identified)
const SAMPLE_TRANSCRIPT = `
Doctor: Good morning, what brings you in today?
Patient: I've been having this persistent cough for about two weeks now.
Doctor: Is it a dry cough or are you producing any sputum?
Patient: It's mostly dry, but sometimes I cough up a little clear mucus.
Doctor: Any fever, chills, or shortness of breath?
Patient: No fever, but I do feel a little short of breath when I climb stairs.
Doctor: Are you a smoker?
Patient: No, I quit about five years ago. I smoked for about ten years before that.
Doctor: Let me listen to your lungs. Take a deep breath... Okay, I hear some mild
wheezing in both lung fields. Your oxygen saturation is 97%.
Doctor: I think this is likely a post-viral cough, possibly with some mild reactive
airway disease given your smoking history. I'd like to start you on an inhaler
and have you come back in two weeks. If the cough persists, we'll get a chest X-ray.
Patient: Sounds good, thank you.
`;
async function main() {
const client = new AbridgeClient();
// 1. Create encounter session
console.log('Creating encounter session...');
const session = await client.createSession('patient_demo_001', 'provider_demo_001');
console.log(`Session created: ${session.session_id}`);
// 2. Submit transcript
console.log('Submitting transcript...');
await client.submitTranscript(session.session_id, SAMPLE_TRANSCRIPT);
console.log('Transcript submitted');
// 3. Generate clinical note
console.log('Generating clinical note (this may take 10-30 seconds)...');
const note = await client.generateNote(session.session_id);
console.log('\n=== Generated Clinical Note ===');
console.log(`Chief Complaint: ${note.sections.chief_complaint}`);
console.log(`Assessment: ${note.sections.assessment}`);
console.log(`Plan: ${note.sections.plan}`);
console.log(`\nICD-10 Codes: ${note.icd10_codes.map(c => c.code).join(', ')}`);
console.log(`Confidence: ${(note.confidence_score * 100).toFixed(1)}%`);
console.log(`Source Citations: ${note.source_citations.length} segments linked`);
}
main().catch(console.error);
```
## Output
- Encounter session created in Abridge sandbox
- Transcript processed through Abridge's ambient AI engine
- Structured SOAP note with ICD-10/CPT codes
- Source citations mapping AI output to conversation segments
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `401 Unauthorized` | Invalid sandbox credentials | Re-check `.env.local` credentials |
| `422 Invalid specialty` | Unsupported specialty code | Use supported values from API docs |
| Note generation timeout | Large/complex transcript | Increase polling timeout beyond 60s |
| Empty note sections | Transcript too short | Provide at least 30 seconds of conversation |
| Missing ICD codes | Ambiguous clinical content | Ensure transcript includes clear diagnoses |
## Resources
- [Abridge Product Overview](https://www.abridge.com/product)
- [Abridge AI Technology](https://www.abridge.com/ai)
- HL7 FHIR Clinical Notes
## Next Steps
Proceed to `abridge-local-dev-loop` for development workflow with live audio capture.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.