360 Secure SkillHub
360 安全技能中心

wacli WhatsApp

该 Skill 指导使用 wacli 命令行工具(基于 WhatsApp Web/whatsmeow)完成 WhatsApp 认证与后台同步,并向指定手机号或 JID 发送文本、引用回复、表情回应及带说明的文件;同时支持搜索消息、列出近期消息、查看上下文、查询聊天与群组。发送前要求用户明确给出收件人与内容。

prantikmedhi
prantikmedhi
热度 39.00
最近更新 2026-05-11 17:47:26
分类:协作依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add wacli-whatsapp
Metadata
name
wacli-whatsapp
description
Send WhatsApp messages or files from the command line using wacli (WhatsApp Web via whatsmeow). Use when the user asks to message someone on WhatsApp (send text, reply/quote, send a file/media with caption, react), or to auth/sync/search WhatsApp history via wacli.

wacli (WhatsApp CLI)

Use wacli via exec.

Safety / permission

  • Treat sending as an external, privacy-sensitive action.
  • Only send when the user explicitly provided (a) recipient and (b) message/file content and asked to send.
  • If any detail is missing/ambiguous (wrong number, unclear chat, not sure which attachment), ask one clarifying question before sending.

Quick checks

  • Verify install:
    • wacli version
  • If missing, suggest:
    • brew install steipete/tap/wacli

Auth + sync (required before sending)

  • Login (shows QR) and bootstrap initial sync:
    • wacli auth
  • Keep syncing in the background (recommended so messages/IDs resolve):
    • wacli sync --follow
  • Diagnostics:
    • wacli doctor

Send a WhatsApp message

Text:

  • wacli send text --to <PHONE_OR_JID> --message "<TEXT>"

Quoted reply (needs message id, usually from messages list/search/show/context):

  • wacli send text --to <PHONE_OR_JID> --message "<TEXT>" --reply-to <MSG_ID>

React:

  • wacli send react --to <PHONE_OR_JID> --id <MSG_ID> [--reaction "<EMOJI>"]

Send a file

  • wacli send file --to <PHONE_OR_JID> --file <PATH> [--caption "<TEXT>"] [--filename <DISPLAY_NAME>] [--mime <MIME>]

Finding chats / message ids

  • Search messages:
    • wacli messages search "<QUERY>"
  • List recent messages (for a known chat JID):
    • wacli messages list --chat <JID> --asc --limit 50
  • Show context around a message:
    • wacli messages context --chat <JID> --id <MSG_ID>
  • Find chats/groups:
    • wacli chats list --query "<NAME>" --limit 50
    • wacli groups list --query "<NAME>" --limit 50

Store location (FYI)

  • Default store is ~/.wacli on macOS; override with --store DIR or WACLI_STORE_DIR.