Tg Bot Ops logo

Tg Bot Ops

Community
serejaris
tg-bot-ops

Use when operating, debugging, deploying, or monitoring a Telegram bot or Telegram-to-agent gateway. Triggers on "telegram bot down", "bot not responding", "debug bot", "check webhook", "polling vs webhook", "restart bot", "deploy bot", "bot logs", "agent gateway", "Telegram Bot API error", "send test message", "бот не отвечает", "проверь бота", "логи бота", "перезапусти бота". Covers health checks, logs, webhook/polling diagnostics, environment validation, safe restart/deploy checklists, Bot API smoke tests, forum topic delivery, privacy mode, gateway routing, and incident notes.

Overview

Publisherserejaris
Repositorypersonal-corp-os
Skill nametg-bot-ops
Stars
232
Forks
26
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by serejaris on GitHub. Read the source before you install it.

Installation

Install the Tg Bot Ops AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/serejaris/personal-corp-os/tree/main/skills/tg-bot-ops
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serejaris/personal-corp-os.git /tmp/personal-corp-os
mkdir -p .claude/skills
cp -r /tmp/personal-corp-os/skills/tg-bot-ops .claude/skills/tg-bot-ops
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tg Bot Ops in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tg Bot Ops on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tg Bot Ops is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Telegram Bot Ops

Use this skill when the real question is whether a Telegram bot is receiving updates, processing them in the intended runtime, and sending visible responses to the right chat, user, or forum topic.

Public Safety

  • Default to read-only diagnostics.
  • Do not print tokens, .env values, connection strings, raw logs, private DMs, payment payloads, session files, or full user records.
  • Use placeholders in notes and examples: <TELEGRAM_BOT_TOKEN>, <TELEGRAM_USER_ID>, <CHAT_ID>, <TOPIC_ID>, <WEBHOOK_URL>.
  • Do not send Telegram messages, restart production services, change webhooks, edit BotFather settings, or deploy until the user has authorized that exact action.
  • If any real secret appears in the repo, logs, or prompt, stop and tell the user it must be rotated before public release.

Intake

If the repo or runtime is unclear, identify:

  • bot repo and language/runtime;
  • deployment target: local, Docker, VPS/systemd, Railway, Render, Fly, Vercel, or other;
  • update mode: webhook, polling, or unknown;
  • env source for TELEGRAM_BOT_TOKEN;
  • expected symptom, chat surface, and timestamp;
  • whether production restart/deploy is allowed.

Diagnostic Flow

  1. Repo and runtime — inspect entrypoints, process manager, deploy files, and current git state.
  2. Environment — verify required env var names exist without printing values.
  3. Update intake — classify runtime: HTTP Bot API webhook, HTTP Bot API polling, MTProto bot session, or MTProto user session.
  4. Bot API identity — for Bot API-token runtimes, run getMe using a masked token path.
  5. Webhook/polling mode — for Bot API-token runtimes, run getWebhookInfo and inspect runtime logs.
  6. Single update owner — resolve 409 Conflict by reading the error text: webhook conflict means webhook/deleteWebhook path; competing getUpdates means find the polling owner.
  7. Telegram delivery — use a fresh nonce for Bot API or Telethon/user-session E2E when user-visible behavior matters.
  8. Handler/runtime — prove the runtime received and processed the update.
  9. Outbound response — prove the bot sent to the expected chat/topic.
  10. Incident note — report symptom, evidence, root cause, fix, and residual risk.

Telegram-To-Agent Gateways

When the bot is a gateway from Telegram into an agent runtime, read references/hermes-gateway.md. The reference is Hermes-compatible but intentionally generic: bot handle, host, service name, home directory, chat ids, topic ids, env paths, and logs must be placeholders or redacted.

Bot API vs Telethon / MTProto

  • Bot API is Telegram's HTTP interface for bot tokens: getUpdates, webhooks, sendMessage, getMe, callbacks, payments, and join requests.
  • Telethon is an MTProto client. It can be a bot-account runtime with start(bot_token=...) or a user-session E2E harness for what a Telegram user sees.
  • Pick one primary intake per bot token/account: Bot API webhook, Bot API polling, MTProto bot session, or MTProto user session. Do not mix without a clear deduplication plan.

Webhook And Polling Checks

Safe read-only checks should avoid putting the token-bearing URL in shell history, process listings, or copied logs. Prefer a tiny local helper:

python
import json, os, urllib.request

token = os.environ["TELEGRAM_BOT_TOKEN"]
for method in ("getMe", "getWebhookInfo"):
    with urllib.request.urlopen(f"https://api.telegram.org/bot{token}/{method}") as response:
        data = json.load(response)
    print(method, {"ok": data.get("ok"), "result_keys": sorted((data.get("result") or {}).keys())})

Do not paste the token-bearing URL into notes or issues. In reports, write:

text
getWebhookInfo: webhook_url=<set|empty>, pending_update_count=<n>, last_error=<redacted>

Direct getUpdates diagnostics can consume pending updates. Use it only with a fresh nonce, short timeout, known update owner, and restore plan.

Forum Topics And Privacy

  • Non-General forum topics require preserving message_thread_id.
  • General topic is normally sent like an ordinary supergroup message: omit message_thread_id. Preserve message_thread_id for non-General topics.
  • With privacy mode enabled, bots see targeted commands, replies to the bot, inline messages via the bot, service messages, private chats, and channel messages where they are a member. Admin bots can receive all group messages.
  • Disabling privacy or removing/re-adding a bot affects group visibility and requires explicit user authorization.

Restart / Deploy Gate

Before restarting or deploying:

  • identify the exact production owner/process;
  • capture current status and rollback command;
  • state expected downtime or risk;
  • confirm the user authorized the action;
  • run post-restart getMe, webhook/polling, and one visible smoke test.

Output Format

Answer with:

  1. Status — not checked, local only, runtime checked, verified in Telegram, or blocked.
  2. Evidence — commands/logs checked, with secrets redacted.
  3. Finding — the failing layer or confirmed healthy layer.
  4. Action — what changed or the next safe step.
  5. Public safety — note if any secret, user data, or private payload was found.

Anti-Patterns

  • Claiming "bot works" from unit tests only.
  • Printing raw bot tokens, .env, logs, user messages, payment payloads, or DB rows.
  • Changing webhook/polling mode without knowing the current production owner.
  • Running a local polling process with a production token while production is active.
  • Ignoring message_thread_id when the bot lives in Telegram forum topics.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Tg Bot Ops AI skill do?

Use when operating, debugging, deploying, or monitoring a Telegram bot or Telegram-to-agent gateway. Triggers on "telegram bot down", "bot not responding", "debug bot", "check webhook", "polling vs webhook", "restart bot", "deploy bot", "bot logs", "agent gateway", "Telegram Bot API error", "send test message", "бот не отвечает", "проверь бота", "логи бота", "перезапусти бота". Covers health checks, logs, webhook/polling diagnostics, environment validation, safe restart/deploy checklists, Bot API smoke tests, forum topic delivery, privacy mode, gateway routing, and incident notes.

Why use Tg Bot Ops on TypingMind?

Because you install it once and use it with any model. Tg Bot Ops is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tg Bot Ops in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/serejaris/personal-corp-os/tree/main/skills/tg-bot-ops. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Tg Bot Ops?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tg Bot Ops?

As many as you like. As long as a model supports skills, you can use Tg Bot Ops with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tg Bot Ops AI skill free?

Yes. It is published on GitHub by serejaris under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇