SKILL·27BC33

whatsapp

sanjay3290
Updated 5 days ago
347
37
347
View on GitHub
Developmentaiapi

About

This skill enables sending and receiving WhatsApp messages via the unofficial pywhats Python client, which acts as a linked companion device similar to WhatsApp Web. It supports pairing via QR code, sending text/images, group chats, and provides a JSON event stream for real-time updates. Use this when you need to automate WhatsApp interactions from Python scripts, not for official WhatsApp Business API integrations.

Quick Install

Claude Code

Recommended
Primary
npx skills add sanjay3290/ai-skills -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/sanjay3290/ai-skills
Git CloneAlternative
git clone https://github.com/sanjay3290/ai-skills.git ~/.claude/skills/whatsapp

Copy and paste this command in Claude Code to install this skill

Documentation

WhatsApp (pywhats)

Drive a WhatsApp account as a linked companion device (like WhatsApp Web) from async Python via 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[email protected]; groups use [email protected].
  • 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 [email protected]            # group metadata JSON
scripts/wa.py group-send [email protected] "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
CommandBehavior
pairFresh 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
listenLong-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 — every Client method, every event payload, JID construction, and the download_media note.

GitHub Repository

sanjay3290/ai-skills
Path: skills/whatsapp
0
agent-skillsai-skillsatlassianazure-devopsclaude-codeclaude-skills
FAQ

Frequently asked questions

What is the whatsapp skill?

whatsapp is a Claude Skill by sanjay3290. Skills package instructions and resources that Claude loads on demand, so Claude can perform whatsapp-related tasks without extra prompting.

How do I install whatsapp?

Use the install commands on this page: add whatsapp to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does whatsapp belong to?

whatsapp is in the Development category, tagged ai and api.

Is whatsapp free to use?

Yes. whatsapp is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.

Related Skills

qmd
Development

qmd is a local search and indexing CLI tool that enables developers to index and search through local files using hybrid search combining BM25, vector embeddings, and reranking. It supports both command-line usage and MCP (Model Context Protocol) mode for integration with Claude. The tool uses Ollama for embeddings and stores indexes locally, making it ideal for searching documentation or codebases directly from the terminal.

View skill
subagent-driven-development
Development

This skill executes implementation plans by dispatching a fresh subagent for each independent task, with code review between tasks. It enables fast iteration while maintaining quality gates through this review process. Use it when working on mostly independent tasks within the same session to ensure continuous progress with built-in quality checks.

View skill
mcporter
Development

The mcporter skill enables developers to manage and call Model Context Protocol (MCP) servers directly from Claude. It provides commands to list available servers, call their tools with arguments, and handle authentication and daemon lifecycle. Use this skill for integrating and testing MCP server functionality in your development workflow.

View skill
adk-deployment-specialist
Development

This skill deploys and orchestrates Vertex AI ADK agents using A2A protocol, managing AgentCard discovery, task submission, and supporting tools like Code Execution Sandbox and Memory Bank. It enables building multi-agent systems with sequential, parallel, or loop orchestration patterns in Python, Java, or Go. Use it when asked to deploy ADK agents or orchestrate agent workflows on Google Cloud.

View skill