Stage 1. Sign up at Wasender, get a Personal Access Token, create a WhatsApp session, scan the QR with the user's phone, and verify the connection works end-to-end. Saves credentials to .env.
How this skill is triggered — by the user, by Claude, or both
Slash command
/whatsapp-agent-builder:wa-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Goal: by the end of this skill, the user has a working Wasender session, a phone connected by QR scan, and a `.env` file with all credentials saved. **You do every technical step.** The user just signs up, holds their phone, scans a QR.
Goal: by the end of this skill, the user has a working Wasender session, a phone connected by QR scan, and a .env file with all credentials saved. You do every technical step. The user just signs up, holds their phone, scans a QR.
Speak Hebrew to the user.
Tell the user (in Hebrew):
נחבר עכשיו את הוואטסאפ שלך לשירות שנקרא Wasender. זה השירות שמאפשר לבוט לקרוא ולשלוח הודעות בשמך.
חשוב שתדע:
- המספר שתחבר צריך להיות מספר נפרד — מספר ייעודי לבוט (חדש, או SIM ישנה שלא בשימוש). זה לא חובה, אבל זה הכי בטוח. ❗ זה לא הוואטסאפ הרשמי לעסקים — יש סיכון תיאורטי לחסימה אם משתמשים במספר אישי.
- עלות: ניסיון חינם של 3 ימים, אחרי זה $6 לחודש למספר אחד.
מוכן להתחיל?
Wait for confirmation.
Tell the user:
- פתח את הדפדפן וגש ל: https://wasenderapi.com
- לחץ על Sign Up והשלם הרשמה (אימייל + סיסמה).
- אמת את האימייל.
- אחרי שנכנסת — תגיד לי "מחובר" ונמשיך.
Wait until the user confirms.
Tell the user:
מצוין. עכשיו ניצור Personal Access Token — מפתח שיאפשר לי לנהל בשמך את החיבורים לוואטסאפ.
- גש ל: https://wasenderapi.com/settings/tokens
- לחץ Create New Token, תן לו שם (למשל "claude-code-builder").
- העתק את המחרוזת שתופיע — זו ההזדמנות היחידה שלך לראות אותה.
- הדבק את המחרוזת כאן בצ'אט.
When the user pastes the token:
.env file at the project root if it exists. If not, create it.WASENDER_PAT=<the token>..env is in .gitignore. If not, add it.מעולה. שמרתי את ה-PAT ב-
.envמקומית (לא מועלה ל-Git, אל דאגה). עכשיו ניצור את החיבור עצמו.
Ask the user for the phone number they'll connect:
איזה מספר טלפון תרצה לחבר? (פורמט בינלאומי עם +, למשל
+972501234567)
Validate format. Then ask:
איך נקרא לחיבור הזה? (למשל "הסוכן של רינת")
Then make the API call. Use Bash with curl. Pull the PAT from .env, never hardcode it in your prompt or output.
curl -sX POST "https://www.wasenderapi.com/api/whatsapp-sessions" \
-H "Authorization: Bearer $WASENDER_PAT" \
-H "Content-Type: application/json" \
-d "{
\"name\": \"$SESSION_NAME\",
\"phone_number\": \"$PHONE_NUMBER\",
\"account_protection\": true,
\"log_messages\": true,
\"webhook_enabled\": false
}"
(Webhook URL is registered later in wa-deploy once we have a public URL.)
The response shape:
{
"success": true,
"data": {
"id": 1,
"api_key": "75075a7bf6417bff59e76fb...",
"webhook_secret": "fb61be92ddb7935e0cedcec58e470f6c",
"status": "need_scan",
"phone_number": "+972501234567"
}
}
Parse the response. Save to .env:
WASENDER_SESSION_ID=<id>
WASENDER_API_KEY=<api_key>
WASENDER_WEBHOOK_SECRET=<webhook_secret>
WASENDER_PHONE=<phone_number>
Also update .wa-state.json:
{ "wasender_session_id": <id>, "wasender_phone": "<phone>" }
If the API returns success: false, surface the error message in Hebrew and stop. Common errors:
curl -sX POST "https://www.wasenderapi.com/api/whatsapp-sessions/$WASENDER_SESSION_ID/connect" \
-H "Authorization: Bearer $WASENDER_PAT"
Then poll for the QR:
curl -sX GET "https://www.wasenderapi.com/api/whatsapp-sessions/$WASENDER_SESSION_ID/qrcode" \
-H "Authorization: Bearer $WASENDER_PAT"
Response: {"success":true,"data":{"qrCode":"2@DfzdTHe..."}} — the qrCode value is the raw WhatsApp QR string, not an image.
Render it as an image so the user can scan. Use Python:
python -c "
import qrcode, sys, os
qr_str = os.environ['QR_STR']
img = qrcode.make(qr_str)
img.save('wa-qr.png')
print('saved wa-qr.png')
"
If qrcode isn't installed, run pip install qrcode[pil] first. Save the image to the project root as wa-qr.png and tell the user:
הקוד מוכן! נשמר אצלך כאן:
wa-qr.pngעכשיו:
- פתח את הוואטסאפ בטלפון שאתה רוצה לחבר.
- הגדרות → מכשירים מקושרים → קישור מכשיר.
- סרוק את הקובץ
wa-qr.png.⏱️ הקוד תקף ל-45 שניות. אם פג תוקף, אגיד לך ונייצר חדש.
Poll status every 3 seconds for up to 90 seconds:
curl -sX GET "https://www.wasenderapi.com/api/status" \
-H "Authorization: Bearer $WASENDER_API_KEY"
Response: {"success":true,"data":{"status":"connected"|"connecting"|"need_scan"|"disconnected"}}
connected → success, move to step 6.need_scan after 45s → QR expired. Re-fetch QR, regenerate wa-qr.png, ask user to scan again.disconnected → ask user if they want to retry from the start.When connected, delete wa-qr.png (no need to leave it lying around) and tell the user:
🎉 חובר! המספר {phone} מחובר עכשיו דרך Wasender.
Send a test message from the bot back to itself (or to a number the user provides) to confirm outbound works.
Ask:
רוצה לשלוח הודעת בדיקה? אני אשלח "שלום מהבוט שלך 👋" למספר שתבחר. שלח לי את המספר (פורמט +).
Then:
curl -sX POST "https://www.wasenderapi.com/api/send-message" \
-H "Authorization: Bearer $WASENDER_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"to\":\"$TEST_NUMBER\",\"text\":\"שלום מהבוט שלך 👋\"}"
Verify response has success: true and data.msgId. Ask the user:
קיבלת את ההודעה?
If yes — done. If no — diagnose: check status endpoint, check rate limit headers, check sender format.
Update .wa-state.json:
{
"current_stage": "characterize",
"completed_stages": ["setup"],
"last_updated": "<ISO 8601>"
}
Tell the user:
נהדר! החיבור עובד. השלב הבא הוא לעצב את האישיות של הבוט — מה השם שלו, מי הוא משרת, איך הוא מדבר, מה מותר ומה אסור.
מוכן להמשיך לשלב הגדרת אופי הבוט (
/waישלוף אותך לשם)?
Hand back to /wa orchestrator.
GET /api/whatsapp-sessions (with PAT) to list, find the matching one, and adopt its id/api_key/webhook_secret.qrcode Python lib not installed. Install via pip silently first; only mention it to the user if install fails.PUT /api/whatsapp-sessions/{id} with regenerate_webhook_secret: true (verify against current docs if needed).npx claudepluginhub jackvidal/whatsapp-agent-builder --plugin whatsapp-agent-builderProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.