
Twilio Communications
This is a solid foundation for Twilio integration that covers the three main use cases: sending SMS messages, handling 2FA with Twilio Verify, and building IVR phone menus with TwiML. The patterns include proper error handling, phone number validation for E.164 format, and webhook security validation. The Verify pattern is the standout here since it saves you from rolling your own OTP system and gets you built-in fraud prevention. The IVR example shows the basics of gathering touch-tone input and routing calls. Use this when you need to add phone-based features to your app and want working code that handles the common gotchas like message segmentation costs and rate limits.
- skills.sh installs
- 213
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill twilio-communications --agent claude-codeInstalls into .claude/skills of the current project.
Files
Twilio Communications
Patterns
SMS Sending Pattern
Basic pattern for sending SMS messages with Twilio. Handles the fundamentals: phone number formatting, message delivery, and delivery status callbacks.
Key considerations:
- Phone numbers must be in E.164 format (+1234567890)
- Default rate limit: 80 messages per second (MPS)
- Messages over 160 characters are split (and cost more)
- Carrier filtering can block messages (especially to US numbers)
When to use: ['Sending notifications to users', 'Transactional messages (order confirmations, shipping)', 'Alerts and reminders']
from twilio.rest import Client
from twilio.base.exceptions import TwilioRestException
import os
import re
class TwilioSMS:
"""
SMS sending with proper error handling and validation.
"""
def __init__(self):
self.client = Client(
os.environ["TWILIO_ACCOUNT_SID"],
os.environ["TWILIO_AUTH_TOKEN"]
)
self.from_number = os.environ["TWILIO_PHONE_NUMBER"]
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Backend & APIs, Security, DevOps & CI/CD, Debugging
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Etetoolkit212
- Hubspot Integration212
- Algolia Search211
- Azure Functions211
- Form Cro211
- Openapi To Typescript211
- Vaex211
- Gtars210
- Flowio209
- Latchbio Integration209
- Molfeat209
- Dnanexus Integration208
- Exa Search208
- Labarchive Integration208
- Datamol207
- Pathml207
- Referral Program207
- Neon Postgres206
- Address Github Comments205
- Slack Bot Builder205
- Plaid Fintech204
- Daily Meeting Update203
- Github Actions Creator203
- Omero Integration203