Community生产力与协作github.com

steipete/whatsapp

WhatsApp 路由器:历史记录/搜索/读取/发送;wacrawl 只读存档,wacli 实时设备。

whatsapp 是什么?

该技能为 AI 代理提供统一的 WhatsApp 工作入口,通过两个工具 `wacrawl` 和 `wacli` 清晰划分职责。`wacrawl` 专注于 WhatsApp Desktop 的只读本地存档,适合历史搜索、消息读取和未读数统计,无需网络连接。`wacli` 作为链接设备客户端,支持替身账户管理、实时同步、发送消息、回复、媒体下载以及群组/频道操作,需用户明确授权后方可进行写操作。技能内置了源选择路由规则,确保在读取时优先使用本地存档,仅在需要新鲜数据或发送消息时才切换至 `wacli`。此外,技能强调安全边界:默认只读,禁止直接修改 `session.db` 或写入 Desktop 容器,并要求在回答时注明数据源的新鲜度和已知局限。该技能适用于 Claude Code、Codex 等需要集成 WhatsApp 功能的 AI 代理场景。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/whatsapp

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

whatsapp 是做什么的?

请将此作为 WhatsApp 工作的第一入口。保持源边界清晰:

  • wacrawl:主要的 WhatsApp Desktop 存档。只读,最佳本地历史,无网络,无发送功能。
  • wacli:链接设备账户。用于替身账户、实时同步、身份验证、发送、聊天/群组变更以及 WhatsApp Web 协议相关问题。

如果用户明确提到了 wacrawl 或 wacli 的仓库工作,请同时阅读该工具的对应技能文档。

路由规则

  • 主要的 WhatsApp 读取/搜索/历史记录:使用 wacrawl。
  • 从 WhatsApp Desktop 获取已读/未读计数:使用 wacrawl;它提供聊天级别的未读计数,而非每条消息的已读状态。
  • 对新鲜度敏感的初级读取:检查 wacrawl status;当被要求或当前数据至关重要时,运行 wacrawl sync。
  • 替身账户,例如 me、molty 或命名存储账户:使用 wacli --account NAME。
  • 发送、反应、在线状态、归档/置顶/静音/标记已读、群组/频道变更:仅在用户明确意图后使用 wacli。
  • 比较各源覆盖范围:将 wacrawl 视为主要历史的 Desktop 存档真相,wacli 视为受协议限制的链接设备/实时覆盖。

安全准则

  • 除非明确要求,否则绝不发送或变更 WhatsApp 状态。
  • 优先使用 wacli 的只读命令进行检查:传递 --read-only 参数或设置 WACLI_READONLY=1 环境变量。
  • 不要写入 WhatsApp Desktop 的应用容器。
  • 不要直接编辑 wacli 的 session.db 文件。
  • 保持命名的 wacli 账户相互隔离,不要合并存储。
  • 从本地存储回答问题时应注明源的新鲜度、账户名称以及已知的覆盖缺口。

常用命令

主要存档

新鲜度和状态:

wacrawl status
wacrawl doctor
wacrawl sync

未读消息分类:

wacrawl chats --limit 20
wacrawl unread --limit 20
wacrawl --json unread --limit 100

搜索和切片消息:

wacrawl messages --after 2026-01-01 --limit 50
wacrawl messages --chat JID --asc --limit 100
wacrawl messages --has-media --limit 50
wacrawl --json search "query"
wacrawl search "query" --after 2026-01-01 --from-them

仅在要求时存档媒体或备份:

wacrawl import --copy-media
wacrawl backup status
wacrawl --sync never backup push

替身/实时账户

账户发现和只读检查:

wacli accounts list --json
wacli --account me auth status --read-only --json
wacli --account me chats list --read-only --json
wacli --account me messages list --read-only --json --limit 50
wacli --account me messages search --read-only --json "query"

后台实时同步,仅在请求时进行。对于跟进模式,优先使用 tmux:

wacli --account me sync --follow --events
wacli --account me sync --once --events

媒体、发送和实时变更,仅在明确要求时:

wacli --account me media download --chat JID --id MESSAGE_ID
wacli --account me send text --to JID_OR_NAME --message "消息内容"
wacli --account me send file --to JID_OR_NAME --file ./file.jpg --caption "说明文字"
wacli --account me send text --to JID --reply-to MESSAGE_ID --message "回复内容"

比较

在比较 wacrawl 和 wacli 时,应比较两者的计数和重叠部分:

  • 消息计数和时间跨度
  • 聊天计数
  • 最新消息的时间戳
  • 按 msg_id 重叠
  • 当 JID 足够标准化时,按 chat_jid + msg_id 重叠
  • 链路设备历史记录限制与 Desktop 存档覆盖相比明显存在的缺口需要解释说明

仓库指针

  • ~/Projects/wacrawl:Desktop 存档导入/搜索/备份。
  • ~/Projects/wacli:链接设备客户端/同步/发送。
  • 全局技能副本:~/Projects/agent-scripts/skills/wacrawl 和 ~/Projects/agent-scripts/skills/wacli。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

相关技能