twilio
Twilio API for SMS, voice, WhatsApp, and Verify. Use when user mentions "Twilio", "send SMS", "voice call", "WhatsApp message", "phone number lookup", or "Verify OTP".
What this skill does
## Troubleshooting
If requests fail, run `zero doctor check-connector --env-name TWILIO_ACCOUNT_SID` or `zero doctor check-connector --url https://api.twilio.com/2010-04-01/Accounts.json --method GET`
## How to Use
All examples assume `TWILIO_ACCOUNT_SID` and `TWILIO_AUTH_TOKEN` are set. Twilio uses HTTP Basic auth — the Account SID is the username, the Auth Token is the password.
Base URL: `https://api.twilio.com/2010-04-01` (core REST API). Product subdomains for newer services: `verify.twilio.com`, `messaging.twilio.com`, `lookups.twilio.com`, `serverless.twilio.com`, `studio.twilio.com`.
Pass credentials to curl with `-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"`.
### 1. Verify the Credentials
Fetch the account record — a quick sanity check that the SID/token pair is valid:
```bash
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" | jq '{sid, friendly_name, status, type}'
```
### 2. Send an SMS
`From` must be a number you own (purchased through Twilio) or a Messaging Service SID. Body is plain text. Returns the message resource including `sid` and initial `status`:
```bash
curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "From=+14155550100" --data-urlencode "Body=Hello from vm0"
```
### 3. Send a WhatsApp Message
Prefix WhatsApp numbers with `whatsapp:`. Use Twilio's sandbox or an approved sender:
```bash
curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=whatsapp:+14155552671" --data-urlencode "From=whatsapp:+14155238886" --data-urlencode "Body=Hi via WhatsApp"
```
### 4. Send an MMS (with media)
Pass one or more `MediaUrl` values. Each URL must be publicly reachable:
```bash
curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "From=+14155550100" --data-urlencode "Body=See attached" --data-urlencode "MediaUrl=https://example.com/photo.jpg"
```
### 5. List Recent Messages
```bash
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json?PageSize=20" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" | jq '.messages[] | {sid, from, to, status, body, date_sent}'
```
Filter by recipient or date:
```bash
curl -s -G "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "DateSent>=2026-04-01"
```
### 6. Fetch a Specific Message (by SID)
Replace `<message-sid>` (always starts with `SM`) with a value returned from the send/list endpoints:
```bash
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages/<message-sid>.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
```
### 7. Make an Outbound Voice Call
The `Url` returns TwiML that drives the call. For a quick test, point it at the Twilio demo TwiML hosted on Twimlets:
```bash
curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Calls.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "From=+14155550100" --data-urlencode "Url=http://demo.twilio.com/docs/voice.xml"
```
### 8. List Recent Calls
```bash
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Calls.json?PageSize=20" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" | jq '.calls[] | {sid, from, to, status, duration, start_time}'
```
### 9. List Phone Numbers You Own
```bash
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/IncomingPhoneNumbers.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" | jq '.incoming_phone_numbers[] | {sid, phone_number, friendly_name, capabilities}'
```
### 10. Search for Available Numbers to Buy
Find a US local number with SMS + MMS capability:
```bash
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/AvailablePhoneNumbers/US/Local.json?SmsEnabled=true&MmsEnabled=true&PageSize=10" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" | jq '.available_phone_numbers[] | {phone_number, locality, region}'
```
### 11. Look Up a Phone Number (Lookups v2)
Returns carrier, line type, country, and validity. Replace `<phone-number>` with an E.164-formatted number:
```bash
curl -s "https://lookups.twilio.com/v2/PhoneNumbers/<phone-number>?Fields=line_type_intelligence" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
```
### 12. Create a Verify Service (Verify v2 — OTP / 2FA)
```bash
curl -s -X POST "https://verify.twilio.com/v2/Services" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "FriendlyName=vm0 OTP"
```
The response includes a service SID (`VAxxxxxxxx...`) used in subsequent verifications.
### 13. Send a Verification Code
Replace `<verify-service-sid>` with the SID from step 12. Channel is `sms`, `call`, `whatsapp`, or `email`:
```bash
curl -s -X POST "https://verify.twilio.com/v2/Services/<verify-service-sid>/Verifications" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "Channel=sms"
```
### 14. Check a Verification Code
```bash
curl -s -X POST "https://verify.twilio.com/v2/Services/<verify-service-sid>/VerificationCheck" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "Code=123456"
```
`status` will be `approved`, `pending`, or `canceled`.
## Common Workflows
### Send an SMS and poll for delivery
```bash
# 1. Send and capture the message SID
curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "To=+14155552671" --data-urlencode "From=+14155550100" --data-urlencode "Body=Order #1234 ready" | jq -r '.sid'
# 2. Poll status until delivered, failed, or undelivered (replace <message-sid>)
curl -s "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages/<message-sid>.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" | jq '{status, error_code, error_message}'
```
### Buy a number from a search result
```bash
# 1. Search (see step 10) and copy a phone_number
# 2. Purchase it
curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/IncomingPhoneNumbers.json" -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" --data-urlencode "PhoneNumber=<phone-number>"
```
## Guidelines
1. The Account SID always starts with `AC` and is 34 characters; Auth Tokens are 32 hex characters.
2. All form fields use `--data-urlencode` — Twilio rejects `application/json` on the classic `api.twilio.com` endpoints; payloads are `application/x-www-form-urlencoded`.
3. Phone numbers must be E.164 format (`+14155552671`). For WhatsApp, prefix with `whatsapp:`.
4. Newer products (Verify, Lookups, Messaging, Studio, Serverless) use product subdomains, not the `2010-04-01` REST root.
5. SMS status flows through `queued → sending → sent → delivered` (or `failed` / `undelivered`). Use webhook callbacks or poll the message resource — there's no list-of-deliveries stream.
6. Trial accounts can only send to verified numbers and Twilio prepends a trial header to every SMS.
7. Pagination uses `PageSize` (max 1000) and either `Page` or the `next_page_uri` field in the response.
8. Rate limits are account-wide and product-specific; expect ~100 messages/sec on standard senders, much lower on trial. Inspect `Twilio-Rate-Limit-Remaining`.
9. Verify codes default to 6 digits and 10 minutes; configure on the Verify Service resource.
## API Reference
- REST API overview: https://www.twilio.com/docs/iam/api
- Messages (SMS / MMS / WhatsApp): https://www.twilio.com/docs/messaging/api/message-resource
- Calls (Voice): https://www.twilio.com/docs/voiRelated 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.