| name | rag-learning |
| description | Add WhatsApp as a communication channel for NanoBob. Use when this capability is needed. |
| metadata | {"author":"BeamusWayne"} |
/add-whatsapp - WhatsApp Channel Skill
Purpose
Add WhatsApp as a communication channel for NanoBob.
Prerequisites
- WhatsApp phone number for the bot
- Ability to scan QR code for authentication
What This Skill Does
- Creates
src/channels/whatsapp.ts with WhatsApp channel implementation
- Adds import to
src/channels/index.ts
- Sets up authentication flow using Baileys library
- Creates authentication storage in
store/auth/
Usage
Inside the claude CLI, run:
/add-whatsapp
Then follow prompts to:
- Enter the WhatsApp number for the bot
- Scan the QR code displayed
- Wait for authentication to complete
- Register WhatsApp groups
Implementation Details
Channel File: src/channels/whatsapp.ts
import { registerChannel, ChannelOpts } from './registry.js';
import makeWASocket from '@whiskeysockets/baileys';
export class WhatsAppChannel implements Channel {
}
registerChannel('whatsapp', (opts: ChannelOpts) => {
return new WhatsAppChannel(opts);
});
Dependencies
Add to package.json:
"@whiskeysockets/baileys": "^6.7.0"
Authentication
Credentials stored in store/auth/whatsapp.json
Post-Installation
- Run
npm install to install new dependencies
- Run
npm run build to compile TypeScript
- Run authentication flow
- Restart NanoBob
- Use
@Bob in your WhatsApp chats
Source: BeamusWayne/RAG-learning — distributed by TomeVault.