# Twilio Sms

Twilio SMS CLI: buy/list/keep numbers, send/check messages, credential routing.

- Repository: https://github.com/steipete/agent-scripts (7431 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add steipete/agent-scripts --skill twilio-sms -g -a claude-code -y`
Codex: `npx skills add steipete/agent-scripts --skill twilio-sms -g -a codex -y`
Cursor: `npx skills add steipete/agent-scripts --skill twilio-sms -g -a cursor -y`
Gemini CLI: `npx skills add steipete/agent-scripts --skill twilio-sms -g -a gemini-cli -y`

## Description

Twilio SMS CLI: buy/list/keep numbers, send/check messages, credential routing.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Twilio 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-password` for secret reads. `op` stays 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

1. Check Twilio CLI/profile:
   - `twilio --version` or `npx -y twilio-cli --version`
   - `twilio profiles:list` or `npx -y twilio-cli profiles:list`
2. Check exact env presence only:
   - `TWILIO_ACCOUNT_SID`
   - `TWILIO_AUTH_TOKEN`
   - optional API key/secret vars
3. If only partial env exists, search 1Password metadata first.
4. Prefer an item with fields matching:
   - `TWILIO_ACCOUNT_SID`
   - `TWILIO_AUTH_TOKEN`
   - optional `TWILIO_FROM_NUMBER`
5. If `op` only sees a restricted vault, retry desktop-backed reads with `env -u OP_SERVICE_ACCOUNT_TOKEN`.
6. Verify auth before any purchase/send:

```bash
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:

```bash
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:

```bash
npx -y twilio-cli api:core:incoming-phone-numbers:list \
  --properties phoneNumber,friendlyName,capabilities
```

The rest: https://github.com/steipete/agent-scripts/blob/HEAD/skills/twilio-sms/SKILL.md
