home / skills / openclaw / skills / whats

This skill helps you send WhatsApp messages to others or search and sync history using wacli with explicit recipient and message verification.

npx playbooks add skill openclaw/skills --skill whats

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.0 KB
---
name: wacli
description: Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
homepage: https://wacli.sh
metadata: {"clawdbot":{"emoji":"📱","requires":{"bins":["wacli"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/wacli","bins":["wacli"],"label":"Install wacli (brew)"},{"id":"go","kind":"go","module":"github.com/steipete/wacli/cmd/wacli@latest","bins":["wacli"],"label":"Install wacli (go)"}]}}
---

# wacli

Use `wacli` only when the user explicitly asks you to message someone else on WhatsApp or when they ask to sync/search WhatsApp history.
Do NOT use `wacli` for normal user chats; Clawdbot routes WhatsApp conversations automatically.
If the user is chatting with you on WhatsApp, you should not reach for this tool unless they ask you to contact a third party.

Safety
- Require explicit recipient + message text.
- Confirm recipient + message before sending.
- If anything is ambiguous, ask a clarifying question.

Auth + sync
- `wacli auth` (QR login + initial sync)
- `wacli sync --follow` (continuous sync)
- `wacli doctor`

Find chats + messages
- `wacli chats list --limit 20 --query "name or number"`
- `wacli messages search "query" --limit 20 --chat <jid>`
- `wacli messages search "invoice" --after 2025-01-01 --before 2025-12-31`

History backfill
- `wacli history backfill --chat <jid> --requests 2 --count 50`

Send
- Text: `wacli send text --to "+14155551212" --message "Hello! Are you free at 3pm?"`
- Group: `wacli send text --to "[email protected]" --message "Running 5 min late."`
- File: `wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"`

Notes
- Store dir: `~/.wacli` (override with `--store`).
- Use `--json` for machine-readable output when parsing.
- Backfill requires your phone online; results are best-effort.
- WhatsApp CLI is not needed for routine user chats; it’s for messaging other people.
- JIDs: direct chats look like `<number>@s.whatsapp.net`; groups look like `<id>@g.us` (use `wacli chats list` to find).

Overview

This skill provides a CLI interface to send WhatsApp messages, sync and search WhatsApp history, and backfill conversation history for archival or automation tasks. It is intended for sending messages to third parties or performing history operations, not for ordinary conversational replies with the user. Safety checks require explicit recipient and message confirmation before any send action.

How this skill works

The tool authenticates via QR code and performs initial syncs to populate local stores. It exposes commands to list chats, search messages, backfill history, and send text or files; outputs can be returned as human-readable or machine-readable JSON. Local data is stored under ~/.wacli by default and continuous sync can be enabled for live updates.

When to use it

  • Send a WhatsApp message to a third party on behalf of the user with explicit consent.
  • Search historical WhatsApp messages or chats for a specific query or date range.
  • Backfill missing conversation history for archival or analysis.
  • Run diagnostics or re-authenticate when sync issues arise.

Best practices

  • Always obtain and confirm the exact recipient JID/phone number and message text before sending.
  • Use --json for machine parsing of command output in automation pipelines.
  • Keep the phone online during backfill operations; results are best-effort.
  • Limit searches and backfills with --limit or --count to avoid excessive API load.
  • Use wacli doctor to troubleshoot sync or auth problems before retrying operations.

Example use cases

  • Send a calendar reminder to a contact: wacli send text --to "+14155551212" --message "Reminder: meeting at 3pm."
  • Search receipts from last year: wacli messages search "invoice" --after 2025-01-01 --before 2025-12-31
  • Backfill a group chat history for an archive: wacli history backfill --chat [email protected] --requests 2 --count 50
  • List recent chats to find a JID: wacli chats list --limit 20 --query "Alice"
  • Send an attachment with caption: wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"

FAQ

Can I use this for normal user conversations?

No. This CLI is intended for messaging other people or managing history; routine user chats are handled separately and do not require this tool.

What if a recipient or message is ambiguous?

Do not send. The skill requires a clarifying question and explicit confirmation of recipient and message before proceeding.