whatsapp-watcher
Skill1 starsChanged 52 days agoMITView on GitHub
Monitor WhatsApp Web for urgent messages using Playwright automation. Detects messages with keywords like "urgent", "asap", "invoice", "payment", or "help" and creates action files. Use when you need to monitor WhatsApp for time-sensitive communications or integrate WhatsApp into automated workflows. Requires manual QR code setup.
- Reads credentials
- Deletes or force-pushes
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- muhammad-anas35/AI-Employee-Gold-tierword for word, first seen Sep 25, 2026
- CodeWithSuleman/Personal-AI-Employee-FTE-their own version, first seen Apr 23, 2026
Other versions2 projects use a version of this.
Word for word · 1
- muhammad-anas35/AI-Employee-Gold-tier★ 1100% same
Edited · 0
None found.
Wrote their own version · 1
- CodeWithSuleman/Personal-AI-Employee-FTE-★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- odoo-integrationSkill
- browsing-with-playwrightSkill
- send-emailSkill
- gmail-watcherSkill
- process-vault-tasksSkill
- facebook-posterSkill
- linkedin-posterSkill
- update-dashboardSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 156
No need to scan QR code every time
- Distinctive: line 161
Only processes unread messages
- Distinctive: line 176
Never sync session to cloud
- Distinctive: line 184
Read-only access to chats
- Distinctive: line 191
Consider official WhatsApp Business API for commercial use
- Distinctive: line 234
Verify messages are unread
- Distinctive: line 235
Check WhatsApp Web is logged in
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WhatsApp Watcher
Monitor WhatsApp Web for urgent messages containing specific keywords, automatically creating action files in the vault for immediate processing.
Overview
This skill uses Playwright to automate WhatsApp Web, monitoring for urgent messages that contain keywords like "urgent", "asap", "invoice", "payment", or "help". When detected, it creates action files for Claude to process.
Usage
# Start the WhatsApp watcher
python scripts/whatsapp_watcher.py
# Test mode (dry run)
python scripts/whatsapp_watcher.py --test
# Custom check interval (seconds)
python scripts/whatsapp_watcher.py --interval 30What It Does
- Monitors WhatsApp Web using Playwright automation
- Scans unread chats for urgent keywords
- Creates action files in
/Needs_Action/WHATSAPP_*.md - Preserves session for continuous monitoring
- Logs all activity to
/Logs/whatsapp_watcher.log
Prerequisites
Install Playwright
# Install Playwright
pip install playwright
# Install browser binaries
playwright install chromiumFirst Run Setup
# First run will open WhatsApp Web for QR code scan
python scripts/whatsapp_watcher.py --setup
# Scan QR code with your phone
# Session will be saved for future runsConfiguration
Environment Variables
# .env file
WHATSAPP_SESSION_PATH=./whatsapp_session
VAULT_PATH=./AI_Employee_Vault
CHECK_INTERVAL=30 # seconds
HEADLESS=true # Run browser in backgroundKeyword Configuration
Default urgent keywords:
urgentasapinvoicepaymenthelpemergencycritical
Customize in whatsapp_watcher.py:
self.keywords = ['urgent', 'asap', 'invoice', 'payment', 'help', 'custom_keyword']Action File Format
Created files follow this structure:
---
type: whatsapp
from: Contact Name
phone: +1234567890
received: 2026-03-12T20:26:00Z
priority: high
status: pending
keywords_matched: urgent, payment
---
# WhatsApp Message Received
## Message Content
[Message text content]
## Suggested Actions
- [ ] Reply to sender
- [ ] Process request
- [ ] Create invoice/payment
- [ ] Archive after handling
## Contact Details
- **From:** Contact Name
- **Phone:** +1234567890
- **Time:** 2026-03-12 20:26:00
- **Keywords:** urgent, payment
- **Priority:** high
## Notes
Add processing notes here.Integration with Workflow
WhatsApp Message → WhatsApp Watcher → /Needs_Action/WHATSAPP_*.md
↓
Claude processes with /process-vault-tasks
↓
Creates plan or draft reply
↓
Requests approval if needed
↓
Human sends reply manually
↓
Marks as done, logs actionFeatures
Keyword Detection
- Scans message text for urgent keywords
- Case-insensitive matching
- Multiple keyword support
- Configurable keyword list
Session Persistence
- Saves WhatsApp Web session
- No need to scan QR code every time
- Persistent across restarts
- Secure local storage
Smart Filtering
- Only processes unread messages
- Ignores group messages (optional)
- Focuses on urgent communications
- Prevents duplicate processing
Error Handling
- Graceful handling of connection issues
- Auto-reconnect on session loss
- Continues monitoring after errors
- Detailed error logging
Security & Privacy
Session Management
- Session stored locally in
whatsapp_session/ - Never sync session to cloud
- Add to
.gitignore - Encrypted by Playwright
Privacy
- Messages stay local
- No external logging
- Full audit trail locally
- Read-only access to chats
WhatsApp Terms of Service
⚠️ Important: WhatsApp's Terms of Service prohibit automated access to WhatsApp Web. Use this tool:
- For personal use only
- At your own risk
- With awareness of potential account restrictions
- Consider official WhatsApp Business API for commercial use
Monitoring
Check Status
# View recent activity
tail -f AI_Employee_Vault/Logs/whatsapp_watcher.log
# Check created action files
ls -lt AI_Employee_Vault/Needs_Action/WHATSAPP_*.md
# View browser session
ls -la whatsapp_session/Health Checks
The watcher logs heartbeat messages:
2026-03-12 20:26:00 - WhatsAppWatcher - INFO - Checking for urgent messages...
2026-03-12 20:26:02 - WhatsAppWatcher - INFO - Found 1 urgent message(s)
2026-03-12 20:26:02 - WhatsAppWatcher - INFO - Created WHATSAPP_client_urgent_1710275162.mdTroubleshooting
"Session expired" error
# Delete session and re-authenticate
rm -rf whatsapp_session/
python scripts/whatsapp_watcher.py --setup"Browser not found" error
# Reinstall Playwright browsers
playwright install chromiumNo messages detected
- Check keyword configuration
- Verify messages are unread
- Check WhatsApp Web is logged in
- Review logs for errors
High CPU usage
- Increase check interval
- Use headless mode
- Close unnecessary browser tabs
Advanced Usage
Custom Message Processing
Extend the watcher for custom logic:
def should_process_message(self, message_text, contact_name):
"""Custom filtering logic"""
# Only process from specific contacts
if contact_name not in ['Important Client', 'Boss']:
return False
# Check for specific patterns
if 'invoice' in message_text.lower():
return True
return FalseGroup Message Handling
# Enable group message monitoring
self.monitor_groups = True
# Filter specific groups
self.allowed_groups = ['Work Team', 'Client Group']Integration with Reply System
# Chain with processing and reply
python scripts/whatsapp_watcher.py &
sleep 5
claude /process-vault-tasks
# Human reviews and sends reply manuallyPerformance
- Memory: ~200MB (Chromium browser)
- CPU: Low (only during checks)
- Network: Minimal (WhatsApp Web connection)
- Disk: ~100MB (browser session)
Limitations
- Requires active internet connection
- WhatsApp Web must stay logged in
- Cannot send messages (read-only)
- Manual reply required
- Subject to WhatsApp's rate limits
Dependencies
playwright==1.41.0Alternative: WhatsApp Business API
For production use, consider:
- WhatsApp Business API
- Official API with send capabilities
- No automation restrictions
- Requires business verification
- Paid service
See Also
/process-vault-tasks- Process created action filesCompany_Handbook.md- WhatsApp handling rulesorchestrator.py- Automated schedulinggmail_watcher.py- Similar pattern for email
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

