aviz85/claude-skills-library/whatsapp
Claude Code and agent skill by aviz85/claude-skills-library
- community
Checking that the SKILL.md file is still in the repository.
WhatsApp automation (Green API primary, WAHA fallback). Use for: send/receive messages, send voice/images/files, retrieve incoming messages (text, voice, images), transcribe voice messages. WAME = 'WhatsApp ME' = send me by WhatsApp.
Install
npx vskill@latest install aviz85/claude-skills-library/whatsappSKILL.md
WhatsApp Automation
Send messages via unified script with Green API (primary) + WAHA (fallback if configured).
Quick Start - Unified Script
Default Numbers
| Alias | Number | Use Case | |
|---|---|---|---|
| myself / me / test | $MY_PHONE (from config.sh) | Default recipient |
Sending Video & Audio — encode to AAC
WhatsApp (and Facebook) play a video silently if its audio track is MP3 muxed into an MP4 — the file is valid and has sound in desktop players, but the mobile app drops it. Always ship video with AAC audio:
Voice notes: convert the source to OGG/Opus first — raw MP3 in a container is unreliable in the app.
Script Options
| Option | Description | |
|---|---|---|
"message" | Text message (first positional argument) | |
--to, --phone <NUMBER> | Phone number (Israeli format accepted) | |
--group <ID> | Group ID (format: 120363xxx@g.us) | |
--image <PATH> | Attach image file | |
--video <PATH> | Attach video file (MP4, etc.) | |
--media <PATH> | Attach any media file (auto-detect) | |
--voice <PATH> | Send voice message (OGG/MP3) | |
--file <PATH> | Attach document/file | |
--caption <TEXT> | Caption for media files | |
--quote <MSG_ID> | Reply to a specific message (quotedMessageId) | |
--dry-run | Preview without sending |
Multiline Formatting
When sending a WhatsApp message with line breaks from the shell, do not pass literal \n inside a normal quoted string if you want actual newlines in the final message.
Use shell ANSI-C quoting instead:
Why:
"text with \n"sends the characters\+n— but the script auto-converts these to real newlines$'text with \n'sends real line breaks natively
Either form works — the script normalizes literal \n to real newlines before sending.
Apostrophes inside `$'...'`: Use \' directly — do NOT use the '\'' trick. The '\'' pattern breaks out of ANSI-C quoting, and everything after it becomes regular single-quoted (where \n is literal).
For structured WhatsApp messages, prefer:
- short opening line
- blank line
- short bullet list
- blank line
- closing line
Formatting Rule — Match Language
English messages: Use regular bullets/dashes. Never use Hebrew letters (א. ב. ג.) in English text.
Hebrew messages: Every line must start with a Hebrew character for correct RTL rendering. Use Hebrew letters for list items.
Don't mix: No Hebrew letters in English messages, no dashes/numbers in Hebrew messages.
Don't:
Lines starting with non-Hebrew characters (dashes, numbers, asterisks, English) break RTL alignment in WhatsApp. Always ensure the first visible character is Hebrew.
Provider Logic
| Content Type | Primary | Fallback | |
|---|---|---|---|
| Text | Green API | WAHA (if configured) | |
| Image | Green API | - | |
| Video | Green API | - | |
| Voice | Green API | - | |
| File | Green API | - |
Note: WAHA is not currently installed. Green API handles all message types.
Configuration
Credentials in scripts/.env:
Phone Number Format
| Input | Normalized | |
|---|---|---|
972501234567 | 972501234567@c.us | |
0501234567 | 972501234567@c.us | |
501234567 | 972501234567@c.us |
Direct API (WAHA)
For text messages only:
Check Session Status
Finding Contact by Name
When user says "send WhatsApp to [name]" without phone number:
- Use
get-contactskill to search CRM - If not found → ask user for phone
- If multiple → ask user to choose
- If one → confirm before sending
Always confirm contact before sending.
Finding a Group by Name or Project
When user says "send to [project] group" — search Green API directly (WAHA may be down):
Then send using send-message.ts --group <ID>.
Never check WAHA session before sending — the script handles fallback automatically.
Provider Notes
Green API is the primary provider. WAHA is not installed and only used as fallback if explicitly configured. Just run send-message.ts — it uses Green API directly.
Retrieving Messages (get-messages.ts)
Fetch incoming messages, voice recordings, and media from any contact:
What you get:
- Text messages with full content
- Voice messages with download URL (OGA/OGG format) — can be transcribed separately
- Images with download URL and metadata
- Timestamps, sender info, file names
- All message types (extended text, reactions, media)
Quoted/reply messages are shown inline — get-messages.ts now displays quoted context automatically with ↳ Reply to prefix. Both extendedTextMessage and quotedMessage types are handled.
Message types: textMessage, extendedTextMessage (with .text), quotedMessage (reply with .quotedMessage.textMessage), reactionMessage, imageMessage
Voice Message Workflow:
- Get messages with
get-messages.ts --json - Extract
downloadUrlfromaudioMessagetype - Download the OGA file
- Convert to WAV:
ffmpeg -i file.oga -ar 16000 file.wav - Transcribe:
/transcribe --language he /path/to/file.wav
Waiting for Replies — Monitor Integration
Sometimes after sending a message you need the contact's reply before you can continue — an approval, a decision, feedback, a "how much do I owe you". Instead of stopping and asking the user to watch the chat, hand the waiting to the Monitor tool and keep working; each new reply arrives as a notification.
Use scripts/watch-replies.sh — it polls for genuinely new incoming messages (dedupes by id, handles text / reactions / media) and prints one line per reply, which is exactly what Monitor consumes. Exits only when killed (Monitor timeout / TaskStop).
Launch it through the Monitor tool (not Bash), so replies notify you while you keep working:
command:~/.claude/skills/whatsapp/scripts/watch-replies.sh --chat 972501234567 --since "$(date +%s)" --label CLIENTtimeout_ms: how long to wait (e.g.3600000for an hour).- Always set `--since` to the moment you sent (
$(date +%s)), or old history re-fires as if new.
⚠️ Do NOT hand-roll an inline poller in the Monitor `command`. Passing a group id or JSON body directly in the shell breaks under zsh —@g.ustriggersbad math expression: illegal character: @, and the monitor exits 1.watch-replies.shtakes the chat as an argument (--chat <id>), so group ids are safe. Always reach for this script; never inline the group id + curl/python in the Monitor command.
Decide per situation whether to use it
Reach for it when the reply changes what you do next:
- you sent something that needs approval before the next step (a draft, a preview, a quote);
- you asked a question and will act on the answer;
- you're in an iterative loop (send fix → they review → send next);
- you started long work and want to hear back without blocking.
Skip it for fire-and-forget (a confirmation, an FYI, a "done") — no reply is expected, so there's nothing to watch.
Staying in the conversation
Often the right move is to remain engaged: when a reply lands, respond, then re-arm a fresh watcher (new --since) for the next turn. That's a real back-and-forth — send sample → they approve → send fix → wait again — until the thread naturally closes (final approval, thanks, payment settled, or the user says wrap up). Each round: send → watch → reply → re-watch. Use your judgement on when the exchange is genuinely done and it's time to stop watching.
Discipline
- Each watcher has its own dedupe file, so two watchers on the same chat double-fire —
TaskStopthe old one before arming a new one. - Reactions surface as
(reaction 👍)and media as[imageMessage]; when you need the image URL / caption / voice file, pull the full record withget-messages.ts --json.
When to Use
- Send notifications or alerts
- Share images/posters
- Voice messages
- Document sharing
- Automated reminders
- Workshop follow-ups
- Retrieve and transcribe voice messages from customers
- Check media attachments from contacts
Security
- Security scanPassed, 85 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/whatsapp/skill.md
Popularity
- Repository stars
- 44
- Repository forks
- 13
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aviz85/claude-skills-library/whatsapp)