whatsapplisted
Install: claude install-skill project-nomos/nomos
# WhatsApp
Send and receive WhatsApp messages using the Baileys library, which implements the WhatsApp Web multi-device protocol.
## Authentication
The WhatsApp integration uses QR code authentication:
1. Run `npx tsx src/integrations/whatsapp.ts`
2. Scan the QR code with WhatsApp on your phone (Linked Devices)
3. Auth credentials are saved to `~/.nomos/whatsapp-auth/` for reconnection
## Running the Bot
Start the WhatsApp bot:
```bash
npx tsx src/integrations/whatsapp.ts
```
The bot will:
- Display a QR code on first run (scan with your phone)
- Automatically reconnect using saved credentials
- Listen for incoming messages in individual chats and groups
- Respond to mentions in groups or messages starting with `/`, `!`, or `@`
- Track conversation context for multi-turn dialogue
## Message Patterns
### Individual Chats
The bot responds to all messages in individual (1-on-1) chats.
### Group Chats
The bot only responds when:
1. **Mentioned by name** — Someone sends a message mentioning the bot's phone number
2. **Trigger prefix** — Message starts with `/`, `!`, or `@`
Example group messages that trigger a response:
```
@15551234567 what's the weather?
/help
!status
@bot hello there
```
## Restricting Access
To limit the bot to specific chats, set the `WHATSAPP_ALLOWED_CHATS` environment variable with comma-separated JIDs (WhatsApp IDs):
```bash
# .env
WHATSAPP_ALLOWED_CHATS=15551234567@s.whatsapp.net,120363123456789012@g.us
```
JID formats:
- Individual