skills/twilio-whatsapp/SKILL.md
Add real WhatsApp to a web app via Twilio — inbound messages land in your app through a webhook, and you reply programmatically. Covers the zero-Meta-verification WhatsApp Sandbox (perfect for demos), the inbound webhook + X-Twilio-Signature validation, sending via the REST API (API-key auth), the 24-hour session window + template rule, and the move to a production number. Use when adding WhatsApp, a unified inbox, or two-way messaging. Triggers on "Twilio", "WhatsApp integration", "send/receive WhatsApp", "WhatsApp sandbox", "two-way messaging".
npx skillsauth add RonanCodes/ronan-skills twilio-whatsappInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Two-way WhatsApp in your app. For a demo, use the WhatsApp Sandbox — no Meta business verification, no number purchase, live in minutes. For production, register a real WhatsApp sender (needs Meta business profile + approval).
Twilio REST auth is HTTP Basic. Two valid pairs:
AC... / token from the console dashboard.SK... / secret) — revocable, scoped; pass with { accountSid }. Recommended for production.The Auth Token is still required for inbound webhook signature validation regardless of which pair you send with (Twilio always signs with the account Auth Token).
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=... # needed for inbound signature validation
TWILIO_API_KEY_SID=SK... # optional, production-correct send auth
TWILIO_API_KEY_SECRET=...
TWILIO_REGION=ie1 # if the key/account is regional (Ireland)
TWILIO_WHATSAPP_FROM=whatsapp:+14155238886 # the sandbox sender
Node client: twilio(apiKeySid, apiKeySecret, { accountSid, region }) (or twilio(accountSid, authToken)).
+1 415 523 8886) and your join <code>.join <code> to that number. The sandbox can ONLY message numbers that have opted in; the join expires after 3 idle days (re-join before a demo).https://<app>/api/whatsapp/webhook.Twilio POSTs form-encoded. Key fields: From (whatsapp:+E164), Body, ProfileName, WaId (the number, no prefix), MessageSid, media via NumMedia/MediaUrl0.
export async function POST(req: Request) {
const raw = await req.text();
const params = new URLSearchParams(raw);
const token = process.env.TWILIO_AUTH_TOKEN;
if (token) {
// Twilio signature: base64(HMAC-SHA1(fullUrl + sorted(key+value)...)), Auth Token as key.
const proto = req.headers.get("x-forwarded-proto") ?? "https";
const url = `${proto}://${req.headers.get("host")}/api/whatsapp/webhook`;
const data = url + [...params.keys()].sort().map(k => k + params.get(k)).join("");
const expected = crypto.createHmac("sha1", token).update(Buffer.from(data,"utf-8")).digest("base64");
if (req.headers.get("x-twilio-signature") !== expected) return new Response("bad sig", { status: 403 });
}
const waNumber = (params.get("From")||"").replace("whatsapp:","");
// → upsert a contact by phone, insert a message (channel "whatsapp"), then:
return new Response("<Response></Response>", { headers: { "Content-Type": "text/xml" } }); // empty TwiML = no auto-reply
}
Signature gotcha: behind a proxy (Vercel/CF) TLS terminates upstream, so reconstruct the exact public HTTPS URL Twilio called (hardcode the known path) or validation fails. For a throwaway demo you can skip validation (gate on the secret of obscurity), but keep it for anything real.
await client.messages.create({
from: process.env.TWILIO_WHATSAPP_FROM!, // "whatsapp:+14155238886"
to: `whatsapp:+${waId}`,
body: text,
});
24-hour session window: after a user messages you, you can send free-form replies for 24h. Outside that window you must use a pre-approved template (sandbox: 3 test templates; production: your Meta-approved ones). User-initiated demos stay in-window, so no templates needed if you reply promptly.
Register a Sender under Twilio's WhatsApp Senders flow, tied to a Meta Business profile (business verification, display name). Approval is minutes-to-days. Then create Meta-approved templates for business-initiated messages. A WhatsApp-capable number costs ~$7.70/month (e.g. a NL mobile, 2026), plus ~$0.005/message on top of Meta's per-message fee; user-initiated service conversations are free for the first 24h. The sandbox needs none of this — it's free and uses the shared +1 415 523 8886. Only buy a number when you need a branded production sender.
To let a client opt into WhatsApp alerts during onboarding, show a consent toggle + a QR that deep-links WhatsApp pre-filled with the join code: https://wa.me/<sandboxNumber>?text=join%20<code>. They scan or tap, hit send, and they're connected to the sandbox — no manual number/code copying. (In production, swap the sandbox join for your registered sender; the consent record is what matters for compliance.)
TWILIO_AUTH_TOKEN present for inbound validation; twilioConfigured() guard so the app degrades gracefully.join <code> (re-join after 3 idle days).testing
--- name: linear-pipeline description: The Fable orchestrator for a single dispatched Linear ticket. Holds almost no context itself; it receives `--issue <ID> --detached`, decides the stage sequence, and fans out a sub-agent per stage, passing forward only each stage's artifact (never re-derived, never inlined into its own context). Step zero, before any planning or stage routing, is a boundary triage against `canon/security-boundary.md` (#199): a match tags Ronan Connolly and stops the run, no
development
--- name: in-your-face description: Capture a chat-only answer into a durable artifact (markdown + HTML, PDF when cheap) and launch it automatically so the user cannot miss it. Use when user says "in your face", "don't let me lose this", "save that answer", "make that durable", or right after answering a substantive side question (a recipe, comparison, how-to, or generated prompt) that would otherwise die with the context. category: workflow argument-hint: [--no-open] [--vault <short>] [hint of
tools
One-shot headless OpenAI Codex CLI calls for background/admin AI tasks — summaries, classification, extraction, admin glue. The default engine for anything that runs AI constantly in the background (daemon-driven, per-event), because it bills the flat ChatGPT subscription instead of Claude usage or per-token API spend, and it keeps working while Claude is rate-limited. NEVER for coding — coding stays Claude. Use when a skill or daemon needs a cheap always-on AI call, when the user says "use codex", "ask codex", "codex as backup", or when building a background summarizer/classifier into a listener or loop. Reads auth from ~/.codex/auth.json (ChatGPT account, no API key).
research
Turn a warranty rejection, repair quote, or RMA email into a cited decision brief — legal read (NL/EU consumer law), is the part user-serviceable, live part and new-unit prices, repair-vs-DIY-vs-new economics, before-you-send-it checklist, deadlines. Use when the user pastes or screenshots a repair quote, warranty rejection, "not covered" email, onderzoekskosten fee, or asks "should I repair or replace this".