Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

add-whatsappADD WhatsApp 搜索

Agent Skill

add-whatsapp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

212

周安装

9

GitHub Stars

28,082

下载量

74
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:add-whatsapp(ADD WhatsApp 搜索)
来源仓库:https://github.com/qwibitai/nanoclaw
仓库路径:skills/add-whatsapp
安装命令:
npx skills add https://github.com/qwibitai/nanoclaw --skill add-whatsapp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/qwibitai/nanoclaw --skill add-whatsapp

简介

add-whatsapp 用于为 NanoClaw 框架集成原生 Baileys 驱动的 WhatsApp 通信通道。

  • 适用于需要直接对接 WhatsApp 商业 API 的消息收发场景,无需第三方桥接。
  • 自动复制 channels 分支下的适配器代码及认证设置脚本,支持二维码登录。
  • 依赖 @whiskeysockets/baileys、qrcode 等 npm 包,需预先安装依赖项。
  • 认证流程包含 groups.ts 群组配置,确保消息路由正确性。

SKILL.md

Add WhatsApp Channel

Adds WhatsApp support via the native Baileys adapter (no Chat SDK bridge).

Install

NanoClaw doesn't ship channels in trunk. This skill copies the native WhatsApp (Baileys) adapter and its whatsapp-auth setup step in from the channels branch. No Chat SDK bridge.

Pre-flight (idempotent)

Skip to Credentials if all of these are already in place:

  • src/channels/whatsapp.ts exists
  • src/channels/index.ts contains import './whatsapp.js';
  • setup/whatsapp-auth.ts and setup/groups.ts both exist
  • setup/index.ts's STEPS map contains both 'whatsapp-auth': and groups:
  • @whiskeysockets/baileys, qrcode, pino are listed in package.json dependencies

Otherwise continue. Every step below is safe to re-run.

1. Fetch the channels branch

git fetch origin channels

2. Copy the adapter and setup steps

git show origin/channels:src/channels/whatsapp.ts > src/channels/whatsapp.ts
git show origin/channels:setup/whatsapp-auth.ts   > setup/whatsapp-auth.ts
git show origin/channels:setup/groups.ts          > setup/groups.ts

3. Append the self-registration import

Append to src/channels/index.ts (skip if already present):

import './whatsapp.js';

4. Register the setup steps

In setup/index.ts, add these entries to the STEPS map (skip lines already present):

groups: () => import('./groups.js'),
'whatsapp-auth': () => import('./whatsapp-auth.js'),

5. Install the adapter packages (pinned)

pnpm install @whiskeysockets/baileys@6.17.16 qrcode@1.5.4 @types/qrcode@1.5.6 pino@9.6.0

6. Build

pnpm run build

Credentials

WhatsApp uses linked-device authentication — no API key, just a one-time pairing from your phone.

Check current state

Check if WhatsApp is already authenticated. If store/auth/creds.json exists, skip to "Shared vs dedicated number".

test -f store/auth/creds.json && echo "WhatsApp auth exists" || echo "No WhatsApp auth"

Detect environment

Check whether the environment is headless (no display server):

[[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$OSTYPE" != darwin* ]] && echo "IS_HEADLESS=true" || echo "IS_HEADLESS=false"

Ask the user

Use AskUserQuestion to collect configuration. Adapt auth options based on environment:

If IS_HEADLESS=true AND not WSL → AskUserQuestion: How do you want to authenticate WhatsApp?

  • Pairing code (Recommended) - Enter a numeric code on your phone (no camera needed, requires phone number)
  • QR code in terminal - Displays QR code in the terminal (can be too small on some displays)

Otherwise (macOS, desktop Linux, or WSL) → AskUserQuestion: How do you want to authenticate WhatsApp?

  • QR code in browser (Recommended) - Opens a browser window with a large, scannable QR code
  • Pairing code - Enter a numeric code on your phone (no camera needed, requires phone number)
  • QR code in terminal - Displays QR code in the terminal (can be too small on some displays)

If they chose pairing code:

AskUserQuestion: What is your phone number? (Digits only — country code followed by your 10-digit number, no + prefix, spaces, or dashes. Example: 14155551234 where 1 is the US country code and 4155551234 is the phone number.)

Clean previous auth state (if re-authenticating)

rm -rf store/auth/

Run WhatsApp authentication

For QR code in browser (recommended):

pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method qr-browser

(Bash timeout: 150000ms)

Tell the user:

A browser window will open with a QR code. 1. Open WhatsApp > Settings > Linked Devices > Link a Device 2. Scan the QR code in the browser 3. The page will show "Authenticated!" when done

For QR code in terminal:

pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method qr-terminal

(Bash timeout: 150000ms)

Tell the user:

1. Open WhatsApp > Settings > Linked Devices > Link a Device 2. Scan the QR code displayed in the terminal

For pairing code:

Tell the user to have WhatsApp open on Settings > Linked Devices > Link a Device, ready to tap "Link with phone number instead" — the code expires in ~60 seconds and must be entered immediately.

Run the auth process in the background and poll store/pairing-code.txt for the code:

rm -f store/pairing-code.txt && pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method pairing-code --phone <their-phone-number> > /tmp/wa-auth.log 2>&1 &

Then immediately poll for the code (do NOT wait for the background command to finish):

for i in $(seq 1 20); do [ -f store/pairing-code.txt ] && cat store/pairing-code.txt && break; sleep 1; done

Display the code to the user the moment it appears. Tell them:

Enter this code now — it expires in ~60 seconds. 1. Open WhatsApp > Settings > Linked Devices > Link a Device 2. Tap Link with phone number instead 3. Enter the code immediately

After the user enters the code, poll for authentication to complete:

for i in $(seq 1 60); do grep -q 'STATUS: authenticated' /tmp/wa-auth.log 2>/dev/null && echo "authenticated" && break; grep -q 'STATUS: failed' /tmp/wa-auth.log 2>/dev/null && echo "failed" && break; sleep 2; done

If failed: logged_out → delete store/auth/ and re-run. timeout → ask user, offer retry.

Verify authentication succeeded

test -f store/auth/creds.json && echo "Authentication successful" || echo "Authentication failed"

Shared vs dedicated number

AskUserQuestion: Is this a shared phone number (personal WhatsApp) or a dedicated number?

  • Shared number — your personal WhatsApp (bot prefixes messages with its name)
  • Dedicated number — a separate phone/SIM for the assistant

If dedicated, add to .env:

ASSISTANT_HAS_OWN_NUMBER=true

Next Steps

If you're in the middle of /setup, return to the setup flow now.

Otherwise, run /manage-channels to wire this channel to an agent group.

Channel Info

  • type: whatsapp
  • terminology: WhatsApp calls them "groups" and "chats." A "chat" is a 1:1 DM; a "group" has multiple members.
  • how-to-find-id: DMs use <phone>@s.whatsapp.net (e.g. 14155551234@s.whatsapp.net). Groups use <id>@g.us. To find your number: node -e "const c=JSON.parse(require('fs').readFileSync('store/auth/creds.json','utf-8'));console.log(c.me?.id?.split(':')[0]+'@s.whatsapp.net')". Groups are auto-discovered — check sqlite3 data/v2.db "SELECT platform_id, name FROM messaging_groups WHERE channel_type='whatsapp' AND is_group=1".
  • supports-threads: no
  • typical-use: Interactive chat — direct messages or small groups
  • default-isolation: Same agent group if you're the only participant across multiple chats. Separate agent group if different people are in different groups.

Features

  • Markdown formatting — **bold***bold*, *italic*_italic_, headings→bold, code blocks preserved
  • Approval questions — ask_user_question renders with /approve, /reject slash commands
  • File attachments — send and receive images, video, audio, documents
  • Reactions — send emoji reactions on messages
  • Typing indicators — composing presence updates
  • Credential requests — text fallback (WhatsApp has no modal support)

Not supported (WhatsApp linked device limitation): edit messages, delete messages.

Troubleshooting

QR code expired

QR codes expire after ~60 seconds. Re-run the auth command:

rm -rf store/auth/ && pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method qr-browser

Pairing code not working

Codes expire in ~60 seconds. Delete auth and retry:

rm -rf store/auth/ && pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method pairing-code --phone <phone>

Ensure: digits only (no +), phone has internet, WhatsApp is updated.

If pairing code keeps failing, switch to QR-browser auth instead:

rm -rf store/auth/ && pnpm exec tsx setup/index.ts --step whatsapp-auth -- --method qr-browser

"waiting for this message" on reactions

Signal sessions corrupted from rapid restarts. Clear sessions:

systemctl --user stop nanoclaw
rm store/auth/session-*.json
systemctl --user start nanoclaw

Bot not responding

  1. Auth exists: test -f store/auth/creds.json
  2. Connected: grep "Connected to WhatsApp" logs/nanoclaw.log | tail -1
  3. Channel wired: sqlite3 data/v2.db "SELECT mg.platform_id, mg.name FROM messaging_groups mg JOIN messaging_group_agents mga ON mg.id=mga.messaging_group_id WHERE mg.channel_type='whatsapp'"
  4. Service running: systemctl --user status nanoclaw

"conflict" disconnection

Two instances connected with same credentials. Ensure only one NanoClaw process is running.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.24%
按下载量换算25

Claude

31.64%
按下载量换算23

Cursor

18.52%
按下载量换算14

Gemini CLI

9.32%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills