livekit-prompt-builder
Guide for creating effective prompts and instructions for LiveKit voice agents. Use when building conversational AI agents with the LiveKit Agents framework, including (1) Creating new voice agent prompts from scratch, (2) Improving existing agent instructions, (3) Optimizing prompts for text-to-speech output, (4) Integrating tool/function calling capabilities, (5) Building multi-agent systems with handoffs, (6) Ensuring voice-friendly formatting and brevity for natural conversations, (7) Iteratively improving prompts based on testing and feedback, (8) Building industry-specific agents (debt collection, healthcare, banking, customer service, front desk).
What this skill does
# LiveKit Voice Agent Prompt Builder
Create production-ready prompts for LiveKit voice agents that work seamlessly with text-to-speech systems.
## Quick Start
For most use cases, follow this simple workflow:
1. **Choose a template** from `assets/templates/` that matches your use case
2. **Customize** the template with your specific information
3. **Validate** using `scripts/validate_prompt.py`
4. **Test** with your LiveKit agent
5. **Refine** based on real conversations
## Workflow
### Step 1: Determine Your Agent Type
Select the template that best matches your needs:
**General Purpose:**
- **Basic Assistant** (`basic-assistant.txt`) - Simple conversational agent
- Use for: General chat, demos, minimal functionality
- Complexity: Low
- Tools: Optional
- **Tool-Enabled Agent** (`tool-enabled-agent.txt`) - Agent with function calling
- Use for: Weather, search, data lookup, single-domain assistants
- Complexity: Medium
- Tools: 1-5 tools
- **Customer Service** (`customer-service.txt`) - Support agent with escalation
- Use for: Help desks, support lines, troubleshooting
- Complexity: Medium
- Tools: Lookup, search, escalation
- **Specialist Agent** (`specialist-agent.txt`) - Task-specific agent (reservations, orders, etc.)
- Use for: Booking systems, order taking, appointments
- Complexity: Medium-High
- Tools: Action tools (create, update)
- **Multi-Agent Coordinator** (`multi-agent-coordinator.txt`) - Routes to other agents
- Use for: Main entry point in multi-agent systems
- Complexity: Medium
- Tools: Transfer/handoff tools
**Industry-Specific:**
- **Front Desk Receptionist** (`front-desk-receptionist.txt`) - Professional call routing
- Use for: Office reception, call centers, front desk operations
- Complexity: Low-Medium
- Tools: Transfer, routing, message taking
- **Debt Collection** (`debt-collection-agent.txt`) - Compliant recovery agent
- Use for: Debt recovery, collections, payment arrangements
- Complexity: High
- Tools: Payment processing, sentiment analysis
- Note: Includes FDCPA/TCPA/CFPB compliance requirements
### Step 2: Customize Your Template
Open your selected template and fill in the placeholders:
**Example - Customizing `basic-assistant.txt`:**
Template:
```
You are [NAME], a friendly voice assistant. You are [TRAIT_1] and [TRAIT_2], with [TRAIT_3].
```
Customized:
```
You are Casey, a friendly voice assistant. You are helpful and patient, with a sense of humor.
```
**Key customization areas:**
- Identity (name, role, personality)
- Domain context (business info, hours, policies)
- Tool descriptions (when and how to use each tool)
- Workflow steps (information collection sequence)
- Boundaries (what agent can't do)
### Step 3: Apply Voice Optimization
Ensure your prompt includes these critical voice optimization rules:
**Required elements:**
```
Keep your responses brief - 1-3 sentences. Respond in plain text only - no emojis, asterisks, markdown, or special formatting. Ask one question at a time.
```
**For agents that mention numbers, prices, or contact info:**
```
Spell out numbers ("fifteen" not "15"). Spell phone numbers digit by digit ("5-5-5, 1-2-3-4"). For URLs, omit "https://" and say "dot" for periods.
```
**For agents with tools:**
```
If a tool call fails, explain the issue simply and suggest a fallback. Summarize tool results in conversational language - don't recite technical IDs or raw data.
```
### Step 4: Validate Your Prompt
Run the validation script to check for common issues:
```bash
python scripts/validate_prompt.py your_prompt.txt
```
The validator checks for:
- Missing identity statement
- Lack of voice optimization rules
- TTS antipatterns (emojis, markdown, special characters)
- Excessive length (>500 words)
- Missing tool error handling
- Number formatting guidance
**Fix any errors** before deploying your prompt.
### Step 5: Test with LiveKit
Deploy your prompt in a LiveKit agent and test with real conversations:
**Test scenarios:**
1. **Happy path** - User provides information smoothly
2. **Interruptions** - User changes topic or interrupts
3. **Tool failures** - Simulate tool errors
4. **Edge cases** - Ambiguous requests, out-of-scope questions
5. **Voice quality** - Listen to TTS output for formatting issues
### Step 6: Refine
Based on testing, refine your prompt:
**Common refinements:**
- Add specific guidance for observed failure modes
- Adjust tone or personality descriptors
- Add examples for complex tool usage
- Tighten response length constraints if agent is too verbose
- Add boundaries for out-of-scope requests
## Key Concepts
### Voice-First Design
Voice agents differ from text chatbots:
**Critical differences:**
- No visual formatting (users can't see bold, lists, etc.)
- Limited user patience (long responses cause frustration)
- TTS limitations (special characters cause problems)
- No "scroll back" (users can't review previous responses)
**Implications for prompts:**
- Always specify plain text only
- Enforce brevity (1-3 sentences typical)
- Spell out numbers and abbreviations
- Ask one question at a time
- Avoid complex structures (lists, tables)
### The Three Essential Sections
Every voice agent prompt should have:
1. **Identity** - "You are [name/role]. You are [personality]."
2. **Voice Rules** - Plain text, brief responses, number formatting
3. **Core Functionality** - What the agent does, tools it uses, workflows it follows
Additional sections (domain context, guardrails, handoffs) add as needed.
### Template vs. Custom Prompts
**Use templates when:**
- Starting a new agent
- Following common patterns (support, booking, etc.)
- Want quick setup with best practices
**Write custom when:**
- Unique use case not covered by templates
- Very specialized domain
- Complex multi-step workflows
Even with custom prompts, reference the templates for voice optimization patterns.
## Progressive Disclosure: When to Load References
Load reference documentation based on your specific needs:
**For all users:**
- Start with templates and this SKILL.md
**Load prompt-components.md when:**
- Building complex prompts from scratch
- Need detailed guidance on specific sections
- Want to understand the "why" behind best practices
- Customizing beyond simple template fill-in
**Load voice-optimization.md when:**
- Encountering TTS formatting issues
- Agent responses sound awkward or unnatural
- Need deep understanding of voice-specific constraints
- Working with multiple TTS providers
- Debugging number, URL, or email pronunciation
**Load tool-integration.md when:**
- Integrating function calling/tools
- Building multi-agent systems with handoffs
- Need patterns for error handling or parameter collection
- Tools aren't being used correctly
- Working with RAG or external data sources
**Load examples.md when:**
- Want to see complete, real-world prompts
- Need inspiration for similar use cases
- Comparing complexity levels
- Learning from production patterns
**Load industry-best-practices.md when:**
- Building agents for regulated industries (healthcare, banking, debt collection)
- Need compliance guidance (HIPAA, FDCPA, TCPA, etc.)
- Working on industry-specific use cases (front desk, customer service, sales)
- Require specialized tone and approach patterns
- Need security or privacy considerations
**Load iterative-improvement.md when:**
- Improving existing prompts based on feedback
- Analyzing test results and conversation data
- Conducting A/B tests on prompt variations
- Establishing metrics and measurement frameworks
- Need systematic approach to prompt refinement
- Want to preserve prompt structure while making improvements
**Strategy:** Start minimal (templates + SKILL.md). Load references only when you hit specific challenges or need deeper guidance.
## Multi-Agent Systems
For systems with multiple agents, design each agent separately:
**Pattern:**
1. **Coordinator/Greeter** - Uses `multi-agentRelated in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.