# Add Whatsapp Cloud

Add WhatsApp Business Cloud API channel via Chat SDK.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Business
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-whatsapp-cloud -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-whatsapp-cloud -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-whatsapp-cloud -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-whatsapp-cloud -g -a gemini-cli -y`

## Description

Add WhatsApp Business Cloud API channel via Chat SDK. Official Meta API.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add WhatsApp Cloud API Channel

Connect NanoClaw to WhatsApp via the official Meta WhatsApp Business Cloud API.
NanoClaw doesn't ship channels in trunk, this skill copies the WhatsApp Cloud
adapter in from the `channels` branch.

The mechanical steps under **Apply** carry `nc:` directive fences: an agent reads
the prose and applies them, and a parser can apply them deterministically from
the same document. Every directive is idempotent, so the whole skill is safe to
re-run; anything a parser can't apply falls back to the prose beside it.

## Apply

### 1. Copy the adapter

Fetch the `channels` branch and copy the WhatsApp Cloud adapter into
`src/channels/` (overwrite, the branch is canonical):

```nc:copy from-branch:channels
src/channels/whatsapp-cloud.ts
src/channels/whatsapp-cloud-registration.test.ts
```

### 2. Register the adapter

Append the self-registration import to the channel barrel (skipped if the line
is already present). This one line is the skill's only reach-in into core:

```nc:append to:src/channels/index.ts
import './whatsapp-cloud.js';
```

### 3. Install the adapter package

Pinned to an exact version, the supply-chain policy rejects ranges and `latest`:

```nc:dep
@chat-adapter/whatsapp@4.41.1
```

### 4. Build and validate

Build guards the typed `createChatSdkBridge(...)` core call and proves the
dependency is installed, the import throws at evaluation if `@chat-adapter/whatsapp`
is missing or the barrel drifts:

```nc:run effect:build
pnpm run build
```
```nc:run effect:test
pnpm exec vitest run src/channels/whatsapp-cloud-registration.test.ts
```

`whatsapp-cloud-registration.test.ts` imports the real channel barrel and asserts
the registry contains `whatsapp-cloud`, it goes red if the import line is deleted
or drifts, if the barrel fails to evaluate, or if `@chat-adapter/whatsapp` isn't
installed (the import throws), so it also covers the dependency from step 3.

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-whatsapp-cloud/SKILL.md
