sbusso/claudeclaw/add-whatsapp
Claude Code and agent skill by sbusso/claudeclaw
- community
Checking that the SKILL.md file is still in the repository.
Add WhatsApp as a channel. Can replace other channels entirely or run alongside them. Uses QR code or pairing code for authentication.
Install
npx vskill@latest install sbusso/claudeclaw/add-whatsappSKILL.md
Add WhatsApp Channel
This skill adds WhatsApp support to ClaudeClaw. It installs the WhatsApp channel code, dependencies, and guides through authentication, registration, and configuration.
Phase 1: Pre-flight
Check current state
Check if WhatsApp is already configured. If store/auth/ exists with credential files, skip to Phase 4 (Registration) or Phase 5 (Verify).
Detect environment
Check whether the environment is headless (no display server):
Ask the user
Use AskUserQuestion to collect configuration. Adapt auth options based on environment:
If IS_HEADLESS=true AND not WSL → AskUserQuestion: How do you want to authenticate WhatsApp?
- Pairing code (Recommended) - Enter a numeric code on your phone (no camera needed, requires phone number)
- QR code in terminal - Displays QR code in the terminal (can be too small on some displays)
Otherwise (macOS, desktop Linux, or WSL) → AskUserQuestion: How do you want to authenticate WhatsApp?
- QR code in browser (Recommended) - Opens a browser window with a large, scannable QR code
- Pairing code - Enter a numeric code on your phone (no camera needed, requires phone number)
- QR code in terminal - Displays QR code in the terminal (can be too small on some displays)
If they chose pairing code:
AskUserQuestion: What is your phone number? (Include country code without +, e.g., 1234567890)
Phase 2: Apply Code Changes
Check if src/channels/whatsapp.ts already exists. If it does, skip to Phase 3 (Authentication).
Ensure channel remote
If whatsapp is missing, add it:
Merge the skill branch
This merges in:
src/channels/whatsapp.ts(WhatsAppChannel class with self-registration viaregisterChannel)src/channels/whatsapp.test.ts(41 unit tests)src/channels/whatsapp-auth.ts(standalone WhatsApp authentication script)setup/whatsapp-auth.ts(WhatsApp auth setup step)import './whatsapp.js'appended to the channel barrel filesrc/channels/index.ts'whatsapp-auth'step added tosetup/index.ts@whiskeysockets/baileys,qrcode,qrcode-terminalnpm dependencies inpackage.jsonASSISTANT_HAS_OWN_NUMBERin.env.example
If the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.
Validate code changes
All tests must pass and build must be clean before proceeding.
Phase 3: Authentication
Clean previous auth state (if re-authenticating)
Run WhatsApp authentication
For QR code in browser (recommended):
(Bash timeout: 150000ms)
Tell the user:
A browser window will open with a QR code.1. Open WhatsApp > Settings > Linked Devices > Link a Device2. Scan the QR code in the browser3. The page will show "Authenticated!" when done
For QR code in terminal:
Tell the user to run npm run auth in another terminal, then:
1. Open WhatsApp > Settings > Linked Devices > Link a Device2. Scan the QR code displayed in the terminal
For pairing code:
Tell the user to have WhatsApp open on Settings > Linked Devices > Link a Device, ready to tap "Link with phone number instead" — the code expires in ~60 seconds and must be entered immediately.
Run the auth process in the background and poll store/pairing-code.txt for the code:
Then immediately poll for the code (do NOT wait for the background command to finish):
Display the code to the user the moment it appears. Tell them:
Enter this code now — it expires in ~60 seconds.1. Open WhatsApp > Settings > Linked Devices > Link a Device2. Tap Link with phone number instead3. Enter the code immediately
After the user enters the code, poll for authentication to complete:
If failed: qr_timeout → re-run. logged_out → delete store/auth/ and re-run. 515 → re-run. timeout → ask user, offer retry.
Verify authentication succeeded
Configure environment
Channels auto-enable when their credentials are present — WhatsApp activates when store/auth/creds.json exists.
Sync to container environment:
Phase 4: Registration
Configure trigger and channel type
Get the bot's WhatsApp number: node -e "const c=require('./store/auth/creds.json');console.log(c.me.id.split(':')[0].split('@')[0])"
AskUserQuestion: Is this a shared phone number (personal WhatsApp) or a dedicated number (separate device)?
- Shared number - Your personal WhatsApp number (recommended: use self-chat or a solo group)
- Dedicated number - A separate phone/SIM for the assistant
AskUserQuestion: What trigger word should activate the assistant?
- @Andy - Default trigger
- @Claw - Short and easy
- @Claude - Match the AI name
AskUserQuestion: What should the assistant call itself?
- Andy - Default name
- Claw - Short and easy
- Claude - Match the AI name
AskUserQuestion: Where do you want to chat with the assistant?
Shared number options:
- Self-chat (Recommended) - Chat in your own "Message Yourself" conversation
- Solo group - A group with just you and the linked device
- Existing group - An existing WhatsApp group
Dedicated number options:
- DM with bot (Recommended) - Direct message the bot's number
- Solo group - A group with just you and the bot
- Existing group - An existing WhatsApp group
Get the JID
Self-chat: JID = your phone number with @s.whatsapp.net. Extract from auth credentials:
DM with bot: Ask for the bot's phone number. JID = NUMBER@s.whatsapp.net
Group (solo, existing): Run group sync and list available groups:
The output shows JID|GroupName pairs. Present candidates as AskUserQuestion (names only, not JIDs).
Register the chat
For additional groups (trigger-required):
Phase 5: Verify
Build and restart
Service name: Derived from the directory name:com.claudeclaw.<dirname>(macOS) /claudeclaw-<dirname>(Linux). For example, if cwd ismy-assistant, the service iscom.claudeclaw.my-assistant. Determine the correct service name before running service commands below.
Restart the service:
Test the connection
Tell the user:
Send a message to your registered WhatsApp chat:- For self-chat / main: Any message works- For groups: Use the trigger word (e.g., "@Andy hello")The assistant should respond within a few seconds.
Check logs if needed
Troubleshooting
QR code expired
QR codes expire after ~60 seconds. Re-run the auth command:
Pairing code not working
Codes expire in ~60 seconds. To retry:
Enter the code immediately when it appears. Also ensure:
- Phone number includes country code without
+(e.g.,1234567890) - Phone has internet access
- WhatsApp is updated to the latest version
If pairing code keeps failing, switch to QR-browser auth instead:
"conflict" disconnection
This happens when two instances connect with the same credentials. Ensure only one ClaudeClaw process is running:
Bot not responding
Check:
- Auth credentials exist:
ls store/auth/creds.json - Chat is registered:
sqlite3 store/messages.db "SELECT * FROM registered_groups WHERE jid LIKE '%whatsapp%' OR jid LIKE '%@g.us' OR jid LIKE '%@s.whatsapp.net'" - Service is running:
launchctl list | grep claudeclaw(macOS) orsystemctl --user status claudeclaw(Linux) - Logs:
tail -50 logs/claudeclaw.log
Group names not showing
Run group metadata sync:
This fetches all group names from WhatsApp. Runs automatically every 24 hours.
After Setup
If running npm run dev while the service is active:
Removal
To remove WhatsApp integration:
- Delete auth credentials:
rm -rf store/auth/ - Remove WhatsApp registrations:
sqlite3 store/messages.db "DELETE FROM registered_groups WHERE jid LIKE '%@g.us' OR jid LIKE '%@s.whatsapp.net'" - Sync env:
mkdir -p data/env && cp .env data/env/env - Rebuild and restart:
npm run build && launchctl kickstart -k gui/$(id -u)/com.claudeclaw(macOS) ornpm run build && systemctl --user restart claudeclaw(Linux)
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/add-whatsapp/SKILL.md
Popularity
- Repository stars
- 173
- Repository forks
- 56
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sbusso/claudeclaw/add-whatsapp)