[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EGFHEMBW45V914NJ64AC5R":3,"skill-same:01M6EGFHEMBW45V914NJ64AC5R":51},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EGFHEMBW45V914NJ64AC5R","twilio",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Ftwilio\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# Twilio\n\n## Overview\n\nTwilio is the leading cloud communications platform. This skill covers sending SMS\u002FMMS messages, WhatsApp messaging, two-factor authentication (Verify API), voice calls, and handling incoming messages via webhooks. Twilio provides phone numbers in 100+ countries and handles carrier-level complexity so you work with a simple API.\n\n## Instructions\n\n### Step 1: Setup\n\n```bash\n# Node.js\nnpm install twilio\n\n# Python\npip install twilio\n```\n\n```typescript\n\u002F\u002F lib\u002Ftwilio.ts — Client initialization\nimport twilio from 'twilio'\n\nconst client = twilio(\n  process.env.TWILIO_ACCOUNT_SID,\n  process.env.TWILIO_AUTH_TOKEN\n)\n```\n\n### Step 2: Send SMS\n\n```typescript\n\u002F\u002F sms.ts — Send and receive SMS messages\nimport twilio from 'twilio'\n\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN)\n\n\u002F\u002F Send SMS\nconst message = await client.messages.create({\n  body: 'Your order #1234 has shipped! Track it at: https:\u002F\u002Ftrack.example.com\u002F1234',\n  from: process.env.TWILIO_PHONE_NUMBER,    \u002F\u002F your Twilio number\n  to: '+15551234567',                        \u002F\u002F recipient (E.164 format)\n})\n\nconsole.log(message.sid)    \u002F\u002F SM1234567890abcdef\n\n\u002F\u002F Send MMS (with image)\nawait client.messages.create({\n  body: 'Check out this photo!',\n  from: process.env.TWILIO_PHONE_NUMBER,\n  to: '+15551234567',\n  mediaUrl: ['https:\u002F\u002Fexample.com\u002Fphoto.jpg'],\n})\n```\n\n### Step 3: Two-Factor Authentication (Verify API)\n\n```typescript\n\u002F\u002F lib\u002Fverify.ts — Phone number verification \u002F 2FA\n\u002F\u002F Uses Twilio Verify — handles code generation, delivery, and validation\n\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN)\nconst VERIFY_SERVICE_SID = process.env.TWILIO_VERIFY_SERVICE_SID!    \u002F\u002F create in Twilio console\n\nexport async function sendVerificationCode(phoneNumber: string) {\n  \u002F**\n   * Send a 6-digit verification code via SMS.\n   * Twilio handles code generation, expiry (10 min), and rate limiting.\n   *\u002F\n  const verification = await client.verify.v2\n    .services(VERIFY_SERVICE_SID)\n    .verifications.create({\n      to: phoneNumber,\n      channel: 'sms',    \u002F\u002F or 'call', 'email', 'whatsapp'\n    })\n  return verification.status    \u002F\u002F 'pending'\n}\n\nexport async function checkVerificationCode(phoneNumber: string, code: string) {\n  \u002F**\n   * Verify a code entered by the user.\n   * Returns 'approved' if correct, 'pending' if wrong.\n   *\u002F\n  const check = await client.verify.v2\n    .services(VERIFY_SERVICE_SID)\n    .verificationChecks.create({\n      to: phoneNumber,\n      code,\n    })\n  return check.status    \u002F\u002F 'approved' or 'pending'\n}\n```\n\n### Step 4: WhatsApp Messaging\n\n```typescript\n\u002F\u002F whatsapp.ts — Send WhatsApp messages via Twilio\n\u002F\u002F Requires WhatsApp Business API setup in Twilio console\n\nawait client.messages.create({\n  body: 'Your appointment is confirmed for tomorrow at 2 PM.',\n  from: 'whatsapp:+14155238886',    \u002F\u002F Twilio WhatsApp sandbox number\n  to: 'whatsapp:+15551234567',\n})\n\n\u002F\u002F WhatsApp with template (required for initiating conversations)\nawait client.messages.create({\n  from: 'whatsapp:+14155238886',\n  to: 'whatsapp:+15551234567',\n  contentSid: 'HXb5b62575e6e4ff6129ad7c8efe1f983e',    \u002F\u002F approved template SID\n  contentVariables: JSON.stringify({ '1': 'John', '2': 'March 15' }),\n})\n```\n\n### Step 5: Receive Incoming Messages (Webhooks)\n\n```typescript\n\u002F\u002F app\u002Fapi\u002Fwebhooks\u002Ftwilio\u002Froute.ts — Handle incoming SMS\u002FWhatsApp messages\nimport { NextRequest, NextResponse } from 'next\u002Fserver'\nimport twilio from 'twilio'\n\nconst { MessagingResponse } = twilio.twiml\n\nexport async function POST(req: NextRequest) {\n  const formData = await req.formData()\n  const from = formData.get('From') as string\n  const body = formData.get('Body') as string\n  const messageSid = formData.get('MessageSid') as string\n\n  console.log(`Incoming from ${from}: ${body}`)\n\n  \u002F\u002F Auto-reply with TwiML\n  const response = new MessagingResponse()\n\n  if (body.toLowerCase().includes('status')) {\n    response.message('Your order is on its way! Expected delivery: tomorrow.')\n  } else if (body.toLowerCase().includes('help')) {\n    response.message('Available commands: STATUS, HELP, CANCEL')\n  } else {\n    response.message('Thanks for your message! Reply HELP for options.')\n  }\n\n  return new NextResponse(response.toString(), {\n    headers: { 'Content-Type': 'text\u002Fxml' },\n  })\n}\n```\n\n### Step 6: Voice Calls\n\n```typescript\n\u002F\u002F voice.ts — Make automated phone calls\n\u002F\u002F TwiML controls what happens during the call\n\nawait client.calls.create({\n  url: 'https:\u002F\u002Fmyapp.com\u002Fapi\u002Fvoice\u002Fgreeting',    \u002F\u002F TwiML endpoint\n  from: process.env.TWILIO_PHONE_NUMBER!,\n  to: '+15551234567',\n})\n\n\u002F\u002F Voice webhook endpoint\n\u002F\u002F app\u002Fapi\u002Fvoice\u002Fgreeting\u002Froute.ts\nimport twilio from 'twilio'\nconst { VoiceResponse } = twilio.twiml\n\nexport async function POST() {\n  const response = new VoiceResponse()\n  response.say({ voice: 'alice' }, 'Hello! Your appointment is confirmed for tomorrow at 2 PM.')\n  response.say('Press 1 to confirm, or 2 to reschedule.')\n\n  const gather = response.gather({ numDigits: 1, action: '\u002Fapi\u002Fvoice\u002Fhandle-input' })\n  gather.say('Please make your selection.')\n\n  return new Response(response.toString(), {\n    headers: { 'Content-Type': 'text\u002Fxml' },\n  })\n}\n```\n\n## Examples\n\n### Example 1: Add SMS-based 2FA to a login flow\n**User prompt:** \"Add phone number verification to our signup flow. Users enter their phone number, receive a code, and verify it.\"\n\nThe agent will:\n1. Create a Twilio Verify service in the console.\n2. Build API endpoints: `\u002Fapi\u002Fverify\u002Fsend` and `\u002Fapi\u002Fverify\u002Fcheck`.\n3. Frontend flow: phone input → send code → code input → verify.\n4. Handle edge cases: rate limiting, expired codes, invalid numbers.\n\n### Example 2: Build an order notification system\n**User prompt:** \"Send customers an SMS when their order ships, and a WhatsApp message when it's delivered. Include tracking link.\"\n\nThe agent will:\n1. Set up SMS and WhatsApp messaging channels.\n2. Create notification functions triggered by order status changes.\n3. Use WhatsApp templates (required for business-initiated messages).\n4. Handle delivery status callbacks via webhooks.\n\n## Guidelines\n\n- Use E.164 format for all phone numbers (`+15551234567`, not `555-123-4567`). Twilio rejects incorrectly formatted numbers.\n- Use the Verify API for 2FA instead of sending raw SMS codes — it handles code generation, expiry, rate limiting, and fraud detection.\n- WhatsApp requires pre-approved message templates for business-initiated conversations. User-initiated conversations (replies within 24h) allow freeform messages.\n- Always validate webhook requests using Twilio's signature validation to prevent forged webhooks.\n- SMS costs vary by country — US SMS costs ~$0.0079\u002Fmessage, international can be 10-50x more. Use WhatsApp for international messaging when possible (often cheaper).\n- Set up a status callback URL to track message delivery. Not all SMS messages are delivered — carriers can silently drop them.\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Ftwilio",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill twilio",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill twilio",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill twilio","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Ftwilio\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"DESIGN.md","REFERENCE","参考文档",1575,"https:\u002F\u002Fgithub.com\u002FTorchiaHub\u002FSkills\u002Fblob\u002Fmaster\u002F01-Inbox\u002Fdownloads\u002Fbergside-design-skills\u002F20260516T145411Z\u002Fsource\u002Fskills\u002Fdoodle\u002FDESIGN.md",[52,61,70,79,85,91],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[58,59,60],"model","model hierarchy","model hierarchy skill",{"skillNo":62,"name":63,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[67,68,69],"MCP","zoom","zoom mcp",{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[76,77,78,68],"sdk","zoom apps sdk","apps",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[81],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[93]]