xditya

Tgbot Test Skill — Testing skill for Claude Code

Testing community

A Claude Code agent skill that tests Telegram bots end-to-end during development — from a real logged-in userbot account (Telethon), not mocks.

How to install Tgbot Test Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open xditya/tgbot-test-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Tgbot Test Skill does

A Claude Code agent skill that tests Telegram bots end-to-end during development — from a real logged-in userbot account (Telethon), not mocks.

Alternatives in Testing

README

tgbot-test-skill

A [Claude Code](https://claude.com/claude-code) agent skill that tests Telegram bots end-to-end during development — from a **real logged-in userbot account** (Telethon), not mocks.

The agent discovers your bot's command handlers in the codebase, sends the actual commands from a user account, captures the bot's replies (including in-place edits and inline keyboards), clicks buttons, verifies everything against the handler code, and reports a pass/fail table. Attach it to a live dev session for a continuous edit → restart → re-test feedback loop.

What's inside

Path Purpose
SKILL.md The skill — workflow, gotchas, troubleshooting
scripts/tg_tester.py The driver: setup / check / send / click / run
reference/handler-discovery.md Handler-registration grep patterns for ~30 bot frameworks (PTB, aiogram, Pyrogram, Telethon, grammY, Telegraf, teloxide, gotgbot, …)
examples/sample-spec.json Example batch test spec

Install

npx skills add xditya/tgbot-test-skill

Or manually: copy this repo into `~/.claude/skills/tg-bot-tester/` (global) or `/.claude/skills/tg-bot-tester/` (per project).

Requirements

  • Python 3.8+ and pip install -U telethon
  • Telegram API credentials from https://my.telegram.org/apps
  • A Telegram account for the userbot — a spare/test account is strongly recommended

Quick start

# one-time interactive login (prompts for phone + login code)
python scripts/tg_tester.py setup

# verify
python scripts/tg_tester.py check

# probe a single command
python scripts/tg_tester.py send @MyDevBot "/start" --expect "(?i)welcome"

# run a batch spec
python scripts/tg_tester.py run examples/sample-spec.json --json results.json

Or just ask Claude Code: *"test my telegram bot"* — the skill auto-loads.

Security

`setup` stores your API ID, API hash, and session string in `~/.tg-bot-tester/credentials.json` (override the directory with `TG