Skip to content
Agent Orchestration
Skill

/whatsapp

Send and receive WhatsApp messages via the unofficial linked-device client pywhats (pip install pywhats) — pair with QR, send text/images, group chat, read receipts, presence/typing, and a long-running JSON event stream. Use when the user wants to script WhatsApp as a linked

From plugin
ai-skills
45725 skills

Claude Code

$ npx -y skills add sanjay3290/ai-skills --skill whatsapp --agent claude-code

SKILL.md

whatsapp.SKILL.md
name: whatsapp
description: "Send and receive WhatsApp messages via the unofficial linked-device client pywhats (pip install pywhats) — pair with QR, send text/images, group chat, read receipts, presence/typing, and a long-running JSON event stream. Use when the user wants to script WhatsApp as a linked companion device (like WhatsApp Web), pair a device, send a WhatsApp from Python, or listen for inbound messages. Triggers: 'whatsapp', 'send whatsapp', 'pair whatsapp', 'pywhats', 'linked device', 'whatsapp web client'. NOT the official WhatsApp Business/Cloud API."

WhatsApp (pywhats)

Drive a WhatsApp account as a **linked companion device** (like WhatsApp Web) from async Python via [`pywhats`](https://pypi.org/project/pywhats/) (pre-alpha, text/image only). This is an **unofficial** multi-device client — **not** the official WhatsApp Business / Cloud API.

CLI entrypoint: `scripts/wa.py` (auto-bootstraps a managed venv on first run).

Mental model

  • **Pairing = one-time QR scan.** `wa.py pair` shows an ASCII QR; scan it in

WhatsApp → Linked Devices. Credentials persist to `$PYWHATS_HOME/<session>.session` (+ `.signal.db`).

  • **Resuming = silent.** Later commands reconnect with the same session — no QR.
  • **JIDs address chats.** Bare phone `15550001234` → `15550001234@s.whatsapp.net`;

groups use `...@g.us`.

  • **Events are how you receive.** `wa.py listen` prints one JSON object per event.

⚠️ Never bare-await Client calls inside a handler

Event handlers run **inline on the receive loop**. Awaiting `send_*`, `mark_read`, `get_group_info`, `download_media`, etc. inside a handler **deadlocks** the connection. Always `asyncio.create_task(...)`. The `listen` subcommand already does this for `--read`.

Commands

scripts/wa.py pair                                          # one-time QR pair
scripts/wa.py send-text 15550001234 "hello"                 # 1:1 text
scripts/wa.py send-image 15550001234 photo.jpg --caption hi # 1:1 image
scripts/wa.py group-info 120363000000000000@g.us            # group metadata JSON
scripts/wa.py group-send 120363000000000000@g.us "hi all"   # group text
scripts/wa.py mark-read 15550001234 MSGID [--sender JID]    # blue ticks
scripts/wa.py presence available                            # global presence
scripts/wa.py typing 15550001234 composing [--media audio]  # typing indicator
scripts/wa.py listen --read --events message,receipt        # JSONL event stream
scripts/wa.py --session work send-text 15550001234 "hi"     # named session

| Command | Behavior | |---------|----------| | `pair` | Fresh link via ASCII QR; idempotent if already paired | | `send-text <to> <text>` | Send 1:1 text; print message id | | `send-image <to> <path> [--caption C]` | Send image (jpg/png/webp, ≤16MB); print id | | `group-info <gid>` | Print group JSON (subject, owner, participants, …) | | `group-send <gid> <text>` | Resolve members then send group text; print id | | `mark-read <chat> <ids...>` | Blue-tick; `--sender` for groups | | `presence <available\|unavailable>` | Global presence | | `typing <to> <composing\|paused>` | Chat presence; optional `--media audio` | | `listen` | Long-running JSON lines; `--read`, `--events`, `--subscribe JID` (required for presence events) |

Global: `--session NAME` (default `default`, or env `PYWHATS_SESSION`) — goes **before** the subcommand: `wa.py --session work pair`.

Sessions / multi-account

$PYWHATS_HOME/                 # default: ~/.pywhats
  venv/                        # managed Python + pywhats
  default.session              # --session default
  default.session.signal.db
  work.session                 # --session work

Override home with `PYWHATS_HOME`. Unpaired / logged-out sessions print a clear message to re-run `wa.py --session <name> pair`.

If `pair` reports the device was logged out right after scanning, that is WhatsApp device-churn reaping, not a failure of the skill — the dead session is deleted automatically; follow the recovery steps it prints (remove linked devices, wait 15–20 min, pair once).

Full reference

[references/api.md](references/api.md) — every `Client` method, every event payload, JID construction, and the `download_media` note.

Read more
@sanjay3290
Ships withai-skills

A collection of portable skills for AI coding assistants. Works with all major AI clients that support the Agent Skills Standard.

Stars on GitHub

Momentum

stars in total
457
Star history of sanjay3290/ai-skills on GitHub, a chart by star-history.com

Other skills on ai-skills.

apple-container

apple-container

Apple's open-source `container` CLI to build, run, and manage OCI/Linux containers as lightweight per-container VMs on…

atlassian

atlassian

Manage Jira issues and Confluence wiki pages in Atlassian Cloud. Use when: (1) searching/creating/updating Jira issues with JQL,…

azure-devops

azure-devops

Manage Azure DevOps projects, work items, repos, PRs, pipelines, wikis, test plans, security alerts, variable groups,…

deep-research

deep-research

Execute autonomous multi-step research using Google Gemini Deep Research Agent. Use for: market analysis, competitive…

elevenlabs

elevenlabs

Convert documents and text to audio using ElevenLabs text-to-speech. Use this skill when the user wants to create a podcast,…

gemini-api

gemini-api

Call the Gemini API from the shell with Google's `gemini-api` CLI, when that binary is installed — text and reasoning, image…

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw7d395k
@steipete@steipeteInstall Skill
jira-tickets

jira-tickets

Read and update Jira tickets through Orca's saved Jira connections. Use when a task comes from Jira or the user asks for Jira…

orca5d128k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip6d114k
@paperclipai@paperclipaiInstall Skill
adr-create

adr-create

Create a new Architecture Decision Record with sequential numbering and AgentDB registration

@ruvnet@ruvnetInstall Skill

Questions about whatsapp.

Which coding agents can use whatsapp?
whatsapp installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.