Skill: send-sms
When to Use
Use this skill when the user asks to:
- Send an SMS or text message
- Text someone a message
- Notify someone via SMS
- Send a message to a phone number
- Use Twilio to message someone
Required Credentials
Retrieve these via the get_keys tool before executing:
| Key Store Key | Environment Variable | Description |
|---|---|---|
twilio_account_sid | TWILIO_ACCOUNT_SID | Twilio Account SID (starts with AC) |
twilio_auth_token | TWILIO_AUTH_TOKEN | Twilio Auth Token |
twilio_phone_number | FROM_PHONE_NUMBER | Twilio phone number (sender) |
Input Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
to_phone | Yes | Recipient phone number in E.164 format | +1234567890 |
message_body | Yes | The text message content to send | Hello! |
Procedure
- Retrieve Twilio credentials: use
get_keyswith keys[twilio_account_sid, twilio_auth_token, twilio_phone_number] - If recipient phone number or message content not provided, ask the user via
ask_user - Send SMS using bundled script:
bash scripts/run.sh <to_phone> <message_body>Or via curl:curl -X POST "https://api.twilio.com/2010-04-01/Accounts/{{TWILIO_ACCOUNT_SID}}/Messages.json" --data-urlencode "From={{FROM_PHONE_NUMBER}}" --data-urlencode "To={{TO_PHONE_NUMBER}}" --data-urlencode "Body={{MESSAGE_BODY}}" -u "{{TWILIO_ACCOUNT_SID}}:{{TWILIO_AUTH_TOKEN}}" - Verify the JSON response contains a
sidfield indicating the message was queued - Report delivery status and message SID to the user
Bundled Scripts
| Script | Type | Description |
|---|---|---|
scripts/run.sh | SH | Send SMS via Twilio API |
Script Usage
# Set credentials as environment variables (from get_keys), then:
bash scripts/run.sh <to_phone> <message_body>
Credentials in scripts use environment variables. Set them via get_keys before running.
Example
Example requests that trigger this skill:
send an sms saying "hello world"
text +1234567890 saying "meeting at 3pm"
send a text message to mom