WhatsApp automation (Green API primary, WAHA fallback). Use for: send/receive messages, send voice/images/files, retrieve incoming messages (text, voice…
от aviz85★ 52 звезды на GitHubОб этом скилле
WhatsApp Automation
Send messages via unified script with Green API (primary) + WAHA (fallback if configured).
Quick Start - Unified Script
cd ~/.claude/skills/whatsapp/scripts
# Text message
npx ts-node send-message.ts "Hello!" --to 972501234567
# Multiline text from shell: use $'...'
npx ts-node send-message.ts $'Line 1\n\nLine 2\n- Bullet A\n- Bullet B' --to 972501234567
# Image with caption
npx ts-node send-message.ts --to 972501234567 --image /path/to/image.jpg --caption "Check this out!"
# Video with caption
npx ts-node send-message.ts --to 972501234567 --video /path/to/video.mp4 --caption "Watch this!"
# Any media file (auto-detect)
npx ts-node send-message.ts --to 972501234567 --media /path/to/any-file --caption "Here!"
# Voice message
npx ts-node send-message.ts --to 972501234567 --voice /path/to/audio.ogg
# File/document
npx ts-node send-message.ts --to 972501234567 --file /path/to/doc.pdf --caption "Here's the doc"
# Send to group
npx ts-node send-message.ts "Group message" --group [email protected]
# Reply to a specific message (quoted reply)
npx ts-node send-message.ts "Reply!" --group [email protected] --quote BAE5367237E13A1B
# Voice as quoted reply
npx ts-node send-message.ts --group [email protected] --voice /tmp/voice.mp3 --quote BAE5367237E13A1B
# Dry run (preview)
npx ts-node send-message.ts "Test" --to 972501234567 --dry-run
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:
# Re-encode ONLY the audio to AAC, leave the video untouched; +faststart for streaming
ffmpeg -y -i in.mp4 -c:v copy -c:a aac -b:a 192k -movflags +faststart out.mp4
# Verify it isn't silent before sending
ffmpeg -i out.mp4 -af volumedetect -f null /dev/null 2>&1 | grep mean_volume
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: [email protected]) |
--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:
npx ts-node send-message.ts $'Hi\n\nLine 2\n- Item 1\n- Item 2' --group [email protected]
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).
# CORRECT — apostrophe inside $'...'
$'I\'ve added a check.\n\nNext line.'
# WRONG — breaks ANSI-C quoting, \n becomes literal after the apostrophe
$'I'\''ve added a check.\n\nNext line.'
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.
- First item
- Second item
- Third item
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:
- פריט ראשון
1. פריט שני
* פריט שלישי
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 h
Установить whatsapp в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл whatsapp?
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.
Как установить скилл whatsapp?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл whatsapp запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic