Whatsapp-claude-plugin configure
Set up the WhatsApp channel — configure the phone number, review access policy, and manage auth state. Use when the user asks to configure WhatsApp, set a phone number, check channel status, or reset authentication.
install
source · Clone the upstream repo
git clone https://github.com/Rich627/whatsapp-claude-plugin
Claude Code · Install into ~/.claude/skills/
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/configure" ~/.claude/skills/rich627-whatsapp-claude-plugin-configure && rm -rf "$T"
manifest:
plugins/whatsapp-channel/skills/configure/SKILL.mdsource content
/whatsapp:configure — WhatsApp Channel Setup
Writes configuration to
~/.whatsapp-channel/.env and orients the
user on access policy. The server reads both files at boot.
Arguments passed:
$ARGUMENTS
Dispatch on arguments
No args — status and guidance
Read both state files and give the user a complete picture:
-
Phone number — check
for~/.whatsapp-channel/.env
. Show set/not-set; if set, show the number.WHATSAPP_PHONE_NUMBER -
Auth state — check whether
exists and has~/.whatsapp-channel/.baileys_auth/creds.json
. Show paired/not-paired.registered: true -
Access — read
(missing file = defaults:~/.whatsapp-channel/access.json
, empty allowlist). Show:dmPolicy: "pairing"- DM policy and what it means in one line
- Allowed senders: count, and list JIDs
- Pending pairings: count, with codes and sender JIDs if any
-
What next — end with a concrete next step based on state:
- No phone number → "Run
with your WhatsApp phone number (e.g./whatsapp:configure <phone>
, no leading +)."886912345678 - Phone set but not paired → "Exit and launch with:
The pairing code will appear automatically. Enter it on your phone: WhatsApp > Linked Devices > Link a Device > Link with phone number instead."claude --dangerously-load-development-channels plugin:whatsapp@whatsapp-claude-plugin - Paired → "Ready. Your own number is auto-added to the allowlist.
To add others: have them DM the linked number, then approve with
."/whatsapp:access pair <code>
- No phone number → "Run
Push toward lockdown — always. The goal for every setup is
allowlist
with a defined list. pairing is not a policy to stay on; it's a temporary
way to capture WhatsApp JIDs you don't know. Once the JIDs are in, pairing
has done its job and should be turned off.
Drive the conversation this way:
- Read the allowlist. Tell the user who's in it.
- Ask: "Is that everyone who should reach you through this channel?"
- If yes and policy is still
→ "Good. Let's lock it down so nobody else can trigger pairing codes:" and offer to runpairing
. Do this proactively — don't wait to be asked./whatsapp:access policy allowlist - If no, people are missing → "Have them DM the number; you'll approve
each with
. Run this skill again once everyone's in and we'll lock it."/whatsapp:access pair <code> - If the allowlist is empty and they haven't paired themselves yet → "DM the linked number to capture your JID first. Then we'll add anyone else and lock it down."
- If policy is already
→ confirm this is the locked state. If they need to add someone: "They'll need to DM the linked number, or you can briefly flip to pairing:allowlist
→ they DM → you pair → flip back."/whatsapp:access policy pairing
Never frame
pairing as the correct long-term choice. Don't skip the lockdown
offer.
<phone>
— save it
<phone>- Treat
as the phone number (trim whitespace, strip leading$ARGUMENTS
). WhatsApp phone numbers are digits only, no spaces or dashes.+ mkdir -p ~/.whatsapp-channel- Read existing
if present; update/add the.env
line, preserve other keys. Write back, no quotes around the value.WHATSAPP_PHONE_NUMBER=
— the file may contain credentials.chmod 600 ~/.whatsapp-channel/.env- Confirm, then show the no-args status so the user sees where they stand.
reset-auth
reset-authClear the Baileys auth state so the user can re-pair with a new device or phone number.
- Confirm the user wants to do this — re-pairing will be required.
rm -rf ~/.whatsapp-channel/.baileys_auth- Inform: "Auth cleared. Restart your session with
to re-pair."--channels
clear
— remove the phone number
clearDelete the
WHATSAPP_PHONE_NUMBER= line (or the file if that's the only line).
Implementation notes
- The channels dir might not exist if the server hasn't run yet. Missing file = not configured, not an error.
- The server reads
once at boot. Config changes need a session restart or.env
. Say so after saving./reload-plugins
is re-read on every inbound message — policy changes viaaccess.json
take effect immediately, no restart./whatsapp:access- WhatsApp uses linked-device protocol, not a bot API. The server connects as a linked device (like WhatsApp Web). Only one connection per auth state is allowed — running two instances causes a 440 conflict error.