jeremylongshore-tons-of-skills-marketplace-deepgram-inci-9b06aa.ocm.json json Copy{
"ocm" : "1" ,
"id" : "jeremylongshore-tons-of-skills-marketplace-deepgram-inci-9b06aa" ,
"kind" : "skill" ,
"name" : "deepgram-incident-runbook" ,
"description" : "Execute Deepgram incident response procedures for production issues. Use when handling Deepgram outages, debugging production failures, or responding to service degradation. Trigger: \"deepgram incident\", \"deepgram outage\", \"deepgram production issue\", \"deepgram down\", \"deepgram emergency\", \"deepgram 500 errors\"." ,
"publisher" : "jeremylongshore" ,
"version" : "1.0.0" ,
"capabilities" : {
"domains" : [
"observability" ,
"coding"
],
"tags" : [
"skill-md" ,
"saas" ,
"deepgram" ,
"debugging" ,
"incident-response" ,
"skills-sh"
],
"languages" : [
"en"
]
},
"quality_prior" : 0.6 ,
"examples" : [
"Execute Deepgram incident response procedures for production issues. Use when handling Deepgram outages, debugging production failures, or responding to service degradation. Trigger: \"deepgram incident\", \"deepgram outage\", \"deepgram production issue\", \"deepgram down\", \"deepgram emergency\", \"deepgram 500 errors\"."
],
"primary" : false ,
"metadata" : {
"source" : {
"provider" : "skills.sh" ,
"repository" : "https://github.com/jeremylongshore/tons-of-skills-marketplace" ,
"path" : "skills/.curated/deepgram-incident-runbook/SKILL.md" ,
"ref" : "HEAD" ,
"url" : "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/deepgram-incident-runbook/SKILL.md" ,
"key" : "jeremylongshore/tons-of-skills-marketplace/skills/.curated/deepgram-incident-runbook/SKILL.md"
},
"compatibility" : "Designed for Claude Code" ,
"allowed_tools" : [
"Read," ,
"Write," ,
"Edit," ,
"Bash(curl:*)," ,
"Bash(kubectl:*)"
],
"license" : "MIT"
},
"instructions" : "# Deepgram Incident Runbook\n\n## Prerequisites\n\n- An incident ID, commander, affected service/environment, escalation route, and authorized redacted diagnostic access.\n- A data/consent owner and documented safe mitigation or rollback action.\n\n## Examples\n\nFor elevated transcription errors, declare scope, capture aggregate health and redacted correlation IDs, stabilize with the documented circuit-breaker/rollback, and verify recovery against the SLO. Escalate provider or data-impact incidents through the approved path; do not attach customer audio, transcripts, or credentials to the incident channel.\n\n## Overview\n\nStandardized incident response for Deepgram-related production issues. Includes automated triage script, severity classification (SEV1-SEV4), immediate mitigation actions, fallback activation, and post-incident review template.\n\n## Quick Reference\n\n| Resource | URL |\n|----------|-----|\n| Deepgram Status | https://status.deepgram.com |\n| Deepgram Console | https://console.deepgram.com |\n| Support Email | support@deepgram.com |\n| Community | https://github.com/orgs/deepgram/discussions |\n\n## Severity Classification\n\n| Level | Definition | Response Time | Example |\n|-------|------------|---------------|---------|\n| SEV1 | Complete outage, all transcriptions failing | Immediate | 100% 5xx errors |\n| SEV2 | Major degradation, >50% error rate | < 15 min | Specific model failing |\n| SEV3 | Minor degradation, elevated latency | < 1 hour | P95 > 30s |\n| SEV4 | Single feature affected, cosmetic | < 24 hours | Diarization inaccurate |\n\n## Instructions\n\n### Step 1: Automated Triage (First 5 Minutes)\n\n```bash\n#!/bin/bash\nset -euo pipefail\necho \"=== Deepgram Incident Triage ===\"\necho \"Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\necho \"\"\n\n# 1. Check Deepgram status page\necho \"--- Status Page ---\"\nSTATUS=$(curl -s -o /dev/null -w \"%{http_code}\" https://status.deepgram.com)\necho \"Status page: HTTP $STATUS\"\n\n# 2. Test API connectivity\necho \"\"\necho \"--- API Connectivity ---\"\ncurl -s -w \"\\nHTTP: %{http_code} | Latency: %{time_total}s\\n\" \\\n 'https://api.deepgram.com/v1/projects' \\\n -H \"Authorization: Token $DEEPGRAM_API_KEY\" | head -5\n\n# 3. Test transcription\necho \"\"\necho \"--- Transcription Test ---\"\nRESULT=$(curl -s -w \"\\n%{http_code}\" \\\n -X POST 'https://api.deepgram.com/v1/listen?model=nova-3&smart_format=true' \\\n -H \"Authorization: Token $DEEPGRAM_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://static.deepgram.com/examples/Bueller-Life-moves-702702706.wav\"}')\nHTTP_CODE=$(echo \"$RESULT\" | tail -1)\necho \"Transcription: HTTP $HTTP_CODE\"\n\n# 4. Test multiple models\necho \"\"\necho \"--- Model Tests ---\"\nfor MODEL in nova-3 nova-2 base; do\n CODE=$(curl -s -o /dev/null -w \"%{http_code}\" \\\n -X POST \"https://api.deepgram.com/v1/listen?model=$MODEL\" \\\n -H \"Authorization: Token $DEEPGRAM_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"url\":\"https://static.deepgram.com/examples/Bueller-Life-moves-702702706.wav\"}')\n echo \"$MODEL: HTTP $CODE\"\ndone\n\n# 5. Query internal metrics (if available)\necho \"\"\necho \"--- Internal Metrics ---\"\ncurl -s localhost:3000/health 2>/dev/null || echo \"Health endpoint unavailable\"\n```\n\n### Step 2: SEV1 Response (Complete Outage)\n\n```typescript\nimport { createClient } from '@deepgram/sdk';\n\nclass DeepgramFallbackService {\n private primaryClient: ReturnType<typeof createClient>;\n private isInFallbackMode = false;\n private failedRequests: Array<{ url: string; options: any; timestamp: Date }> = [];\n\n constructor(apiKey: string) {\n this.primaryClient = createClient(apiKey);\n }\n\n async transcribe(url: string, options: any) {\n if (this.isInFallbackMode) {\n return this.handleFallback(url, options);\n }\n\n try {\n const { result, error } = await this.primaryClient.listen.prerecorded.transcribeUrl(\n { url }, options\n );\n if (error) throw error;\n return { source: 'deepgram', result };\n } catch (err) {\n console.error('Deepgram failed, entering fallback mode');\n this.isInFallbackMode = true;\n return this.handleFallback(url, options);\n }\n }\n\n private handleFallback(url: string, options: any) {\n // Queue for later replay\n this.failedRequests.push({ url, options, timestamp: new Date() });\n console.warn(`Queued for replay: ${url} (${this.failedRequests.length} in queue)`);\n\n return {\n source: 'fallback',\n message: 'Transcription queued — Deepgram is currently unavailable',\n queuePosition: this.failedRequests.length,\n };\n }\n\n // Call when Deepgram recovers\n async replayQueue() {\n console.log(`Replaying ${this.failedRequests.length} queued requests...`);\n const queue = [...this.failedRequests];\n this.failedRequests = [];\n this.isInFallbackMode = false;\n\n for (const req of queue) {\n try {\n await this.transcribe(req.url, req.options);\n console.log(`Replayed: ${req.url}`);\n } catch (err: any) {\n console.error(`Replay failed: ${req.url} — ${err.message}`);\n this.failedRequests.push(req);\n }\n }\n }\n}\n```\n\n### Step 3: SEV2 Response (Partial Degradation)\n\n```typescript\nasync function mitigateSev2() {\n const client = createClient(process.env.DEEPGRAM_API_KEY!);\n const testUrl = 'https://static.deepgram.com/examples/Bueller-Life-moves-702702706.wav';\n\n console.log('=== SEV2 Mitigation ===');\n\n // Test each model to find working ones\n const models = ['nova-3', 'nova-2', 'base', 'whisper-large'] as const;\n const working: string[] = [];\n const broken: string[] = [];\n\n for (const model of models) {\n try {\n const { error } = await client.listen.prerecorded.transcribeUrl(\n { url: testUrl }, { model }\n );\n if (error) throw error;\n working.push(model);\n console.log(` [OK] ${model}`);\n } catch {\n broken.push(model);\n console.log(` [FAIL] ${model}`);\n }\n }\n\n // Recommended actions\n console.log(`\\nWorking models: ${working.join(', ')}`);\n console.log(`Broken models: ${broken.join(', ')}`);\n\n if (working.length > 0) {\n console.log(`\\nAction: Switch to ${working[0]} until ${broken.join(', ')} recovers`);\n } else {\n console.log('\\nAction: All models failing — escalate to SEV1');\n }\n\n // Test features\n const features = [\n { name: 'diarize', opts: { diarize: true } },\n { name: 'smart_format', opts: { smart_format: true } },\n { name: 'utterances', opts: { utterances: true } },\n ];\n\n console.log('\\n--- Feature Tests ---');\n for (const { name, opts } of features) {\n try {\n const { error } = await client.listen.prerecorded.transcribeUrl(\n { url: testUrl }, { model: working[0] ?? 'nova-3', ...opts }\n );\n console.log(` [${error ? 'FAIL' : 'OK'}] ${name}`);\n } catch {\n console.log(` [FAIL] ${name}`);\n }\n }\n}\n```\n\n### Step 4: SEV3/SEV4 Mitigation\n\n```typescript\n// SEV3: Elevated latency — increase timeouts and enable aggressive retry\nfunction configureSev3Mitigation() {\n return {\n timeout: 60000, // Increase from 30s to 60s\n maxRetries: 5, // Increase from 3 to 5\n model: 'nova-2', // Fallback to proven model\n diarize: false, // Disable to reduce processing\n smart_format: true, // Keep basic formatting\n utterances: false, // Disable to reduce processing\n summarize: false, // Disable\n detect_topics: false, // Disable\n };\n}\n\n// SEV4: Single feature broken — disable and continue\nfunction configureSev4Mitigation(brokenFeature: string) {\n const overrides: Record<string, any> = {};\n overrides[brokenFeature] = false;\n console.log(`Disabled ${brokenFeature} — filing Deepgram support ticket`);\n return overrides;\n}\n```\n\n### Step 5: Post-Incident Review Template\n\n```markdown\n## Deepgram Incident Report\n\n**Date:** YYYY-MM-DD\n**Duration:** HH:MM start — HH:MM end (X minutes total)\n**Severity:** SEV1/2/3/4\n**On-Call:** [Name]\n\n### Timeline\n| Time (UTC) | Event |\n|------------|-------|\n| HH:MM | Alert fired: [alert name] |\n| HH:MM | On-call acknowledged |\n| HH:MM | Triage completed, classified as SEV[N] |\n| HH:MM | Mitigation applied: [action taken] |\n| HH:MM | Service restored |\n| HH:MM | All-clear confirmed |\n\n### Impact\n- **Failed requests:** N\n- **Affected users:** N\n- **Revenue impact:** $X\n- **SLA impact:** X minutes of downtime\n\n### Root Cause\n[Description of root cause — Deepgram outage / configuration issue / etc.]\n\n### What Went Well\n- [Item 1]\n- [Item 2]\n\n### What Could Be Improved\n- [Item 1]\n- [Item 2]\n\n### Action Items\n| Action | Owner | Due Date |\n|--------|-------|----------|\n| [Action 1] | [Name] | YYYY-MM-DD |\n| [Action 2] | [Name] | YYYY-MM-DD |\n```\n\n### Step 6: Escalation Matrix\n\n| Level | Contact | When |\n|-------|---------|------|\n| L1 | On-call engineer | Alert fires |\n| L2 | Team lead | 15 min without resolution |\n| L3 | Deepgram support (support@deepgram.com) | Confirmed Deepgram-side issue |\n| L4 | Engineering director | SEV1 > 1 hour |\n\n## Output\n\n- Automated triage script (bash, runs in <30s)\n- SEV1 fallback service with request queue and replay\n- SEV2 model/feature diagnosis and auto-fallback\n- SEV3/SEV4 mitigation configurations\n- Post-incident review template\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Triage script can't reach Deepgram | Network or DNS | Check outbound HTTPS to api.deepgram.com |\n| Fallback queue growing | Extended outage | Alert if queue > 1000, consider alternate STT |\n| Replay failures | Audio URLs expired | Re-fetch audio from source before replay |\n| Status page shows green but API fails | Partial outage not yet reflected | Report to Deepgram support immediately |\n\n## Resources\n\n- [Status Page](https://status.deepgram.com)\n- [Support Portal](https://developers.deepgram.com/support)\n- [Deepgram Community](https://github.com/orgs/deepgram/discussions)" ,
"cost" : {
"context_tokens" : 2469
}
}