Community生产力与协作github.com

steipete/twilio-sms

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

twilio-sms 是什么?

twilio-sms is a Claude Code agent skill that twilio SMS CLI: buy/list/keep numbers, send/check messages, credential routing.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/twilio-sms

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

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:
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.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

相关技能