[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DG1YGJB2FNGNKSDXATS16K":3,"skill-same:01M6DG1YGJB2FNGNKSDXATS16K":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":13,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M6DG1YGJB2FNGNKSDXATS16K","add-whatsapp",null,"Add WhatsApp as a channel. Can replace other channels entirely or run alongside them. Uses QR code or pairing code for authentication.","mbaker95\u002Fnanodex","mbaker95","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11398294?v=4","01M6DFXVNAJHZG78Y2D700Y6V3","01M6DFXVTTW83QGKTJ9FJ5YCH5",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-whatsapp\u002FSKILL.md",[],[18,19,20,21,22,23,24,25],"whatsapp","add whatsapp","run","code","authentication","qr code","channel","as","2026-11-10 10:12:30",false,"---\nname: add-whatsapp\ndescription: Add WhatsApp as a channel. Can replace other channels entirely or run alongside them. Uses QR code or pairing code for authentication.\n---\n\n# Add WhatsApp Channel\n\nThis skill adds WhatsApp support to NanoClaw. It installs the WhatsApp channel code, dependencies, and guides through authentication, registration, and configuration.\n\n## Phase 1: Pre-flight\n\n### Check current state\n\nCheck if WhatsApp is already configured. If `store\u002Fauth\u002F` exists with credential files, skip to Phase 4 (Registration) or Phase 5 (Verify).\n\n```bash\nls store\u002Fauth\u002Fcreds.json 2>\u002Fdev\u002Fnull && echo \"WhatsApp auth exists\" || echo \"No WhatsApp auth\"\n```\n\n### Detect environment\n\nCheck whether the environment is headless (no display server):\n\n```bash\n[[ -z \"$DISPLAY\" && -z \"$WAYLAND_DISPLAY\" && \"$OSTYPE\" != darwin* ]] && echo \"IS_HEADLESS=true\" || echo \"IS_HEADLESS=false\"\n```\n\n### Ask the user\n\nUse `AskUserQuestion` to collect configuration. **Adapt auth options based on environment:**\n\nIf IS_HEADLESS=true AND not WSL → AskUserQuestion: How do you want to authenticate WhatsApp?\n- **Pairing code** (Recommended) - Enter a numeric code on your phone (no camera needed, requires phone number)\n- **QR code in terminal** - Displays QR code in the terminal (can be too small on some displays)\n\nOtherwise (macOS, desktop Linux, or WSL) → AskUserQuestion: How do you want to authenticate WhatsApp?\n- **QR code in browser** (Recommended) - Opens a browser window with a large, scannable QR code\n- **Pairing code** - Enter a numeric code on your phone (no camera needed, requires phone number)\n- **QR code in terminal** - Displays QR code in the terminal (can be too small on some displays)\n\nIf they chose pairing code:\n\nAskUserQuestion: What is your phone number? (Include country code without +, e.g., 1234567890)\n\n## Phase 2: Apply Code Changes\n\nCheck if `src\u002Fchannels\u002Fwhatsapp.ts` already exists. If it does, skip to Phase 3 (Authentication).\n\n### Ensure channel remote\n\n```bash\ngit remote -v\n```\n\nIf `whatsapp` is missing, add it:\n\n```bash\ngit remote add whatsapp https:\u002F\u002Fgithub.com\u002Fqwibitai\u002Fnanoclaw-whatsapp.git\n```\n\n### Merge the skill branch\n\n```bash\ngit fetch whatsapp main\ngit merge whatsapp\u002Fmain\n```\n\nThis merges in:\n- `src\u002Fchannels\u002Fwhatsapp.ts` (WhatsAppChannel class with self-registration via `registerChannel`)\n- `src\u002Fchannels\u002Fwhatsapp.test.ts` (41 unit tests)\n- `src\u002Fwhatsapp-auth.ts` (standalone WhatsApp authentication script)\n- `setup\u002Fwhatsapp-auth.ts` (WhatsApp auth setup step)\n- `import '.\u002Fwhatsapp.js'` appended to the channel barrel file `src\u002Fchannels\u002Findex.ts`\n- `'whatsapp-auth'` step added to `setup\u002Findex.ts`\n- `@whiskeysockets\u002Fbaileys`, `qrcode`, `qrcode-terminal` npm dependencies in `package.json`\n- `ASSISTANT_HAS_OWN_NUMBER` in `.env.example`\n\nIf the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.\n\n### Validate code changes\n\n```bash\nnpm install\nnpm run build\nnpx vitest run src\u002Fchannels\u002Fwhatsapp.test.ts\n```\n\nAll tests must pass and build must be clean before proceeding.\n\n## Phase 3: Authentication\n\n### Clean previous auth state (if re-authenticating)\n\n```bash\nrm -rf store\u002Fauth\u002F\n```\n\n### Run WhatsApp authentication\n\nFor QR code in browser (recommended):\n\n```bash\nnpx tsx setup\u002Findex.ts --step whatsapp-auth -- --method qr-browser\n```\n\n(Bash timeout: 150000ms)\n\nTell the user:\n\n> A browser window will open with a QR code.\n>\n> 1. Open WhatsApp > **Settings** > **Linked Devices** > **Link a Device**\n> 2. Scan the QR code in the browser\n> 3. The page will show \"Authenticated!\" when done\n\nFor QR code in terminal:\n\n```bash\nnpx tsx setup\u002Findex.ts --step whatsapp-auth -- --method qr-terminal\n```\n\nTell the user to run `npm run auth` in another terminal, then:\n\n> 1. Open WhatsApp > **Settings** > **Linked Devices** > **Link a Device**\n> 2. Scan the QR code displayed in the terminal\n\nFor pairing code:\n\nTell 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.\n\nRun the auth process in the background and poll `store\u002Fpairing-code.txt` for the code:\n\n```bash\nrm -f store\u002Fpairing-code.txt && npx tsx setup\u002Findex.ts --step whatsapp-auth -- --method pairing-code --phone \u003Ctheir-phone-number> > \u002Ftmp\u002Fwa-auth.log 2>&1 &\n```\n\nThen immediately poll for the code (do NOT wait for the background command to finish):\n\n```bash\nfor i in $(seq 1 20); do [ -f store\u002Fpairing-code.txt ] && cat store\u002Fpairing-code.txt && break; sleep 1; done\n```\n\nDisplay the code to the user the moment it appears. Tell them:\n\n> **Enter this code now** — it expires in ~60 seconds.\n>\n> 1. Open WhatsApp > **Settings** > **Linked Devices** > **Link a Device**\n> 2. Tap **Link with phone number instead**\n> 3. Enter the code immediately\n\nAfter the user enters the code, poll for authentication to complete:\n\n```bash\nfor i in $(seq 1 60); do grep -q 'AUTH_STATUS: authenticated' \u002Ftmp\u002Fwa-auth.log 2>\u002Fdev\u002Fnull && echo \"authenticated\" && break; grep -q 'AUTH_STATUS: failed' \u002Ftmp\u002Fwa-auth.log 2>\u002Fdev\u002Fnull && echo \"failed\" && break; sleep 2; done\n```\n\n**If failed:** qr_timeout → re-run. logged_out → delete `store\u002Fauth\u002F` and re-run. 515 → re-run. timeout → ask user, offer retry.\n\n### Verify authentication succeeded\n\n```bash\ntest -f store\u002Fauth\u002Fcreds.json && echo \"Authentication successful\" || echo \"Authentication failed\"\n```\n\n### Configure environment\n\nChannels auto-enable when their credentials are present — WhatsApp activates when `store\u002Fauth\u002Fcreds.json` exists.\n\nSync to container environment:\n\n```bash\nmkdir -p data\u002Fenv && cp .env data\u002Fenv\u002Fenv\n```\n\n## Phase 4: Registration\n\n### Configure trigger and channel type\n\nGet the bot's WhatsApp number: `node -e \"const c=require('.\u002Fstore\u002Fauth\u002Fcreds.json');console.log(c.me.id.split(':')[0].split('@')[0])\"`\n\nAskUserQuestion: Is this a shared phone number (personal WhatsApp) or a dedicated number (separate device)?\n- **Shared number** - Your personal WhatsApp number (recommended: use self-chat or a solo group)\n- **Dedicated number** - A separate phone\u002FSIM for the assistant\n\nAskUserQuestion: What trigger word should activate the assistant?\n- **@Andy** - Default trigger\n- **@Claw** - Short and easy\n- **@Claude** - Match the AI name\n\nAskUserQuestion: What should the assistant call itself?\n- **Andy** - Default name\n- **Claw** - Short and easy\n- **Claude** - Match the AI name\n\nAskUserQuestion: Where do you want to chat with the assistant?\n\n**Shared number options:**\n- **Self-chat** (Recommended) - Chat in your own \"Message Yourself\" conversation\n- **Solo group** - A group with just you and the linked device\n- **Existing group** - An existing WhatsApp group\n\n**Dedicated number options:**\n- **DM with bot** (Recommended) - Direct message the bot's number\n- **Solo group** - A group with just you and the bot\n- **Existing group** - An existing WhatsApp group\n\n### Get the JID\n\n**Self-chat:** JID = your phone number with `@s.whatsapp.net`. Extract from auth credentials:\n\n```bash\nnode -e \"const c=JSON.parse(require('fs').readFileSync('store\u002Fauth\u002Fcreds.json','utf-8'));console.log(c.me?.id?.split(':')[0]+'@s.whatsapp.net')\"\n```\n\n**DM with bot:** Ask for the bot's phone number. JID = `NUMBER@s.whatsapp.net`\n\n**Group (solo, existing):** Run group sync and list available groups:\n\n```bash\nnpx tsx setup\u002Findex.ts --step groups\nnpx tsx setup\u002Findex.ts --step groups --list\n```\n\nThe output shows `JID|GroupName` pairs. Present candidates as AskUserQuestion (names only, not JIDs).\n\n### Register the chat\n\n```bash\nnpx tsx setup\u002Findex.ts --step register \\\n  --jid \"\u003Cjid>\" \\\n  --name \"\u003Cchat-name>\" \\\n  --trigger \"@\u003Ctrigger>\" \\\n  --folder \"whatsapp_main\" \\\n  --channel whatsapp \\\n  --assistant-name \"\u003Cname>\" \\\n  --is-main \\\n  --no-trigger-required  # Only for main\u002Fself-chat\n```\n\nFor additional groups (trigger-required):\n\n```bash\nnpx tsx setup\u002Findex.ts --step register \\\n  --jid \"\u003Cgroup-jid>\" \\\n  --name \"\u003Cgroup-name>\" \\\n  --trigger \"@\u003Ctrigger>\" \\\n  --folder \"whatsapp_\u003Cgroup-name>\" \\\n  --channel whatsapp\n```\n\n## Phase 5: Verify\n\n### Build and restart\n\n```bash\nnpm run build\n```\n\nRestart the service:\n\n```bash\n# macOS (launchd)\nlaunchctl kickstart -k gui\u002F$(id -u)\u002Fcom.nanoclaw\n\n# Linux (systemd)\nsystemctl --user restart nanoclaw\n\n# Linux (nohup fallback)\nbash start-nanoclaw.sh\n```\n\n### Test the connection\n\nTell the user:\n\n> Send a message to your registered WhatsApp chat:\n> - For self-chat \u002F main: Any message works\n> - For groups: Use the trigger word (e.g., \"@Andy hello\")\n>\n> The assistant should respond within a few seconds.\n\n### Check logs if needed\n\n```bash\ntail -f logs\u002Fnanoclaw.log\n```\n\n## Troubleshooting\n\n### QR code expired\n\nQR codes expire after ~60 seconds. Re-run the auth command:\n\n```bash\nrm -rf store\u002Fauth\u002F && npx tsx src\u002Fwhatsapp-auth.ts\n```\n\n### Pairing code not working\n\nCodes expire in ~60 seconds. To retry:\n\n```bash\nrm -rf store\u002Fauth\u002F && npx tsx src\u002Fwhatsapp-auth.ts --pairing-code --phone \u003Cphone>\n```\n\nEnter the code **immediately** when it appears. Also ensure:\n1. Phone number includes country code without `+` (e.g., `1234567890`)\n2. Phone has internet access\n3. WhatsApp is updated to the latest version\n\nIf pairing code keeps failing, switch to QR-browser auth instead:\n\n```bash\nrm -rf store\u002Fauth\u002F && npx tsx setup\u002Findex.ts --step whatsapp-auth -- --method qr-browser\n```\n\n### \"conflict\" disconnection\n\nThis happens when two instances connect with the same credentials. Ensure only one NanoClaw process is running:\n\n```bash\npkill -f \"node dist\u002Findex.js\"\n# Then restart\n```\n\n### Bot not responding\n\nCheck:\n1. Auth credentials exist: `ls store\u002Fauth\u002Fcreds.json`\n3. Chat is registered: `sqlite3 store\u002Fmessages.db \"SELECT * FROM registered_groups WHERE jid LIKE '%whatsapp%' OR jid LIKE '%@g.us' OR jid LIKE '%@s.whatsapp.net'\"`\n4. Service is running: `launchctl list | grep nanoclaw` (macOS) or `systemctl --user status nanoclaw` (Linux)\n5. Logs: `tail -50 logs\u002Fnanoclaw.log`\n\n### Group names not showing\n\nRun group metadata sync:\n\n```bash\nnpx tsx setup\u002Findex.ts --step groups\n```\n\nThis fetches all group names from WhatsApp. Runs automatically every 24 hours.\n\n## After Setup\n\nIf running `npm run dev` while the service is active:\n\n```bash\n# macOS:\nlaunchctl unload ~\u002FLibrary\u002FLaunchAgents\u002Fcom.nanoclaw.plist\nnpm run dev\n# When done testing:\nlaunchctl load ~\u002FLibrary\u002FLaunchAgents\u002Fcom.nanoclaw.plist\n\n# Linux:\n# systemctl --user stop nanoclaw\n# npm run dev\n# systemctl --user start nanoclaw\n```\n\n## Removal\n\nTo remove WhatsApp integration:\n\n1. Delete auth credentials: `rm -rf store\u002Fauth\u002F`\n2. Remove WhatsApp registrations: `sqlite3 store\u002Fmessages.db \"DELETE FROM registered_groups WHERE jid LIKE '%@g.us' OR jid LIKE '%@s.whatsapp.net'\"`\n3. Sync env: `mkdir -p data\u002Fenv && cp .env data\u002Fenv\u002Fenv`\n4. Rebuild and restart: `npm run build && launchctl kickstart -k gui\u002F$(id -u)\u002Fcom.nanoclaw` (macOS) or `npm run build && systemctl --user restart nanoclaw` (Linux)\n","# Add WhatsApp Channel\n\nThis skill adds WhatsApp support to NanoClaw. It installs the WhatsApp channel code, dependencies, and guides through authentication, registration, and configuration.\n\n## Phase 1: Pre-flight\n\n### Check current state\n\nCheck if WhatsApp is already configured. If `store\u002Fauth\u002F` exists with credential files, skip to Phase 4 (Registration) or Phase 5 (Verify).\n\n```bash\nls store\u002Fauth\u002Fcreds.json 2>\u002Fdev\u002Fnull && echo \"WhatsApp auth exists\" || echo \"No WhatsApp auth\"\n```\n\n### Detect environment\n\nCheck whether the environment is headless (no display server):\n\n```bash\n[[ -z \"$DISPLAY\" && -z \"$WAYLAND_DISPLAY\" && \"$OSTYPE\" != darwin* ]] && echo \"IS_HEADLESS=true\" || echo \"IS_HEADLESS=false\"\n```\n\n### Ask the user\n\nUse `AskUserQuestion` to collect configuration. **Adapt auth options based on environment:**\n\nIf IS_HEADLESS=true AND not WSL → AskUserQuestion: How do you want to authenticate WhatsApp?\n- **Pairing code** (Recommended) - Enter a numeric code on your phone (no camera needed, requires phone number)\n- **QR code in terminal** - Displays QR code in the terminal (can be too small on some displays)\n\nOtherwise (macOS, desktop Linux, or WSL) → AskUserQuestion: How do you want to authenticate WhatsApp?\n- **QR code in browser** (Recommended) - Opens a browser window with a large, scannable QR code\n- **Pairing code** - Enter a numeric code on your phone (no camera needed, requires phone number)\n- **QR code in terminal** - Displays QR code in the terminal (can be too small on some displays)\n\nIf they chose pairing code:\n\nAskUserQuestion: What is your phone number? (Include country code without +, e.g., 1234567890)\n\n## Phase 2: Apply Code Changes\n\nCheck if `src\u002Fchannels\u002Fwhatsapp.ts` already exists. If it does, skip to Phase 3 (Authentication).\n\n### Ensure channel remote\n\n```bash\ngit remote -v\n```\n\nIf `whatsapp` is missing, add it:\n\n```bash\ngit remote add whatsapp https:\u002F\u002Fgithub.com\u002Fqwibitai\u002Fnanoclaw-whatsapp.git\n```\n\n### Merge the skill branch\n\n```bash\ngit fetch whatsapp main\ngit merge whatsapp\u002Fmain\n```\n\nThis merges in:\n- `src\u002Fchannels\u002Fwhatsapp.ts` (WhatsAppChannel class with self-registration via `registerChannel`)\n- `src\u002Fchannels\u002Fwhatsapp.test.ts` (41 unit tests)\n- `src\u002Fwhatsapp-auth.ts` (standalone WhatsApp authentication script)\n- `setup\u002Fwhatsapp-auth.ts` (WhatsApp auth setup step)\n- `import '.\u002Fwhatsapp.js'` appended to the channel barrel file `src\u002Fchannels\u002Findex.ts`\n- `'whatsapp-auth'` step added to `setup\u002Findex.ts`\n- `@whiskeysockets\u002Fbaileys`, `qrcode`, `qrcode-terminal` npm dependencies in `package.json`\n- `ASSISTANT_HAS_OWN_NUMBER` in `.env.example`\n\nIf the merge reports conflicts, resolve them by reading the conflicted files and understanding the intent of both sides.\n\n### Validate code changes\n\n```bash\nnpm install\nnpm run build\nnpx vitest run src\u002Fchannels\u002Fwhatsapp.test.ts\n```\n\nAll tests must pass and build must be clean before proceeding.\n\n## Phase 3: Authentication\n\n### Clean previous auth state (if re-authenticating)\n\n```bash\nrm -rf store\u002Fauth\u002F\n```\n\n### Run WhatsApp authentication\n\nFor QR code in browser (recommended):\n\n```bash\nnpx tsx setup\u002Findex.ts --step whatsapp-auth -- --method qr-browser\n```\n\n(Bash timeout: 150000ms)\n\nTell the user:\n\n> A browser window will open with a QR code.\n>\n> 1. Open WhatsApp > **Settings** > **Linked Devices** > **Link a Device**\n> 2. Scan the QR code in the browser\n> 3. The page will show \"Authenticated!\" when done\n\nFor QR code in terminal:\n\n```bash\nnpx tsx setup\u002Findex.ts --step whatsapp-auth -- --method qr-terminal\n```\n\nTell the user to run `npm run auth` in another terminal, then:\n\n> 1. Open WhatsApp > **Settings** > **Linked Devices** > **Link a Device**\n> 2. Scan the QR code displayed in the terminal\n\nFor pairing code:\n\nTell 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.\n\nRun the auth process in the background and poll `store\u002Fpairing-code.txt` for the code:\n\n```bash\nrm -f store\u002Fpairing-code.txt && npx tsx setup\u002Findex.ts --step whatsapp-auth -- --method pairing-code --phone \u003Ctheir-phone-number> > \u002Ftmp\u002Fwa-auth.log 2>&1 &\n```\n\nThen immediately poll for the code (do NOT wait for the background command to finish):\n\n```bash\nfor i in $(seq 1 20); do [ -f store\u002Fpairing-code.txt ] && cat store\u002Fpairing-code.txt && break; sleep 1; done\n```\n\nDisplay the code to the user the moment it appears. Tell them:\n\n> **Enter this code now** — it expires in ~60 seconds.\n>\n> 1. Open WhatsApp > **Settings** > **Linked Devices** > **Link a Device**\n> 2. Tap **Link with phone number instead**\n> 3. Enter the code immediately\n\nAfter the user enters the code, poll for authentication to complete:\n\n```bash\nfor i in $(seq 1 60); do grep -q 'AUTH_STATUS: authenticated' \u002Ftmp\u002Fwa-auth.log 2>\u002Fdev\u002Fnull && echo \"authenticated\" && break; grep -q 'AUTH_STATUS: failed' \u002Ftmp\u002Fwa-auth.log 2>\u002Fdev\u002Fnull && echo \"failed\" && break; sleep 2; done\n```\n\n**If failed:** qr_timeout → re-run. logged_out → delete `store\u002Fauth\u002F` and re-run. 515 → re-run. timeout → ask user, offer retry.\n\n### Verify authentication succeeded\n\n```bash\ntest -f store\u002Fauth\u002Fcreds.json && echo \"Authentication successful\" || echo \"Authentication failed\"\n```\n\n### Configure environment\n\nChannels auto-enable when their credentials are present — WhatsApp activates when `store\u002Fauth\u002Fcreds.json` exists.\n\nSync to container environment:\n\n```bash\nmkdir -p data\u002Fenv && cp .env data\u002Fenv\u002Fenv\n```\n\n## Phase 4: Registration\n\n### Configure trigger and channel type\n\nGet the bot's WhatsApp number: `node -e \"const c=require('.\u002Fstore\u002Fauth\u002Fcreds.json');console.log(c.me.id.split(':')[0].split('@')[0])\"`\n\nAskUserQuestion: Is this a shared phone number (personal WhatsApp) or a dedicated number (separate device)?\n- **Shared number** - Your personal WhatsApp number (recommended: use self-chat or a solo group)\n- **Dedicated number** - A separate phone\u002FSIM for the assistant\n\nAskUserQuestion: What trigger word should activate the assistant?\n- **@Andy** - Default trigger\n- **@Claw** - Short and easy\n- **@Claude** - Match the AI name\n\nAskUserQuestion: What should the assistant call itself?\n- **Andy** - Default name\n- **Claw** - Short and easy\n- **Claude** - Match the AI name\n\nAskUserQuestion: Where do you want to chat with the assistant?\n\n**Shared number options:**\n- **Self-chat** (Recommended) - Chat in your own \"Message Yourself\" conversation\n- **Solo group** - A group with just you and the linked device\n- **Existing group** - An existing WhatsApp group\n\n**Dedicated number options:**\n- **DM with bot** (Recommended) - Direct message the bot's number\n- **Solo group** - A group with just you and the bot\n- **Existing group** - An existing WhatsApp group\n\n### Get the JID\n\n**Self-chat:** JID = your phone number with `@s.whatsapp.net`. Extract from auth credentials:\n\n```bash\nnode -e \"const c=JSON.parse(require('fs').readFileSync('store\u002Fauth\u002Fcreds.json','utf-8'));console.log(c.me?.id?.split(':')[0]+'@s.whatsapp.net')\"\n```\n\n**DM with bot:** Ask for the bot's phone number. JID = `NUMBER@s.whatsapp.net`\n\n**Group (solo, existing):** Run group sync and list available groups:\n\n```bash\nnpx tsx setup\u002Findex.ts --step groups\nnpx tsx setup\u002Findex.ts --step groups --list\n```\n\nThe output shows `JID|GroupName` pairs. Present candidates as AskUserQuestion (names only, not JIDs).\n\n### Register the chat\n\n```bash\nnpx tsx setup\u002Findex.ts --step register \\\n  --jid \"\u003Cjid>\" \\\n  --name \"\u003Cchat-name>\" \\\n  --trigger \"@\u003Ctrigger>\" \\\n  --folder \"whatsapp_main\" \\\n  --channel whatsapp \\\n  --assistant-name \"\u003Cname>\" \\\n  --is-main \\\n  --no-trigger-required  # Only for main\u002Fself-chat\n```\n\nFor additional groups (trigger-required):\n\n```bash\nnpx tsx setup\u002Findex.ts --step register \\\n  --jid \"\u003Cgroup-jid>\" \\\n  --name \"\u003Cgroup-name>\" \\\n  --trigger \"@\u003Ctrigger>\" \\\n  --folder \"whatsapp_\u003Cgroup-name>\" \\\n  --channel whatsapp\n```\n\n## Phase 5: Verify\n\n### Build and restart\n\n```bash\nnpm run build\n```\n\nRestart the service:\n\n```bash\n# macOS (launchd)\nlaunchctl kickstart -k gui\u002F$(id -u)\u002Fcom.nanoclaw\n\n# Linux (systemd)\nsystemctl --user restart nanoclaw\n\n# Linux (nohup fallback)\nbash start-nanoclaw.sh\n```\n\n### Test the connection\n\nTell the user:\n\n> Send a message to your registered WhatsApp chat:\n> - For self-chat \u002F main: Any message works\n> - For groups: Use the trigger word (e.g., \"@Andy hello\")\n>\n> The assistant should respond within a few seconds.\n\n### Check logs if needed\n\n```bash\ntail -f logs\u002Fnanoclaw.log\n```\n\n## Troubleshooting\n\n### QR code expired\n\nQR codes expire after ~60 seconds. Re-run the auth command:\n\n```bash\nrm -rf store\u002Fauth\u002F && npx tsx src\u002Fwhatsapp-auth.ts\n```\n\n### Pairing code not working\n\nCodes expire in ~60 seconds. To retry:\n\n```bash\nrm -rf store\u002Fauth\u002F && npx tsx src\u002Fwhatsapp-auth.ts --pairing-code --phone \u003Cphone>\n```\n\nEnter the code **immediately** when it appears. Also ensure:\n1. Phone number includes country code without `+` (e.g., `1234567890`)\n2. Phone has internet access\n3. WhatsApp is updated to the latest version\n\nIf pairing code keeps failing, switch to QR-browser auth instead:\n\n```bash\nrm -rf store\u002Fauth\u002F && npx tsx setup\u002Findex.ts --step whatsapp-auth -- --method qr-browser\n```\n\n### \"conflict\" disconnection\n\nThis happens when two instances connect with the same credentials. Ensure only one NanoClaw process is running:\n\n```bash\npkill -f \"node dist\u002Findex.js\"\n# Then restart\n```\n\n### Bot not responding\n\nCheck:\n1. Auth credentials exist: `ls store\u002Fauth\u002Fcreds.json`\n3. Chat is registered: `sqlite3 store\u002Fmessages.db \"SELECT * FROM registered_groups WHERE jid LIKE '%whatsapp%' OR jid LIKE '%@g.us' OR jid LIKE '%@s.whatsapp.net'\"`\n4. Service is running: `launchctl list | grep nanoclaw` (macOS) or `systemctl --user status nanoclaw` (Linux)\n5. Logs: `tail -50 logs\u002Fnanoclaw.log`\n\n### Group names not showing\n\nRun group metadata sync:\n\n```bash\nnpx tsx setup\u002Findex.ts --step groups\n```\n\nThis fetches all group names from WhatsApp. Runs automatically every 24 hours.\n\n## After Setup\n\nIf running `npm run dev` while the service is active:\n\n```bash\n# macOS:\nlaunchctl unload ~\u002FLibrary\u002FLaunchAgents\u002Fcom.nanoclaw.plist\nnpm run dev\n# When done testing:\nlaunchctl load ~\u002FLibrary\u002FLaunchAgents\u002Fcom.nanoclaw.plist\n\n# Linux:\n# systemctl --user stop nanoclaw\n# npm run dev\n# systemctl --user start nanoclaw\n```\n\n## Removal\n\nTo remove WhatsApp integration:\n\n1. Delete auth credentials: `rm -rf store\u002Fauth\u002F`\n2. Remove WhatsApp registrations: `sqlite3 store\u002Fmessages.db \"DELETE FROM registered_groups WHERE jid LIKE '%@g.us' OR jid LIKE '%@s.whatsapp.net'\"`\n3. Sync env: `mkdir -p data\u002Fenv && cp .env data\u002Fenv\u002Fenv`\n4. Rebuild and restart: `npm run build && launchctl kickstart -k gui\u002F$(id -u)\u002Fcom.nanoclaw` (macOS) or `npm run build && systemctl --user restart nanoclaw` (Linux)\n",{"name":5,"description":7},"main","b6b2f4d4a0c7243409d1684119a6772629bfeba6",".claude\u002Fskills\u002Fadd-whatsapp","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex","https:\u002F\u002Fgithub.com\u002Fmbaker95","2026-03-12 23:02:12",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add mbaker95\u002Fnanodex --skill add-whatsapp",{"tool":43,"command":44},"bunx","bunx skills add mbaker95\u002Fnanodex --skill add-whatsapp",{"tool":46,"command":47},"pnpm","pnpm dlx skills add mbaker95\u002Fnanodex --skill add-whatsapp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-whatsapp\u002FSKILL.md",true,[51],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"resources\u002Fimplementation-playbook.md","REFERENCE","参考文档",21937,"https:\u002F\u002Fgithub.com\u002Fagency-black\u002FSkills\u002Fblob\u002Fmain\u002Fattack-tree-construction\u002Fresources\u002Fimplementation-playbook.md",[58,89,108,130,142,154],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":69,"publishedAt":26},"01M6DG2XYNH5XV7XGTJJ1SF0TG","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.","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002Fcontainer\u002Fskills\u002Fagent-browser\u002FSKILL.md",[64],{"categoryNo":65,"categoryName":66,"taxonomyType":67,"taxonomyTypeDesc":68},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88],"agent browser","browser","pages","forms","task","test web","take","use","extract","data","user","read","screenshots","research","test","web","just","Bash","browse",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":98,"publishedAt":26},"01M6DG2TPZAT3SMWSYFJ3K82TE","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\".","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fx-integration\u002FSKILL.md",[95],{"categoryNo":96,"categoryName":97,"taxonomyType":67,"taxonomyTypeDesc":68},"01JBSEEDCAT000000000000008","测试与质量",[99,100,77,101,102,103,104,105,106,107],"x integration","integration","testing","setup","troubleshooting","twitter","reply","quote","triggers",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":26},"01M6DG2Q4BJQ046BZSR9N7GZ72","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.","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fuse-local-whisper\u002FSKILL.md",[],[115,116,77,117,118,119,120,121,80,122,123,124,125,126,127,128,129,18],"whisper","local whisper","local","use local whisper","apple","openai whisper","only","voice","apple silicon","api","first","openai","cpp","transcription","openai whisper api",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":26},"01M6DG2N2Z1V8VV4MQFRKFAQV0","update-skills","Check for and apply updates to installed skill branches from upstream.","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fupdate-skills\u002FSKILL.md",[],[137,138,139,140,141],"update","update skills","upstream","branches","check",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":26},"01M6DG2J5D7Y3R2BF8V87XZAXF","update-nanoclaw","Efficiently bring upstream NanoClaw updates into a customized install, with preview, selective cherry-pick, and low token usage.","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fupdate-nanoclaw\u002FSKILL.md",[],[137,149,150,151,139,152,153],"update nanoclaw","install","pick","token","preview",{"skillNo":155,"name":102,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":26},"01M6DG2FN7S7DVD337CNT5Y67D","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.","https:\u002F\u002Fgithub.com\u002Fmbaker95\u002Fnanodex\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsetup\u002FSKILL.md",[],[102,150,107,160,161,31,77,24,80,162,125,163,164,165,20],"time","dependencies","configure","services","start","messaging"]