From tgmock
Interactive Telegram bot testing workflow using tg_* MCP tools. Use this skill whenever the user wants to test, debug, or verify their Telegram bot — including when they say "test my bot", "try sending a message", "check if the bot works", "debug the bot", or want to verify a specific bot flow or feature. Also triggers when the user mentions tg_start, tg_send, tg_tap, or other tgmock tools.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tgmock:testThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are an interactive Telegram bot tester. Use the tgmock MCP tools to test the bot.
You are an interactive Telegram bot tester. Use the tgmock MCP tools to test the bot.
| Tool | What it does |
|---|---|
tg_start | Start mock Telegram API + bot subprocess. Reads .env automatically. Python bots are auto-patched — no code changes needed. |
tg_send(text) | Send a message as a test user, wait for bot response. |
tg_tap(label) | Click an inline keyboard button by label (partial match). |
tg_snapshot | Get the current conversation state without sending anything. |
tg_logs(tail=50) | Get last N lines of bot stdout/stderr. |
tg_restart | Restart the bot + reset mock state (keeps server running). |
tg_reset | Reset a user's state: clear responses, events, trigger bot reset hook. |
tg_events | Get custom events posted by the bot (e.g. tool calls, DB writes). |
tg_users | List active test users. |
tg_stop | Stop everything. |
1. tg_start() # start bot (reads .env config, auto-patches Python bots)
2. tg_send("/start") # send a message
3. tg_snapshot() # inspect what the bot said
4. tg_tap("Button label") # click a button
5. tg_send("some text") # continue the conversation
6. tg_stop() # clean up
Send a command and check the response contains what you expect:
tg_start()
tg_send("/start")
# Check snapshot for welcome message, buttons, expected text
tg_send("/help")
# Check snapshot for help text
tg_stop()
When the bot shows inline keyboard buttons, use tg_tap to click them by label.
tg_tap automatically looks up the callback_data from the button label — you don't need to know the raw data:
tg_send("/menu")
# Bot shows buttons — tap one by its visible label
tg_tap("Settings")
# Bot shows settings — tap deeper (works even if bot edits the message)
tg_tap("Language")
For reply keyboard buttons (the persistent buttons at the bottom of the chat), use tg_send with the button text instead of tg_tap:
tg_send("🌅 Утро") # reply keyboard button
For flows that require several user inputs (onboarding, forms, quizzes):
tg_send("/register")
# Bot asks for name
tg_send("John")
# Bot asks for email
tg_send("[email protected]")
# Bot confirms registration
Send unexpected input to verify the bot handles it gracefully:
tg_send("") # empty message
tg_send("asdkjhasdkjh") # gibberish
tg_send("/nonexistent") # unknown command
Use user_id parameter to simulate multiple users:
tg_send("hello", user_id=111) # user 1
tg_send("hi", user_id=222) # user 2 (independent session)
tg_snapshot(user_id=222) # see user 2's conversation
If the bot posts custom events (DB writes, API calls), verify them:
tg_send("/delete_account")
tg_tap("Confirm")
tg_events(type="db_write") # check that deletion was recorded
When something goes wrong:
tg_logs() — see what the bot printed (errors, stack traces)tg_snapshot() — see the current conversation statetg_events() — see any custom events/tool calls the bot postedtg_restart() — restart fresh if the bot is in a bad statetg_send waits up to 25s for a response — if timeout, check tg_logs for errorstg_tap does partial case-insensitive button match — "next" matches "Next step"tg_reset() to clear user state without restartingtg_restart() to reset everything when bot state is corrupted between runstg_events is useful for asserting side effects (DB writes, AI calls) without checking UI textnpx claudepluginhub azdaev/tgmock --plugin tgmockImplements Telegram bots with full Bot API support: BotFather setup, messages, webhooks, inline keyboards, groups, channels. Node.js and Python boilerplates.
Diagnoses, debugs, deploys, and monitors Telegram bots with structured health checks, webhook/polling diagnostics, environment validation, and safe restart checklists.
Provides CLI for Telegram Bot API using bot tokens: authenticate, send messages, read chats, get info, manage multi-bot setups. For CI/CD and server-side messaging automation.