add-whatsapp
Add WhatsApp as a channel. Can replace other channels entirely or run alongside them. Uses QR code or pairing code for authentication.
- License 许可
- MIT
- 所属仓库
- mbaker95/nanodex
- 最近更新
- 2026-03-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- add-whatsapp
- description
- Add WhatsApp as a channel. Can replace other channels entirely or run alongside them. Uses QR code or pairing code for authentication.
03 SKILL.md 正文
Add WhatsApp Channel
Use this skill when the user wants WhatsApp, or when first-run setup needs a recommended default channel.
WhatsApp is bundled in NanoDex core. The expected experience is:
- authenticate WhatsApp
- register the main chat
- verify NanoDex can respond
Do the work yourself. Only stop when the user must scan a QR code, enter a pairing code, choose between real options, or confirm a phone/chat choice.
User Experience Rules
- Do not ask the user to understand channel remotes, branch merges, or file locations.
- Do not tell the user to invoke another skill manually.
- Prefer one clear question at a time in normal conversation. Do not use
AskUserQuestion. - If the user does not know what channel to pick, WhatsApp is the recommended default.
- On Windows or PowerShell hosts, avoid bash-only commands when there is a cross-platform alternative.
Phase 1: Pre-flight
- Confirm the bundled WhatsApp files exist:
src/channels/whatsapp.tssrc/whatsapp-auth.tssetup/whatsapp-auth.ts
- Check whether WhatsApp auth already exists by looking for
store/auth/creds.json. - If auth exists but registration is missing, skip to Phase 3.
Phase 2: Authenticate WhatsApp
If authentication is needed, ask the user which method they want:
- QR code in browser
- QR code in terminal
- pairing code
Recommended default:
- desktop environment: QR code in browser
- headless or awkward remote terminal: pairing code
If the user chooses pairing code, ask for their phone number with country code and no +.
Use the setup step added by the WhatsApp channel:
npx tsx setup/index.ts --step whatsapp-auth -- --method ...
If re-authenticating, clear the old auth directory first.
Only pause for the user actions that must happen on their phone:
- scan QR
- enter pairing code
When auth finishes, verify store/auth/creds.json exists.
Phase 3: Register the Main Chat
Once auth exists, guide the user through choosing where NanoDex should live:
- self-chat
- solo group
- existing group
- DM with a dedicated assistant number
Recommended default:
- shared/personal number: self-chat
- dedicated assistant number: direct message with the bot
Ask for:
- shared number vs dedicated assistant number
- trigger word if they want something other than the default
- assistant display name if they want something other than the default
- chat choice
Then determine the correct JID:
- self-chat from auth credentials
- group JIDs from the
groupssetup step - DM JID from the chosen number
Register the chat with npx tsx setup/index.ts --step register ...
For the main chat:
- mark it as main
- disable trigger requirement when appropriate
Phase 4: Verify
After registration:
- run
npm run buildif code or env changed - sync
.envtodata/env/envwhen needed - restart the NanoDex service/runtime if needed
- tell the user the exact first test message to send
Example verification guidance:
- main/self-chat: “Send any message”
- group: “Send
@Assistant hello”
If verification fails, inspect logs and fix the issue rather than giving the user a troubleshooting list immediately.
Troubleshooting Priorities
If WhatsApp does not respond, check these in order:
- auth credentials exist
- channel code is installed
- the chat is registered
- the service/runtime is running
- the trigger requirement matches the chosen chat type
If the issue is a stale auth session, clear auth and re-run authentication. If the issue is a duplicate process conflict, stop the extra process and retry.
Completion
Finish by telling the user:
- which chat was registered
- whether it is the main chat
- what trigger to use
- whether a restart was needed
- the exact first message to send for a live test
04 同仓库更多 Skills
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.
x-integration
X (Twitter) integration for NanoClaw. Post tweets, like, reply, retweet, and quote. Use for setup, testing, or troubleshooting X functionality. Triggers on "setup x", "x integration", "twitter", "post tweet", "tweet".
use-local-whisper
Use when the user wants local voice transcription instead of OpenAI Whisper API. Switches to whisper.cpp running on Apple Silicon. WhatsApp only for now. Requires voice-transcription skill to be applied first.
update-skills
Check for and apply updates to installed skill branches from upstream.
update-nanoclaw
Efficiently bring upstream NanoClaw updates into a customized install, with preview, selective cherry-pick, and low token usage.
setup
Run initial NanoClaw setup. Use when user wants to install dependencies, authenticate messaging channels, register their main channel, or start the background services. Triggers on "setup", "install", "configure nanoclaw", or first-time setup requests.