
Twilio SMS
FreeManage Twilio SMS and phone numbers efficiently.
Free · Opens the source repo
What Twilio SMS does
The Twilio SMS skill provides a command-line interface for managing Twilio phone numbers and sending SMS messages. It allows users to create and buy phone numbers, list owned numbers, and label them for easy identification. Additionally, users can send SMS messages and check the status of both inbound and outbound messages. This skill is designed for developers and designers who need to integrate SMS functionalities into their applications or manage communication workflows using Twilio services.
To get started, users must set up their Twilio CLI profile with the required authentication tokens. The skill offers clear instructions on how to create and manage profiles, ensuring that the necessary credentials are in place. Once set up, users can easily interact with Twilio’s API to perform various operations, such as purchasing new numbers or sending messages. The skill emphasizes security by providing guidelines on how to handle sensitive information and avoid leaking credentials.
This skill is particularly useful for those who require programmatic control over SMS communications, such as developers building messaging features into their applications or designers managing marketing campaigns. The ability to check message statuses and manage phone numbers directly from the command line streamlines the workflow, making it easier to integrate SMS capabilities into existing projects.
Overall, the Twilio SMS skill is a practical tool for anyone looking to leverage Twilio's SMS services without the overhead of a graphical user interface. Its command-line nature allows for quick and efficient operations, ideal for users comfortable with terminal commands.
When to use it
Use this skill when you need to automate SMS sending or manage Twilio phone numbers from the command line.
When not to use it
This skill may not be suitable for users who prefer a graphical interface or those who do not require direct interaction with Twilio's API.
What you can build with it
Automate SMS Notifications
Set up scripts to send automated SMS notifications to users based on specific triggers in your application.
Manage Marketing Campaigns
Use the skill to purchase and label phone numbers for different marketing campaigns, making it easy to track their performance.
Monitor Message Status
Quickly check the status of sent messages and review inbound communications directly from the command line.
How to install Twilio SMS
View source1. Install with the skills CLI
npx skills add steipete/agent-scripts/twilio-sms --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by steipeteTwilio SMS
Use for Twilio phone-number and SMS work: create/buy numbers, list owned numbers, keep/label numbers, send texts, and check inbound/outbound messages.
Safety
- Never print Account SIDs, auth tokens, API secrets, TOTP codes, or full 1Password item JSON.
- Do not store real phone numbers, SIDs, names, or account-specific item IDs in this skill.
- Use
$one-passwordfor secret reads.opstays tmux-only. - If desktop 1Password access is needed, unset service-account auth for those commands:
env -u OP_SERVICE_ACCOUNT_TOKEN op .... - Print credential shape only: field present, length, prefix class if useful.
- Public writes or logs: avoid leaking message bodies unless the user asked to read/check SMS.
Credential Route
- Check Twilio CLI/profile:
twilio --versionornpx -y twilio-cli --versiontwilio profiles:listornpx -y twilio-cli profiles:list
- Check exact env presence only:
TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKEN- optional API key/secret vars
- If only partial env exists, search 1Password metadata first.
- Prefer an item with fields matching:
TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKEN- optional
TWILIO_FROM_NUMBER
- If
oponly sees a restricted vault, retry desktop-backed reads withenv -u OP_SERVICE_ACCOUNT_TOKEN. - Verify auth before any purchase/send:
curl -sS -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
"https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID.json"
CLI Setup
Twilio CLI profile creation requires account auth token, not just API key creds:
npx -y twilio-cli profiles:create "$TWILIO_ACCOUNT_SID" \
--auth-token "$TWILIO_AUTH_TOKEN" \
--profile default --force --silent
npx -y twilio-cli profiles:use default
Use npx -y twilio-cli when twilio is not installed.
Numbers
List owned:
npx -y twilio-cli api:core:incoming-phone-numbers:list \
--properties phoneNumber,friendlyName,capabilities
Search US local SMS-capable inventory:
npx -y twilio-cli api:core:available-phone-numbers:local:list \
--country-code US --sms-enabled --voice-enabled --limit 5
If the CLI shape is awkward or missing flags, use REST:
curl -sS -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
"https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/AvailablePhoneNumbers/US/Local.json?SmsEnabled=true&VoiceEnabled=true&PageSize=5"
Buy one candidate:
curl -sS -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
-X POST "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/IncomingPhoneNumbers.json" \
--data-urlencode "PhoneNumber=$PHONE_NUMBER"
Verify ownership/capabilities after purchase. Twilio JSON uses lowercase keys:
capabilities.sms
capabilities.mms
capabilities.voice
Mark numbers the user wants to keep:
npx -y twilio-cli api:core:incoming-phone-numbers:update \
--sid "$PHONE_NUMBER_SID" \
--friendly-name "KEEP - <purpose>"
Retention rule: a number is kept while it remains in the Twilio account and billing is healthy. Do not release/delete unless explicitly asked.
SMS
Send:
npx -y twilio-cli api:core:messages:create \
--from "$FROM_NUMBER" \
--to "$TO_NUMBER" \
--body "$BODY" \
-o json
Fetch status:
npx -y twilio-cli api:core:messages:fetch --sid "$MESSAGE_SID" -o json
Check inbound to a number:
npx -y twilio-cli api:core:messages:list \
--to "$NUMBER" --limit 20 -o json
Check outbound from a number:
npx -y twilio-cli api:core:messages:list \
--from "$NUMBER" --limit 20 -o json
Twilio CLI JSON can return an array for single-resource commands. Parse defensively:
jq 'if type=="array" then .[0] else . end'
Notes
- International SMS may show an alphanumeric or carrier sender instead of the purchased US number.
- US SMS can be compliance-gated. If sending to US recipients fails, check A2P/10DLC registration state before retrying blindly.
- Trial accounts may restrict recipients.
Frequently asked questions about Twilio SMS
Similar skills
WinMD API Search
Easily find and explore Windows desktop APIs.
WebMCPify
Transform any web app into an agent-ready platform.
Phoenix Tracing
Instrument LLM applications with OpenInference tracing.
Foundry Hosted Agent CopilotKit
Guidance for developing agentic web apps on Azure.
Power Automate Foundation
Connect AI agents to Power Automate seamlessly.
Power Automate Flow Builder
Efficiently build and deploy Power Automate flows programmatically.
