/elevenlabs-pack:elevenlabs-prod-checklistfrom elevenlabs-pack
Executes a production deployment checklist for ElevenLabs TTS/voice integrations. Covers API configuration, health checks, circuit breakers, monitoring, and rollback procedures.
Ships in elevenlabs-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Complete checklist for deploying ElevenLabs TTS/voice integrations to production. Covers API configuration, health checks, circuit breakers, monitoring, and rollback procedures.
Configuration:
ELEVENLABS_API_KEY set in deployment platform's secretseleven_multilingual_v2 or eleven_v3)Code Quality:
grep -r "sk_" src/)Quota Planning:
// src/api/health.ts
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
interface HealthStatus {
status: "healthy" | "degraded" | "unhealthy";
elevenlabs: {
connected: boolean;
latencyMs: number;
quotaRemaining: number | null;
quotaPctUsed: number | null;
};
timestamp: string;
}
export async function healthCheck(): Promise<HealthStatus> {
const client = new ElevenLabsClient();
const start = Date.now();
try {
const user = await client.user.get();
const latency = Date.now() - start;
const { character_count, character_limit } = user.subscription;
const remaining = character_limit - character_count;
const pctUsed = Math.round((character_count / character_limit) * 100);
return {
status: pctUsed > 90 ? "degraded" : "healthy",
elevenlabs: {
connected: true,
latencyMs: latency,
quotaRemaining: remaining,
quotaPctUsed: pctUsed,
},
timestamp: new Date().toISOString(),
};
} catch (error) {
return {
status: "unhealthy",
elevenlabs: {
connected: false,
latencyMs: Date.now() - start,
quotaRemaining: null,
quotaPctUsed: null,
},
timestamp: new Date().toISOString(),
};
}
}
// src/elevenlabs/circuit-breaker.ts
type CircuitState = "closed" | "open" | "half-open";
export class ElevenLabsCircuitBreaker {
private state: CircuitState = "closed";
private failures = 0;
private lastFailure = 0;
constructor(
private failureThreshold = 5, // Open after N consecutive failures
private resetTimeMs = 30_000, // Try again after 30s
) {}
async execute<T>(operation: () => Promise<T>, fallback?: () => T): Promise<T> {
if (this.state === "open") {
if (Date.now() - this.lastFailure > this.resetTimeMs) {
this.state = "half-open";
} else {
if (fallback) return fallback();
throw new Error("ElevenLabs circuit breaker is open — service unavailable");
}
}
try {
const result = await operation();
this.onSuccess();
return result;
} catch (error) {
this.onFailure();
if (fallback) return fallback();
throw error;
}
}
private onSuccess() {
this.failures = 0;
this.state = "closed";
}
private onFailure() {
this.failures++;
this.lastFailure = Date.now();
if (this.failures >= this.failureThreshold) {
this.state = "open";
console.error(`[ElevenLabs] Circuit breaker OPEN after ${this.failures} failures`);
}
}
getState(): CircuitState {
return this.state;
}
}
// Usage: graceful degradation when ElevenLabs is down
const breaker = new ElevenLabsCircuitBreaker();
async function generateSpeechWithFallback(text: string, voiceId: string) {
return breaker.execute(
() => client.textToSpeech.convert(voiceId, {
text,
model_id: "eleven_multilingual_v2",
}),
() => {
// Fallback: return pre-generated placeholder audio or null
console.warn("[ElevenLabs] Using fallback — TTS unavailable");
return null;
}
);
}
// src/elevenlabs/monitor.ts
interface TTSMetric {
operation: string;
voiceId: string;
modelId: string;
textLength: number;
latencyMs: number;
success: boolean;
errorCode?: string;
}
function emitMetric(metric: TTSMetric) {
// Send to your monitoring system (Datadog, CloudWatch, Prometheus, etc.)
console.log(JSON.stringify({
...metric,
timestamp: new Date().toISOString(),
service: "elevenlabs",
}));
}
// Alert thresholds
const ALERT_RULES = {
p99_latency_ms: 5000, // Alert if p99 > 5 seconds
error_rate_pct: 5, // Alert if error rate > 5%
quota_used_pct: 80, // Alert when 80% quota used
circuit_breaker_open: true, // Alert on circuit breaker trip
};
#!/bin/bash
# pre-flight-check.sh — Run before deploying
echo "=== ElevenLabs Pre-Flight Check ==="
# 1. API connectivity
HTTP=$(curl -s -o /dev/null -w "%{http_code}" \
https://api.elevenlabs.io/v1/user \
-H "xi-api-key: ${ELEVENLABS_API_KEY}")
echo "API connectivity: HTTP $HTTP"
[ "$HTTP" != "200" ] && echo "FAIL: API not reachable" && exit 1
# 2. Quota check
QUOTA=$(curl -s https://api.elevenlabs.io/v1/user \
-H "xi-api-key: ${ELEVENLABS_API_KEY}" | \
jq '.subscription | (.character_limit - .character_count)')
echo "Characters remaining: $QUOTA"
[ "$QUOTA" -lt 10000 ] && echo "WARN: Low quota"
# 3. Voice availability
VOICE_COUNT=$(curl -s https://api.elevenlabs.io/v1/voices \
-H "xi-api-key: ${ELEVENLABS_API_KEY}" | jq '.voices | length')
echo "Voices available: $VOICE_COUNT"
# 4. TTS smoke test
TTS_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-X POST "https://api.elevenlabs.io/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM" \
-H "xi-api-key: ${ELEVENLABS_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"text":"Pre-flight check.","model_id":"eleven_flash_v2_5"}')
echo "TTS smoke test: HTTP $TTS_STATUS"
[ "$TTS_STATUS" != "200" ] && echo "FAIL: TTS not working" && exit 1
echo "=== All checks passed ==="
| Alert | Condition | Severity |
|---|---|---|
| API unreachable | Health check fails 3x | P1 — Critical |
| Quota exhausted | 401 quota_exceeded | P1 — Critical |
| High error rate | 5xx > 5% of requests | P2 — High |
| Rate limited | 429 > 10/min sustained | P2 — High |
| High latency | p99 > 5000ms | P3 — Medium |
| Quota warning | > 80% used | P3 — Medium |
| Scenario | Response |
|---|---|
| ElevenLabs API down | Circuit breaker opens; fallback to cached/placeholder audio |
| Quota exhausted mid-day | Alert team; switch to Flash model (0.5x cost); queue non-urgent requests |
| Voice deleted | Return 404 to caller; alert; fall back to default voice |
| Webhook delivery failing | Monitor ElevenLabs webhook health; webhooks auto-disable after 10 failures |
For version upgrades, see elevenlabs-upgrade-migration. For cost optimization, see elevenlabs-cost-tuning.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 skills in this plugin
/elevenlabs-ci-integrationConfigure CI/CD pipelines for ElevenLabs with mocked unit tests and gated integration tests.
Use when setting up GitHub Actions for TTS projects, configuring CI test strategies,
or automating ElevenLabs integration validation.
Trigger: "elevenlabs CI", "elevenlabs GitHub Actions",
"elevenlabs automated tests", "CI elevenlabs", "elevenlabs pipeline".
/elevenlabs-common-errorsDiagnose and fix ElevenLabs API errors by HTTP status code.
Use when encountering ElevenLabs errors, debugging failed TTS/STS requests,
or troubleshooting voice cloning and streaming issues.
Trigger: "elevenlabs error", "fix elevenlabs", "elevenlabs not working",
"debug elevenlabs", "elevenlabs 401", "elevenlabs 429", "elevenlabs 400".
/elevenlabs-core-workflow-aImplement ElevenLabs text-to-speech and voice cloning workflows.
Use when building TTS features, cloning voices from audio samples,
or implementing the primary ElevenLabs money-path: voice generation.
Trigger: "elevenlabs TTS", "text to speech", "voice cloning elevenlabs",
"clone a voice", "generate speech", "elevenlabs voice".
/elevenlabs-core-workflow-bImplement ElevenLabs speech-to-speech, sound effects, audio isolation, and speech-to-text.
Use when converting voice to another voice, generating sound effects from text,
removing background noise, or transcribing audio.
Trigger: "elevenlabs speech to speech", "voice changer", "sound effects",
"audio isolation", "remove background noise", "elevenlabs transcribe".
/elevenlabs-cost-tuningOptimize ElevenLabs costs through model selection, character-efficient patterns,
caching, and usage monitoring with budget alerts.
Use when analyzing ElevenLabs billing, reducing character usage,
or implementing quota monitoring for TTS workloads.
Trigger: "elevenlabs cost", "elevenlabs billing", "reduce elevenlabs costs",
"elevenlabs pricing", "elevenlabs expensive", "elevenlabs budget",
"elevenlabs characters", "elevenlabs quota".
/elevenlabs-debug-bundleCollect ElevenLabs debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for ElevenLabs problems.
Trigger: "elevenlabs debug", "elevenlabs support bundle",
"collect elevenlabs logs", "elevenlabs diagnostic", "elevenlabs support ticket".
npx claudepluginhub flight505/skill-forge --plugin elevenlabs-packOther plugins' skills for the same job