agentleFS
n24q02mn24q02m/better-telegram-mcp/skills/setup-bot/SKILL.md

setup-bot

Skill11 starsChanged 21 days agoApache-2.0View on GitHub

Diagnose and fix Telegram bot connection issues -- verify config, test send, resolve common errors

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If status shows "not configured", the user needs to set TELEGRAM_BOT_TOKEN env var and restart the MCP server (token is NOT …

    line 15
  2. Distinctive:

    If no chats appear, instruct user to send any message to the bot first (the bot must receive at least one message to discover chat_id)

    line 19

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Setup Bot -- Error Diagnosis

Diagnose and fix Telegram bot connectivity issues. This skill assumes the bot already exists in BotFather -- focus is on getting it working with the telegram MCP server.

Steps

  1. Verify connection status:
    • config(action="status") to check current bot token and connection state
    • If status shows "not configured", the user needs to set TELEGRAM_BOT_TOKEN env var and restart the MCP server (token is NOT runtime-configurable)
  2. Test send to obtain chat_id:
    • chat(action="list") to see known chats
    • If no chats appear, instruct user to send any message to the bot first (the bot must receive at least one message to discover chat_id)
    • Send test: message(action="send", chat_id="<id>", text="Connection test")
  3. Diagnose errors using the flowchart below

Error Diagnosis Flowchart

Send fails
  |
  +-- HTTP 403 "Forbidden: bot was blocked by the user"
  |     -> User blocked the bot. They must unblock it in Telegram.
  |
  +-- HTTP 403 "Forbidden: bot is not a member of the channel/group"
  |     -> Bot not added to the group/channel.
  |     -> For groups: add bot as member via group settings.
  |     -> For channels: add bot as admin (channels require admin for posting).
  |
  +-- HTTP 400 "Bad Request: chat not found"
  |     -> Wrong chat_id format.
  |     -> Groups use negative IDs (e.g., -1001234567890).
  |     -> Channels use negative IDs or @channel_username.
  |     -> Users use positive numeric IDs.
  |
  +-- HTTP 400 "Bad Request: can't parse entities"
  |     -> MarkdownV2 formatting error. See channel-post skill for escaping rules.
  |
  +-- HTTP 401 "Unauthorized"
  |     -> Bot token is invalid or revoked.
  |     -> Verify token with @BotFather (/mybots -> select bot -> API Token).
  |     -> If token was regenerated, update TELEGRAM_BOT_TOKEN and restart.
  |
  +-- HTTP 429 "Too Many Requests"
  |     -> Rate limited. Wait the retry_after seconds indicated in the response.
  |     -> Telegram limits: ~30 messages/second globally, 1 msg/second per chat.
  |
  +-- Connection timeout / DNS resolution failed
  |     -> Network issue. Check internet connectivity.
  |     -> If behind proxy/firewall, Telegram API (api.telegram.org) may be blocked.
  |
  +-- "Not Found" on getMe
        -> Token format is wrong. Must be "123456:ABC-DEF..." format.

When to Use

  • Bot token is set but messages fail to send
  • Unclear error messages from Telegram API
  • Bot works in DM but not in group/channel (or vice versa)
  • Connection timeouts or auth failures after token rotation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.