Whatsapp-claude-plugin setup
Interactive WhatsApp channel onboarding — guides through device linking, phone number config, and access control setup
git clone https://github.com/Rich627/whatsapp-claude-plugin
T=$(mktemp -d) && git clone --depth=1 https://github.com/Rich627/whatsapp-claude-plugin "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/whatsapp-channel/skills/setup" ~/.claude/skills/rich627-whatsapp-claude-plugin-setup && rm -rf "$T"
plugins/whatsapp-channel/skills/setup/SKILL.mdWhatsApp Channel Setup
You are guiding the user through first-time WhatsApp channel setup. Follow these phases in order. Be conversational, not robotic. Ask one question at a time.
Phase 1: Welcome & Prerequisites
Tell the user:
- This plugin connects Claude Code to WhatsApp as a linked device (like WhatsApp Web)
- They'll need their phone with WhatsApp open nearby
- The setup takes about 2 minutes
Phase 2: Device Linking
Check the connection status by calling the
whatsapp_status tool.
If status is
:connected
- Skip to Phase 4. Tell the user they're already linked.
If status is
and a pairing
is present:qr_image_path
- Read the QR image file and display it to the user.
- Tell them: "Open WhatsApp on your phone → Settings → Linked Devices → Link a Device → scan this QR code"
- If a
is also available, mention: "If you can't scan the QR, tap 'Link with phone number instead' and enter: [code]"pairing_code - Wait for confirmation. Call
again to check if connection succeeded.whatsapp_status
If status is
:disconnected
- Tell the user the server needs to start first. They should restart Claude Code with the WhatsApp channel enabled.
Phase 3: Phone Number (Optional)
Ask the user:
"Would you like to save your phone number for future re-pairing? This lets the server offer a numeric pairing code as a backup if QR scanning isn't available. You can skip this."
If yes:
- Ask for their phone number with country code (e.g.,
, no886912345678
or spaces)+ - Save it to
:~/.whatsapp-channel/.envWHATSAPP_PHONE_NUMBER=<their number> - Confirm it's saved.
If no, skip to Phase 4.
Phase 4: Access Control
Explain the access model:
"By default, when someone DMs your WhatsApp account, they'll get a pairing code. You approve them by running
here. This prevents random people from talking to your Claude session."/whatsapp:access pair <code>
Ask:
"Would you like to:"
- Keep the default (pairing mode) — recommended for most users
- Allowlist only — silently drop messages from unknown senders (no pairing reply)
- Add a specific contact now — if you already know their WhatsApp user ID
For option 1: No action needed, just confirm. For option 2: Write
{"dmPolicy": "allowlist", "allowFrom": [], "groups": {}, "pending": {}} to ~/.whatsapp-channel/access.json.
For option 3: Ask for the numeric user ID (e.g., 886912345678). They can find it by having the contact message @userinfobot on Telegram, or by checking WhatsApp linked device logs. Add it to allowFrom in access.json.
Phase 5: Done
Summarize:
- Connection status (connected as [JID] or waiting for scan)
- Access policy (pairing / allowlist)
- Allowed contacts (if any)
- How to manage access later:
/whatsapp:access - How to reset auth if needed:
/whatsapp:configure reset-auth
Tell the user they're all set. Messages from approved contacts will now appear in their Claude Code session.