agentleFS
alanalvestechalanalvestech/hitank/skills/twilio/SKILL.md

twilio

Skill38 starsChanged 8 months agoMITView on GitHub

Manage Twilio SMS, calls, phone numbers and usage via REST API

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the output is OK, proceed to the Flow section.

    line 34
  2. Very specific:

    If the output is SETUP_NEEDED, guide the user step by step.

    line 36
  3. Distinctive:

    If the script outputs an error, the credentials are invalid.

    line 52
  4. Very specific:

    Ask the user to confirm: "Do you want to send an SMS from FROM_NUMBER to TO_NUMBER with this message?" Only execute after a "yes".

    line 84
  5. Very specific:

    If $ARGUMENTS looks like a phone number, search messages with --to or --from that number.

    line 105

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/twilio

Connect to the Twilio REST API to manage messages, calls, phone numbers, usage and account info. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb          # Basic Auth (account_sid:auth_token) + twilio_request helper (required by all scripts)
├── check_setup.rb   # Check if credentials exist (outputs OK or SETUP_NEEDED)
├── save_token.rb    # Save and validate Twilio credentials
├── messages.rb      # List messages (optional --to or --from filter)
├── message.rb       # Get message details by SID
├── send_sms.rb      # Send an SMS message (requires confirmation)
├── calls.rb         # List calls
├── numbers.rb       # List incoming phone numbers
├── account.rb       # Get account info
└── usage.rb         # Get usage records

Setup (check before using)

ruby ~/.claude/skills/twilio/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to get their credentials:

You need your Twilio Account SID and Auth Token. You can find both on the Twilio Console dashboard:

https://console.twilio.com/

Look for Account SID and Auth Token near the top of the page. Copy both values.

Step 2 — When the user pastes the credentials, save them:

ruby ~/.claude/skills/twilio/scripts/save_token.rb 'ACCOUNT_SID' 'AUTH_TOKEN'

If the script outputs an error, the credentials are invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain a phone number or message/call SID.

Step 1: Show account info

ruby ~/.claude/skills/twilio/scripts/account.rb

Present the account info to the user and ask what they want to do.

Step 2: Actions

List messages:

ruby ~/.claude/skills/twilio/scripts/messages.rb
ruby ~/.claude/skills/twilio/scripts/messages.rb --to '+15551234567'
ruby ~/.claude/skills/twilio/scripts/messages.rb --from '+15559876543'

Get message details:

ruby ~/.claude/skills/twilio/scripts/message.rb MESSAGE_SID

Send SMS (requires user confirmation):

Ask the user to confirm: "Do you want to send an SMS from FROM_NUMBER to TO_NUMBER with this message?" Only execute after a "yes".

ruby ~/.claude/skills/twilio/scripts/send_sms.rb --from '+15551234567' --to '+15559876543' --body 'Hello from hitank!'

List calls:

ruby ~/.claude/skills/twilio/scripts/calls.rb

List phone numbers:

ruby ~/.claude/skills/twilio/scripts/numbers.rb

Get usage records:

ruby ~/.claude/skills/twilio/scripts/usage.rb

If $ARGUMENTS looks like a phone number, search messages with --to or --from that number. If it looks like a message SID (starts with SM), get message details. If it looks like a call SID (starts with CA), mention it.

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via HTTP Basic Auth (Account SID as username, Auth Token as password)
  • Credentials file: ~/.config/twilio/credentials (outside the repo, never commit)
  • Stores credentials as account_sid:auth_token
  • Sending SMS requires explicit user confirmation
  • Twilio API uses form-encoded POST bodies (not JSON)
  • Base URL: https://api.twilio.com/2010-04-01

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.