client-chatbot-service
БесплатноБез исполняемых скриптовНе проверенUse when building a client chat bot (WA/Telegram).
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Client Chatbot Service — bangun & kirim bot chat buat klien usaha
Use when: the user asks "bisa bikin bot WA?", wants a Telegram bot for a business, needs an
auto-reply + daily-recap service for an SME client, or is going live for a new client after a deposit.
money-radar governs SELLING it (audit call, pricing, deposit gate). This skill governs BUILDING and
DELIVERING it.
Channel decision — settle this before writing a line of code
| Telegram | WhatsApp Cloud API (official Meta) | |
|---|---|---|
| Where SME customers actually are | No | Yes — a warung's customers live in WA |
| Setup cost/time | one @BotFather token, ~2 min | Business Manager + app + dedicated number + token + webhook |
| Needs public HTTPS / domain | No (long polling) | Yes — Meta requires a valid cert |
| Quick cloudflared tunnel OK? | n/a | No — URL rotates on restart, webhook breaks. Needs named tunnel + domain (~Rp150rb/yr) |
| Free-form replies | always | only inside the 24-hour customer-service window; outside it needs an approved template |
| Cost per client | Rp0 | free service-reply quota, then per-reply (verify the current rate before quoting) |
| Role | demo door (close the audit) | product door (delivery) |
Rule of thumb to state out loud to the user: build the core channel-agnostic, demo on Telegram today, plug WA only when a client has paid and their own number/assets exist. Never let the channel choice leak into business logic.
Also mandatory before WA: the number used for the API cannot be a number already active in the regular WhatsApp app — that single constraint is what makes most people give up, so raise it early.
Architecture that survives client #2 … #10
core.py one path of business logic; returns DATA, never transport calls
handle(channel, chat_id, pengirim, teks, msg_id) -> {jenis, balasan[], order, alert_admin}
channels/telegram.py long polling; injectable send_fn
channels/whatsapp.py Graph API sender + stdlib http.server webhook; injectable send_fn
store.py sqlite: orders / pending / alerts / seen
config_usaha.json ONE file per client: menu, rules, ongkir, minimum, recap time
bot.py CLI entry: telegram | wa | recap | export | selftest | pesan | demo
- Adapters translate transport ⇄ core and nothing else. A second channel must never require touching core.
handle()returns a list of replies plus an optional owner alert — the adapter decides how to deliver.- New client = copy the config JSON and edit it. If a new client needs code, the config boundary is wrong.
- Recap must be a CLI verb that sends via the API itself and prints nothing on success (cron silence;
otherwise
deliver=origindouble-sends the same message).
Testing: write the harness before the channel is live
The harness is cheap and it is the difference between a demo that closes and a demo that loses the order in front of the client. Two real bugs were found by the harness in this exact build, both invisible in a happy-path demo: (a) any later message swallowed a half-finished order, (b) adding a menu item overwrote the items already collected.
Harness rules:
- Set the DB env var BEFORE importing the store module — the path is read at import time, so
os.environ["X_DB"] = tempfile…; import storein that order, or the test writes to production. - Drive the adapters with a fake
send_fnso the whole path (payload → parse → core → reply) is asserted with zero network. - Always include: FAQ path, partial order → pending, identity continuation → logged with correct total, ongkir free-threshold, minimum-order note, added-item merge, duplicate inbound id, unknown message → owner alert, recap numbers, and a real provider payload (Meta webhook JSON and a Telegram update dict).
- Assert numbers, not vibes (
total == 64000,qty == 3), and print PASS/FAIL per scenario with the offending value. Exit non-zero on failure.
State-machine pitfalls (order chat is never one message)
- Never guard on "items empty". A continuation message fills items from pending, so an
if not itemsguard is dead code. Guard on facts about THIS message: did it bring a new menu? did it carry name/address? - Merge, never overwrite. "tambah 1 es jeruk" must add to the pending order, not replace it.
- Dedupe inbound message ids. WA retries webhook deliveries; without a
seentable the same order is logged twice. Telegram rarely retries but the guard is free. - Answer the WA webhook with HTTP 200 fast, regardless of processing outcome, or Meta retries forever.
- One bad message must not kill the loop — per-update try/except in polling; per-request try/except in the webhook handler.
- Markdown/formatting fallback: retry the send as plain text when the provider rejects the parse mode — customer text routinely breaks it.
- Pending state needs a TTL (~60 min); an abandoned half-orde
Установить client-chatbot-service в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл client-chatbot-service?
Use when building a client chat bot (WA/Telegram).
Как установить скилл client-chatbot-service?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл client-chatbot-service запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic