SkillAgentSearch skills...

add-whatsapp

Add WhatsApp channel via native Baileys adapter. Direct connection — no Chat SDK bridge. Uses QR code or pairing code for authentication.

Install / Use

npx skills add nanocoai/nanoclaw --skill add-whatsapp

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

90/100

Category

Marketing

Supported Platforms

Universal

Tags

Our assessment of add-whatsapp

add-whatsapp scores 90/100 on our quality scale, 82nd of 301 Marketing skills we index (top 28%).

Its SKILL.md is 25 KB long, well organised into 32 sections with 43 code examples: a thorough specification that gives an agent plenty to work with.

With 30,846 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
19/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 3 days ago, so add-whatsapp is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

add-whatsapp compared with similar skills

All 4 of these similar skills score higher than add-whatsapp; compare them before choosing.

SkillScoreStarsUpdatedFormat
add-whatsapp (this skill)by nanocoai9030.8k3d agoSKILL.md
algorithmic-artby anthropics100177.9k5d agoSKILL.md
pptxby anthropics100177.9k5d agoSKILL.md
designby nextlevelbuilder100130.2k6d agoSKILL.md
ui-ux-pro-maxby nextlevelbuilder100130.2k6d agoSKILL.md

Frequently asked questions

How do I install add-whatsapp?
Run npx skills add nanocoai/nanoclaw --skill add-whatsapp. The install tabs above show the steps for each supported agent.
Which AI agents does add-whatsapp work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is add-whatsapp safe to use?
It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is add-whatsapp still maintained?
The repository was last updated 3 days ago, so add-whatsapp is actively maintained.

name: add-whatsapp description: Add WhatsApp channel via native Baileys adapter. Direct connection — no Chat SDK bridge. Uses QR code or pairing code for authentication.

Add WhatsApp Channel

Adds WhatsApp support via the native Baileys adapter — a direct WhatsApp Web connection, no Chat SDK bridge. NanoClaw doesn't ship channels in trunk — this skill copies the WhatsApp adapter in from the channels branch.

The mechanical steps under Apply carry nc: directive fences: an agent reads the prose and applies them, and a parser can apply them deterministically from the same document. Every directive is idempotent, so the whole skill is safe to re-run; anything a parser can't apply falls back to the prose beside it.

Number safety check (required)

Complete this check before running any install or authentication command. If the user already said they want to use their shared, personal, main, existing, or everyday WhatsApp number, treat it as a shared number and show the warning immediately. Do not ask the number-type question again.

Otherwise, ask which WhatsApp number NanoClaw will use:

Which WhatsApp number will NanoClaw use? `dedicated` (recommended) — a separate number used only for NanoClaw (spare SIM, eSIM, or old phone). `shared` — your existing everyday / personal WhatsApp number.

If the answer is shared, show this warning — tell the user:

⚠️ Risk to your WhatsApp account

Connecting your shared or personal number could cause WhatsApp to temporarily suspend or permanently ban that number. You could lose access to the WhatsApp account, chats, and groups you rely on.

We strongly recommend using a separate, dedicated number for NanoClaw.

On your personal number, the agent lives only in your "You" / self-chat. Messages other people send you are ignored entirely — never read, never answered, never flagged for approval. Nobody else can talk to the agent.

If you want the agent reachable as its own contact, consider:
• Telegram — a bot takes ~2 minutes to set up
• a dedicated WhatsApp number — spare SIM, eSIM, or old phone
• /add-whatsapp-cloud — the official Meta Business API

Then confirm how to proceed. Do not continue with installation or authentication unless the user explicitly selects the second option:

How would you like to proceed? `dedicated` (recommended) — go back and use a dedicated number. `continue` — I understand the risk, continue with my shared number.

Remember the effective mode for the rest of this workflow: it is shared only when the user explicitly acknowledged the risk and continued; anyone who chose a dedicated number — up front or at the warning — continues as a dedicated-number install without seeing the warning again:

echo dedicated
echo shared
echo dedicated

Apply

1. Copy the adapter and its registration test

Fetch the channels branch and copy the WhatsApp adapter, its registration test, and the whatsapp-formatting container skill (overwrite — the branch is canonical). The whatsapp-auth setup step is maintained in trunk, so it is not copied here:

src/channels/whatsapp.ts
src/channels/whatsapp-registration.test.ts
container/skills/whatsapp-formatting/SKILL.md
container/skills/whatsapp-formatting/instructions.md

The whatsapp-formatting container skill is part of the channel payload: its instructions.md is inlined as a section of every group's composed project document (see src/project-doc-compose.ts), teaching agents WhatsApp's formatting syntax. Trunk does not ship it — without this copy step agents format WhatsApp messages with generic markdown that renders literally.

2. Register the adapter

Append the self-registration import to the channel barrel (skipped if the line is already present). This one line is the skill's only reach-in into core:

import './whatsapp.js';

3. Install the adapter packages

Pinned to exact versions — the supply-chain policy rejects ranges and latest. Baileys is the WhatsApp Web client; qrcode renders the device-link QR in the terminal; pino is Baileys' logger:

@whiskeysockets/baileys@7.0.0-rc.9
qrcode@1.5.4
@types/qrcode@1.5.6
pino@9.6.0

4. Build and validate

Build first: it typechecks the adapter against core and proves the dependencies are installed. Then run the one integration test.

pnpm run build
pnpm exec vitest run src/channels/whatsapp-registration.test.ts

whatsapp-registration.test.ts 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, or if @whiskeysockets/baileys isn't installed (the import throws) — so it also covers the dependency from step 3. End-to-end delivery against a real WhatsApp number is verified manually once the service runs.

Authenticate

WhatsApp uses linked-device authentication — no API key, just a one-time pairing from your phone. The adapter is installed and registered, but its factory returns null (and the channel stays dark) until store/auth/creds.json exists.

The number safety check above is still required even when credentials already exist. If store/auth/creds.json exists, skip ahead to "Dedicated vs personal number" after completing the safety check — the link step below reports the already-linked number and moves on.

Pick how to link the device. qr shows a rotating QR you scan with your phone's camera; pairing-code shows an 8-character code you type into WhatsApp (no camera needed, but it needs your phone number):

How do you want to link WhatsApp? Type `qr` to scan a QR code in this terminal, or `pairing-code` to enter a code on your phone (no camera needed).

The pairing-code method needs the number you're linking, the way WhatsApp expects it — digits only, country code first, no +, spaces, or dashes (the QR method skips this entirely):

Your WhatsApp phone number — digits only, country code first (e.g. 14155551234 for +1 415-555-1234).

Point the user at the right screen before the code appears. For the QR method, tell the user:

Link WhatsApp by QR:
1. On your phone, open WhatsApp → Settings → Linked Devices → Link a Device.
2. A QR code will appear in this terminal below and refresh every ~20 seconds. Point your phone's camera at it to scan.

For the pairing-code method, tell the user:

Link WhatsApp by pairing code:
1. On your phone, open WhatsApp → Settings → Linked Devices → Link a Device → tap "Link with phone number instead".
2. An 8-character code will appear in this terminal below. Enter it on your phone immediately — it expires in about 60 seconds.

Now run the linked-device handshake. It streams the live QR (or the pairing-code card) to this terminal and, on success, reports the linked WhatsApp number. Run the command for the method chosen above — qr or pairing-code:

pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method qr
pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method pairing-code --phone {{phone}}

If the handshake fails (logged_out or a timeout), the code expired — clear store/auth/ and run the step again for a fresh one. See Troubleshooting.

A successful link reports the number back as bot_phone. If it came back empty, the device never confirmed (an expired QR or pairing code), so don't restart or wire against a blank number — clear store/auth/ and re-run the link step first:

[ -n "{{bot_phone}}" ]

Your personal chat number (dedicated number only)

On a dedicated number, the agent owns the linked line and you chat with it from your own, different number. Collect that number — it is required, and it is not the number you just linked. Tell the user:

The agent is signed in as +{{bot_phone}}.

Now, your personal number — the one you'll chat with the agent from. It'll show up as a normal two-way conversation with the agent's contact.
Your personal number, where you'll chat from — digits only, country code first (e.g. 14155551234). Required — this must be YOUR number, not the agent's linked one.

Chatting from the bot's own number IS the shared-number setup — if the number given equals the linked number, stop and route through the same interception screen as the up-front pick: show the account-risk warning from the number safety check again and get explicit acknowledgement before treating this install as shared (or collect a genuinely different personal number and stay dedicated). If the install does become shared, correct the mode everywhere it was recorded — in particular make sure .env ends up with ASSISTANT_HAS_OWN_NUMBER=false, rewriting a true that may already have been written; a stale true on a personal number makes the bot claim messages addressed to the human:

[ "{{chat_phone}}" != "{{bot_phone}}" ]

Dedicated vs personal number

The adapter behaves fundamentally differently depending on whether the linked number is the assistant's own or the operator's personal one. The switch is ASSISTANT_HAS_OWN_NUMBER in .env, read by the adapter itself at startup. Inference rule: absent (or anything other than true) means shared/personal — the safe default, since misreading a personal number as dedicated makes the bot claim messages addressed to the human.

  • Shared/personal number (ASSISTANT_HAS_OWN_NUMBER unset or not true) — DMs to this number and group @-tags of it address the human, not the bot. The adapter never emits a mention signal (mentions: 'never' in its declared channel defaults), so: no stranger DM ever auto-creates a messaging group or raises an admin approval card; group wirings default to a name pattern (\b<AgentName>\b) instead of platform mentions; auto-created chats default to unknown_sender_policy: 'strict'; outbound messages are prefixed with the assistant's name.
  • Dedicated number (ASSISTANT_HAS_OWN_NUMBER=true) — everything sent to the number is for the bot. DMs and group mentions carry a real mention signal (mentions: 'platform'), unknown senders escalate via request_approval approval cards, and card-approved groups wire with engage_mode: 'mention'. No name prefix on outbound.

Use the mode selected in the required safety check. If information discovered later contradicts that selection, ask again before changing modes; switching to shared requires the same warning and explicit acknowledgement.

Write the answer to .env explicitly in both cases (don't rely on the inference rule for new installs), replacing any existing ASSISTANT_HAS_OWN_NUMBER line. Written in both modes so a re-run that switches dedicated → shared doesn't leave a stale true behind:

grep -q '^ASSISTANT_HAS_OWN_NUMBER=' .env && sed -i.bak 's/^ASSISTANT_HAS_OWN_NUMBER=.*/ASSISTANT_HAS_OWN_NUMBER=true/' .env && rm -f .env.bak || echo 'ASSISTANT_HAS_OWN_NUMBER=true' >> .env

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars30.8k
CategoryMarketing
Updated3d ago
Forks12.8k

Languages

TypeScript

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions