| name | wa-cc |
| description | Start WhatsApp-to-Claude-Code bridge — polls CC-Agent GROUP every 60s for @cc/קלוד messages, processes as Claude Code tasks, replies in group |
/wa-cc — WhatsApp ↔ Claude Code Bridge
Start a real-time bridge between the CC-Agent WhatsApp group and this Claude Code session.
Poll every 60 seconds for messages with CC keywords, process them as full Claude Code tasks,
and reply in the same group.
Language: Hebrew for WhatsApp replies. English for code/paths.
Security: the CC-Agent group ONLY (JID configured locally in ~/.claude/.wa-bridge.json — not committed). Never DMs.
Activation Steps (run IN ORDER)
Step 1 — Verify containers
docker ps --format "{{.Names}}" | grep -q "goldb-admin"
If NOT running → offer: cd C:\GoldB-Agent && docker compose up -d --remove-orphans
Wait for healthy before proceeding.
Step 2 — Initialize poll state
Set offsets to current end of log (skip historical messages):
node -e "
const fs = require('fs'), path = require('path');
const home = process.env.USERPROFILE || process.env.HOME;
const ocHome = path.join(home, '.openclaw');
const d = new Date();
const ymd = String(d.getFullYear()) + String(d.getMonth()+1).padStart(2,'0') + String(d.getDate()).padStart(2,'0');
const logPath = path.join(ocHome, 'admin-logs', 'admin-' + ymd + '.log');
let logSize = 0;
try { logSize = fs.statSync(logPath).size; } catch {}
const sfPath = path.join('h:', 'האחסון שלי', \"Gold-B's Agent\", 'Long-Term Memory', 'ClaudeCodeSharedSession.md');
let sfSize = 0;
try { sfSize = fs.statSync(sfPath).size; } catch {}
const state = { logOffset: logSize, logDate: ymd, sharedSessionSize: sfSize, lastPoll: new Date().toISOString() };
fs.writeFileSync(path.join(home, '.claude', 'wa-cc-poll-state.json'), JSON.stringify(state, null, 2));
console.log('State initialized: logOffset=' + logSize + ' sharedSessionSize=' + sfSize);
"
Step 3 — Create CronCreate job
Use CronCreate with these EXACT parameters:
- cron:
* * * * *
- durable: true
- recurring: true
- prompt: copy VERBATIM from the "Cron Prompt" section below
Step 4 — Send activation message to group
node ~/.claude/skills/whatsapp/send.js "[CC] גשר וואטסאפ פעיל בסשן חדש. שלחו הודעה עם @cc או קלוד בתחילתה"
Run with run_in_background: true.
Step 5 — Confirm to user (Hebrew)
Report: bridge active, cron job ID, how to use, 7-day expiry warning.
Cron Prompt (copy VERBATIM into CronCreate)
[WA→CC Poll] Run: node ~/.claude/skills/wa-cc-poll/poll.js
Exit 1 = no new messages → respond ONLY with "✓" (nothing else).
Exit 0 = JSON on stdout — messages from CC-Agent group addressed to Claude Code.
For EACH message in the JSON array:
1. Read .instruction — execute it as a full Claude Code task. You have ALL capabilities: Read, Edit, Write, Bash, Grep, Glob, Agent. Follow CLAUDE.md governance. This IS a real Claude Code session via WhatsApp.
2. Reply via WhatsApp (MUST use node.js, NEVER bash/curl):
node ~/.claude/skills/whatsapp/send.js "[CC] <Hebrew response>"
Follow BiDi/RTL rules: pure Hebrew lines only, English on separate lines, no emojis, no markdown.
3. If the interaction produced a significant decision, finding, conclusion, or important information — append a concise summary to:
h:\האחסון שלי\Gold-B's Agent\Long-Term Memory\ClaudeCodeSharedSession.md
Format:
## [YYYY-MM-DD HH:MM] <one-line topic>
<2-3 sentence summary of the decision/finding/conclusion>
Do NOT log routine pings, status checks, or trivial exchanges.
4. Update shared session offset after any write to ClaudeCodeSharedSession.md:
node -e "const fs=require('fs'),p=require('path');const sf=p.join('h:','האחסון שלי',\"Gold-B's Agent\",'Long-Term Memory','ClaudeCodeSharedSession.md');const st=JSON.parse(fs.readFileSync(p.join(process.env.USERPROFILE,'.claude','wa-cc-poll-state.json'),'utf8'));st.sharedSessionSize=fs.statSync(sf).size;fs.writeFileSync(p.join(process.env.USERPROFILE,'.claude','wa-cc-poll-state.json'),JSON.stringify(st,null,2));"
If unclear → ask yes/no via WhatsApp group, wait for next polls until answer arrives.
For conversation history context, read session files in: h:\האחסון שלי\Gold-B's Agent\Long-Term Memory\Sessions\
Source: the CC-Agent group ONLY (JID from ~/.claude/.wa-bridge.json). Never DMs.
Language: Hebrew for WA replies. English for code/paths.
Deactivation
CronDelete with the job ID, or close the session.
Architecture
| Component | Path | Purpose |
|---|
| Poll script | ~/.claude/skills/wa-cc-poll/poll.js | Reads admin log for group messages |
| State file | ~/.claude/wa-cc-poll-state.json | Byte offsets to avoid reprocessing |
| Decision log | h:\...\ClaudeCodeSharedSession.md | Significant decisions/findings only |
| Session history | h:\...\Sessions\ | Full conversation transcripts |
| Send script | ~/.claude/skills/whatsapp/send.js | Sends to CC-Agent group |
Keywords: @cc, קלוד, קלוד-קוד, claude-code, claude code
Ignores: messages starting with [CC] (our own responses)