/assemblyai-pack:assemblyai-security-basicsfrom assemblyai-pack
Applies AssemblyAI security best practices for API key management, temporary tokens for browser streaming, PII redaction, and data retention/deletion policies.
Ships in assemblyai-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.
Security best practices for AssemblyAI: API key management, temporary tokens for browser clients, PII redaction, and data retention policies.
assemblyai package installed# .env (NEVER commit)
ASSEMBLYAI_API_KEY=your-api-key-here
# .gitignore
.env
.env.local
.env.*.local
// Never hardcode API keys
// BAD:
const client = new AssemblyAI({ apiKey: 'sk_abc123...' });
// GOOD:
import { AssemblyAI } from 'assemblyai';
const client = new AssemblyAI({
apiKey: process.env.ASSEMBLYAI_API_KEY!,
});
Never expose your API key in frontend code. Use temporary tokens for browser-side streaming:
// Server-side: /api/assemblyai-token.ts
import { AssemblyAI } from 'assemblyai';
const client = new AssemblyAI({
apiKey: process.env.ASSEMBLYAI_API_KEY!,
});
export async function GET() {
// Token expires after 5 minutes
const token = await client.streaming.createTemporaryToken({
expires_in_seconds: 300,
});
return Response.json({ token });
}
// Client-side: use the temporary token
// const { token } = await fetch('/api/assemblyai-token').then(r => r.json());
// const transcriber = new StreamingTranscriber({ token });
const transcript = await client.transcripts.transcribe({
audio: audioUrl,
redact_pii: true,
redact_pii_policies: [
'email_address',
'phone_number',
'person_name',
'credit_card_number',
'social_security_number',
'date_of_birth',
'medical_condition',
'banking_information',
'us_social_security_number',
],
redact_pii_sub: 'entity_name', // or 'hash'
// 'entity_name': "My name is [PERSON_NAME]"
// 'hash': "My name is ####"
});
// Also redact the audio itself
const transcriptWithRedactedAudio = await client.transcripts.transcribe({
audio: audioUrl,
redact_pii: true,
redact_pii_policies: ['person_name', 'phone_number'],
redact_pii_audio: true, // Generates audio with PII beeped out
});
// Delete transcript data for GDPR/privacy compliance
await client.transcripts.delete(transcriptId);
// This permanently removes the transcript text and metadata
// The audio file at your source URL is NOT deleted (you manage that)
// List and bulk-delete old transcripts
const page = await client.transcripts.list({ limit: 100 });
for (const t of page.transcripts) {
const createdDate = new Date(t.created);
const daysOld = (Date.now() - createdDate.getTime()) / (1000 * 60 * 60 * 24);
if (daysOld > 30) {
await client.transcripts.delete(t.id);
console.log(`Deleted transcript ${t.id} (${daysOld.toFixed(0)} days old)`);
}
}
// Detect sensitive content before it reaches your users
const transcript = await client.transcripts.transcribe({
audio: audioUrl,
content_safety: true,
});
const safetyResults = transcript.content_safety_labels?.results ?? [];
for (const result of safetyResults) {
for (const label of result.labels) {
if (label.confidence > 0.8) {
console.warn(`Content safety flag: ${label.label} (${(label.confidence * 100).toFixed(0)}%)`);
// Labels include: hate_speech, violence, profanity, etc.
}
}
}
// Get overall severity summary
const summary = transcript.content_safety_labels?.summary ?? {};
for (const [category, severity] of Object.entries(summary)) {
console.log(`${category}: severity ${severity}`);
}
.env files listed in .gitignore| Security Issue | Detection | Mitigation |
|---|---|---|
| API key in source code | Git scanning / secrets detection | Rotate key immediately at dashboard |
| API key in browser JS | Network tab inspection | Use temporary tokens |
| PII in transcripts | Manual review or automated scan | Enable redact_pii |
| Old transcripts retained | Audit transcript list | Automate deletion schedule |
For production deployment, see assemblyai-prod-checklist.
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/assemblyai-ci-integrationConfigure AssemblyAI CI/CD integration with GitHub Actions and testing.
Use when setting up automated testing, configuring CI pipelines,
or integrating AssemblyAI transcription tests into your build process.
Trigger with phrases like "assemblyai CI", "assemblyai GitHub Actions",
"assemblyai automated tests", "CI assemblyai".
/assemblyai-common-errorsDiagnose and fix AssemblyAI common errors and exceptions.
Use when encountering AssemblyAI errors, debugging failed transcriptions,
or troubleshooting streaming and LeMUR issues.
Trigger with phrases like "assemblyai error", "fix assemblyai",
"assemblyai not working", "debug assemblyai", "transcription failed".
/assemblyai-core-workflow-aExecute AssemblyAI primary workflow: async transcription with audio intelligence.
Use when transcribing audio/video files, enabling speaker diarization,
sentiment analysis, entity detection, PII redaction, or content moderation.
Trigger with phrases like "assemblyai transcribe", "assemblyai transcription",
"transcribe audio", "speaker diarization assemblyai".
/assemblyai-core-workflow-bExecute AssemblyAI streaming transcription and LeMUR workflows.
Use when implementing real-time speech-to-text, live captions,
voice agents, or LLM-powered audio analysis with LeMUR.
Trigger with phrases like "assemblyai streaming", "assemblyai real-time",
"assemblyai live transcription", "assemblyai LeMUR", "assemblyai summarize audio".
/assemblyai-cost-tuningOptimize AssemblyAI costs through model selection, feature budgeting, and usage monitoring.
Use when analyzing AssemblyAI billing, reducing transcription costs,
or implementing usage monitoring and budget alerts.
Trigger with phrases like "assemblyai cost", "assemblyai billing",
"reduce assemblyai costs", "assemblyai pricing", "assemblyai budget".
/assemblyai-debug-bundleCollect AssemblyAI debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for AssemblyAI problems.
Trigger with phrases like "assemblyai debug", "assemblyai support bundle",
"collect assemblyai logs", "assemblyai diagnostic".
npx claudepluginhub flight505/skill-forge --plugin assemblyai-packOther plugins' skills for the same job