add-whatsapp
Skill1 starsChanged 42 days agoMITView on GitHub
Add WhatsApp channel via native Baileys adapter. Direct connection — no Chat SDK bridge. Uses QR code or pairing code for authentication.
- Reads credentials
- Deletes or force-pushes
- Installs packages
9 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- nanocoai/nanoclawedited, first seen Nov 3, 2026
- prathish-ks/isthmusedited, first seen Oct 12, 2026
- gavrielc/nanoclawedited, first seen Oct 8, 2026
- qwibitai/nanoclawedited, first seen Oct 8, 2026
- TomGranot/groupguardedited, first seen Sep 3, 2026
- microsoft/amplifier-app-nanoclawedited, first seen Jun 12, 2026
Used with
Projects with it also use add-anydoc, add-clidash and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TomGranotSkilladd-anydoc
Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.
Also in 5 projects that use this
TomGranotSkilladd-clidash
Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.
Also in 5 projects that use this
qwibitaiSkilladd-iron-proxy
Install or refresh Iron Proxy and its official Iron Control web console for NanoClaw. Use when selecting the Iron gateway, adding its management UI, configuring credentials and grants, or restoring the proxy, approval bridge, and agent guidance.
Also in 4 projects that use this
qwibitaiSkilladd-mattermost
Add a self-hosted or cloud Mattermost bot channel through the Chat SDK bridge, reusing a healthy server when available and linking to official server setup guidance when needed.
Also in 4 projects that use this
nanocoaiSkilladd-cursor
Use Cursor (local Agent SDK) as a full agent provider — planning, tool orchestration, MCP tools, session resume — alongside or instead of Claude. Cursor-account sign-in or API key, held by the credential gateway. Per-group via `ncl groups config update --provider cursor`. Distinct from using Cursor as a cloud agent (those run on Cursor VMs and are not this provider).
Also in 3 projects that use this
- +5 more from TomGranot
- +1 more from qwibitai
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 9
- gavrielc/nanoclaw★ 31k11% same
- nanocoai/nanoclaw★ 31k11% same
- qwibitai/nanoclaw★ 31k11% same
- DingyangLyu/MatClaw★ 9823% same
- microsoft/amplifier-app-nanoclaw★ 598% same
- TomGranot/groupguard★ 311% same
- prathish-ks/isthmus★ 211% same
- breakcafe/picoclaw★ 133% same
- mcarmona1064-cell/clawbridge-codex★ 186% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- container/AGENTS.mdAGENTS.md
- container/CLAUDE.mdCLAUDE.md
- add-atomic-chat-toolSkill
- add-codexSkill
- add-dashboardSkill
- add-deltachatSkill
- add-discordSkill
- add-emacsSkill
- add-gcal-toolSkill
- add-gchatSkill
- add-githubSkill
- add-gmail-toolSkill
- add-imessageSkill
- add-karpathy-llm-wikiSkill
- add-linearSkill
- add-macos-statusbarSkill
- add-matrixSkill
- add-mnemonSkill
- add-ollama-providerSkill
- add-ollama-toolSkill
- add-opencodeSkill
- add-piSkill
- add-resendSkill
- add-rtkSkill
- add-signalSkill
- add-slackSkill
- add-teamsSkill
- add-telegramSkill
- add-vercelSkill
- add-webexSkill
- add-wechatSkill
- add-whatsapp-cloudSkill
- archive-tripSkill
- customizeSkill
- debugSkill
- get-qodo-rulesSkill
- init-first-agentSkill
- init-onecliSkill
- learnSkill
- manage-channelsSkill
- manage-mountsSkill
- migrate-from-openclawSkill
- migrate-from-v1Skill
- migrate-memorySkill
- migrate-nanoclawSkill
- nano-pvt-hubSkill
- new-knowledge-graph-tutorSkill
- new-tripSkill
- qodo-pr-resolverSkill
- reflectSkill
- setupSkill
- update-nanoclawSkill
- update-skillsSkill
- use-native-credential-proxySkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 5 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 85
Check if WhatsApp is already authenticated.
- Distinctive: line 93
Check whether the environment is headless (no display server):
- Very specific: line 101
Use AskUserQuestion to collect configuration.
- Very specific: line 103
If IS_HEADLESS=true AND not WSL → AskUserQuestion: How do you want to authenticate WhatsApp?
- Distinctive: line 112
If they chose pairing code:
- Very specific: line 161
Run the auth process in the background and poll store/pairing-code.txt for the code:
- Distinctive: line 181
After the user enters the code, poll for authentication to complete:
- Very specific: line 201
If dedicated, add to .env:
- Very specific: line 209
If you're in the middle of /setup, return to the setup flow now.
- Distinctive: line 231
Not supported (WhatsApp linked device limitation): edit messages, delete messages.
- Very specific: line 251
Ensure: digits only (no +), phone has internet, WhatsApp is updated.
- Distinctive: line 263
Run from your NanoClaw project root:
“Common” is measured: kept by at least 6 in 10 of the 9 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.
Files
Add WhatsApp Channel
Adds WhatsApp support via the native Baileys adapter (no Chat SDK bridge).
Install
NanoClaw doesn't ship channels in trunk. This skill copies the native WhatsApp (Baileys) adapter and its whatsapp-auth setup step in from the channels branch. No Chat SDK bridge.
Pre-flight (idempotent)
Skip to Credentials if all of these are already in place:
src/channels/whatsapp.tsexistssrc/channels/whatsapp-registration.test.tsexistssrc/channels/whatsapp.test.tsexistssrc/channels/index.tscontainsimport './whatsapp.js';setup/whatsapp-auth.tsandsetup/groups.tsboth existsetup/index.ts'sSTEPSmap contains both'whatsapp-auth':andgroups:@whiskeysockets/baileys,qrcode,pinoare listed inpackage.jsondependencies.claude/skills/add-whatsapp/scripts/wa-qr-browser.tsexists (ships with this skill)
Otherwise continue. Every step below is safe to re-run.
1. Fetch the channels branch
git fetch origin channels2. Copy the adapter and setup steps
git show origin/channels:src/channels/whatsapp.ts > src/channels/whatsapp.ts
git show origin/channels:src/channels/whatsapp-registration.test.ts > src/channels/whatsapp-registration.test.ts
git show origin/channels:src/channels/whatsapp.test.ts > src/channels/whatsapp.test.ts
git show origin/channels:setup/whatsapp-auth.ts > setup/whatsapp-auth.ts
git show origin/channels:setup/groups.ts > setup/groups.ts3. Append the self-registration import
Append to src/channels/index.ts (skip if already present):
import './whatsapp.js';4. Register the setup steps
In setup/index.ts, add these entries to the STEPS map (skip lines already present):
groups: () => import('./groups.js'),
'whatsapp-auth': () => import('./whatsapp-auth.js'),5. Install the adapter packages (pinned)
pnpm install @whiskeysockets/baileys@7.0.0-rc.9 qrcode@1.5.4 @types/qrcode@1.5.6 pino@9.6.06. Build and validate
pnpm run build
pnpm exec vitest run src/channels/whatsapp-registration.test.tsBoth must be clean before proceeding. whatsapp-registration.test.ts is the one integration test: it imports the real channel barrel and asserts the registry contains whatsapp. It goes red if the import './whatsapp.js'; line is deleted or drifts, if the barrel fails to evaluate (so the channel genuinely would not register), or if @whiskeysockets/baileys isn't installed (the import throws) — so it also implicitly verifies the dependency from step 5.
End-to-end message delivery against a real WhatsApp number is verified manually once the service is running — see Credentials, Wiring, and Troubleshooting.
Credentials
WhatsApp uses linked-device authentication — no API key, just a one-time pairing from your phone.
Check current state
Check if WhatsApp is already authenticated. If store/auth/creds.json exists, skip to "Shared vs dedicated number".
test -f store/auth/creds.json && echo "WhatsApp auth exists" || echo "No WhatsApp auth"Detect environment
Check whether the environment is headless (no display server):
[[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$OSTYPE" != darwin* ]] && echo "IS_HEADLESS=true" || echo "IS_HEADLESS=false"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) - Runs a small local HTTP server that renders the rotating QR as a PNG and auto-opens your default browser
- 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? (Digits only — country code followed by your 10-digit number, no + prefix, spaces, or dashes. Example: 15550000005 is a fictional test number.)
Clean previous auth state (if re-authenticating)
rm -rf store/auth/Run WhatsApp authentication
For QR code in browser (recommended):
pnpm exec tsx .claude/skills/add-whatsapp/scripts/wa-qr-browser.ts(Bash timeout: 150000ms)
The wrapper spawns setup/index.ts --step whatsapp-auth -- --method qr, parses each rotating QR from its WHATSAPP_AUTH_QR status blocks, and serves the current QR as a PNG on a local HTTP server (default port 8765, falls back to a free port). Flags: --clean (wipes store/auth/ before spawning) and --port N.
Tell the user:
A browser window will open with a QR code.
- Open WhatsApp > Settings > Linked Devices > Link a Device
- Scan the QR code in the browser
- The page will show "Authenticated!" when done
For QR code in terminal:
pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method qr(Bash timeout: 150000ms)
The setup driver emits each rotating QR as a WHATSAPP_AUTH_QR status block; when run directly (not through setup:auto) the raw QR string is printed and your terminal must render it as ASCII. If your terminal can't render it readably, use the browser method above.
Tell the user:
- Open WhatsApp > Settings > Linked Devices > Link a Device
- 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:
rm -f store/pairing-code.txt && pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method pairing-code --phone <their-phone-number> > /tmp/wa-auth.log 2>&1 &Then immediately poll for the code (do NOT wait for the background command to finish):
for i in $(seq 1 20); do [ -f store/pairing-code.txt ] && cat store/pairing-code.txt && break; sleep 1; doneDisplay the code to the user the moment it appears. Tell them:
Enter this code now — it expires in ~60 seconds.
- Open WhatsApp > Settings > Linked Devices > Link a Device
- Tap Link with phone number instead
- Enter the code immediately
After the user enters the code, poll for authentication to complete:
for i in $(seq 1 60); do grep -q 'STATUS: authenticated' /tmp/wa-auth.log 2>/dev/null && echo "authenticated" && break; grep -q 'STATUS: failed' /tmp/wa-auth.log 2>/dev/null && echo "failed" && break; sleep 2; doneIf failed: logged_out → delete store/auth/ and re-run. timeout → ask user, offer retry.
Verify authentication succeeded
test -f store/auth/creds.json && echo "Authentication successful" || echo "Authentication failed"Shared vs dedicated number
AskUserQuestion: Is this a shared phone number (personal WhatsApp) or a dedicated number?
- Shared number — your personal WhatsApp (bot prefixes messages with its name)
- Dedicated number — a separate phone/SIM for the assistant
If dedicated, add to .env:
ASSISTANT_HAS_OWN_NUMBER=trueNext Steps
If you're in the middle of /setup, return to the setup flow now.
Otherwise, run /manage-channels to wire this channel to an agent group.
Channel Info
- type:
whatsapp - terminology: WhatsApp calls them "groups" and "chats." A "chat" is a 1:1 DM; a "group" has multiple members.
- how-to-find-id: DMs use
<phone>@s.whatsapp.net(e.g.15550000005@s.whatsapp.net). Groups use<id>@g.us. To find your number:node -e "const c=JSON.parse(require('fs').readFileSync('store/auth/creds.json','utf-8'));console.log(c.me?.id?.split(':')[0]+'@s.whatsapp.net')". Groups are auto-discovered — checkpnpm exec tsx scripts/q.ts data/v2.db "SELECT platform_id, name FROM messaging_groups WHERE channel_type='whatsapp' AND is_group=1". - supports-threads: no
- typical-use: Interactive chat — direct messages or small groups
- default-isolation: Same agent group if you're the only participant across multiple chats. Separate agent group if different people are in different groups.
Features
- Markdown formatting —
**bold**→*bold*,*italic*→_italic_, headings→bold, code blocks preserved - Approval questions —
ask_user_questionrenders with/approve,/rejectslash commands - File attachments — send and receive images, video, audio, documents
- Reactions — send emoji reactions on messages
- Typing indicators — composing presence updates
- Credential requests — text fallback (WhatsApp has no modal support)
Not supported (WhatsApp linked device limitation): edit messages, delete messages.
Troubleshooting
QR code expired
QR codes expire after ~60 seconds. The browser wrapper rotates automatically as long as it's running; if it was stopped, re-run with --clean:
pnpm exec tsx .claude/skills/add-whatsapp/scripts/wa-qr-browser.ts --cleanPairing code not working
Codes expire in ~60 seconds. Delete auth and retry:
rm -rf store/auth/ && pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method pairing-code --phone <phone>Ensure: digits only (no +), phone has internet, WhatsApp is updated.
WhatsApp's pairing-code flow occasionally rejects valid codes with "Couldn't link device — An error happened. Please try again." This is a server-side rejection unrelated to the code itself; we've seen it happen twice in a row on fresh dedicated numbers. If you hit it more than once, switch to QR-browser auth — it has a noticeably higher success rate:
pnpm exec tsx .claude/skills/add-whatsapp/scripts/wa-qr-browser.ts --clean"waiting for this message" on reactions
Signal sessions corrupted from rapid restarts. Clear sessions.
Run from your NanoClaw project root:
source setup/lib/install-slug.sh
systemctl --user stop $(systemd_unit)
rm store/auth/session-*.json
systemctl --user start $(systemd_unit)Bot not responding
- Auth exists:
test -f store/auth/creds.json - Connected:
grep "Connected to WhatsApp" logs/nanoclaw.log | tail -1 - Channel wired:
pnpm exec tsx scripts/q.ts data/v2.db "SELECT mg.platform_id, mg.name FROM messaging_groups mg JOIN messaging_group_agents mga ON mg.id=mga.messaging_group_id WHERE mg.channel_type='whatsapp'" - Service running:
systemctl --user status "$(. setup/lib/install-slug.sh && systemd_unit)"
"conflict" disconnection
Two instances connected with same credentials. Ensure only one NanoClaw process is running.
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
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.

