Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/aiosai/aipass/telegramnpx skills add AIOSAI/AIPass --skill telegramgit clone --depth 1 https://github.com/AIOSAI/AIPassWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aiosai/aipass/telegram)<a href="https://agentmods.dev/skills/aiosai/aipass/telegram"><img src="https://agentmods.dev/badge/skills/aiosai/aipass/telegram.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00017 | $0.04430 |
| Opus 5 | $0.00009 | $0.02215 |
| Sonnet 5 | $0.00003 | $0.00886 |
| Haiku 4.5 | $0.00002 | $0.00443 |
Grade B, and why
telegram scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
2. A matching provider bridge entry in `~/.claude/settings.json` How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Telegram Bridge
Multi-bot personal-assistant bridge: long-polling listener routes user Telegram messages into Claude tmux sessions. The base reply flow is Claude's Stop hook writing a pending file, which the bot picks up and sends back to Telegram; bots opting into streaming (below) also live-edit a "Processing..." placeholder while the reply is still being generated. A control-center bot exposes /start, /kill, /lock, /suspend to wake, kill, and lock or sleep terminal sessions by branch, and a separate hook mirrors terminal-typed messages into the same TG chat so the conversation reads as one continuous thread regardless of which door you type in.
Architecture
- BaseBot — polling loop, tmux injection, heartbeat, lock management, control verbs, streaming, offline backoff
- BranchPlugin — per-branch overrides (message prefix, response prefix, session startup)
- ResponseRouter — CWD-safe pending-file routing for multi-bot
- TelegramStandards — shared /start, /help, /new, /status command handlers
- BotFactory — bot create/delete lifecycle (8-step)
- BotRegistry — fcntl-locked JSON registry CRUD
- BotOperations — start/stop/status ops
- BotFatherClient — optional Telethon BotFather automation
- Config — bot configuration via @api secrets store
- FileHandler — download, classify, and prompt file uploads
- LogStreamer — daemon thread tailing logs to Telegram
- Notifier — standalone push notification sender
- TmuxManager — tmux session helpers (not the control verbs — see below)
- UserMessageRelay — UserPromptSubmit hook that mirrors terminal-typed messages into the branch's TG chat
Usage
drone @skills run telegram start <bot_id>
drone @skills run telegram stop <bot_id>
drone @skills run telegram status [bot_id]
drone @skills run telegram create <bot_id> --token <token>
drone @skills run telegram delete <bot_id>
drone @skills run telegram notify "message"
Control verbs (DPLAN-0270 P1)
One bot doubles as a control center: _is_control_bot() is true when branch_name is None (a bare base bot) or "aipass" (the deployed control-center config — same bot_id="base" process, no separate bot). Only that bot handles these commands; branch bots fall through to the normal command set.
What ships with it
56 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- __init__.py 0 B runs code
- apps/__init__.py 232 B runs code
- apps/handlers/__init__.py 1.6 KB runs code
- apps/handlers/base_bot.py 163 KB runs code
- apps/handlers/bot_factory.py 24 KB runs code
- apps/handlers/bot_operations.py 6.6 KB runs code
- apps/handlers/bot_registry.py 9.7 KB runs code
- apps/handlers/botfather_client.py 18 KB runs code
- apps/handlers/branch_plugin.py 3.8 KB runs code
- apps/handlers/config.py 6.5 KB runs code
- apps/handlers/file_handler.py 6.3 KB runs code
- apps/handlers/log_streamer.py 14 KB runs code
- apps/handlers/notifier.py 3.3 KB runs code
- apps/handlers/prax_monitor_bot.py 6.8 KB runs code
- apps/handlers/remote_control.py 12 KB runs code
- apps/handlers/response_router.py 10 KB runs code
- apps/handlers/scheduler_bot.py 7.6 KB runs code
- apps/handlers/telegram_standards.py 11 KB runs code
- apps/handlers/tmux_manager.py 6.5 KB runs code
- apps/handlers/user_message_relay.py 9.2 KB runs code
- apps/modules/__init__.py 385 B runs code
- docs/suspend_lock_deployment.md 14 KB
- handler.py 5.5 KB runs code
- TELEGRAM_PORT_MAP.md 53 KB
- [email protected] 1.0 KB
- telethon_auth.py 2.0 KB runs code
- tests/__init__.py 0 B runs code
- tests/conftest.py 4.8 KB runs code
- tests/test_attach_only.py 12 KB runs code
- tests/test_bot_registry.py 22 KB runs code
- tests/test_botfather_client.py 32 KB runs code
- tests/test_control_verbs.py 17 KB runs code
- tests/test_handler_routing.py 7.5 KB runs code
- tests/test_heartbeat_delivered.py 14 KB runs code
- tests/test_inbound_reliability.py 6.6 KB runs code
- tests/test_log_streamer.py 28 KB runs code
- tests/test_logs.py 18 KB runs code
- tests/test_mirror_session.py 18 KB runs code
- tests/test_monitor.py 23 KB runs code
- tests/test_multi_bot.py 75 KB runs code
- tests/test_multibot_config.py 38 KB runs code
- tests/test_multibot_integration.py 14 KB runs code
- tests/test_network_backoff.py 28 KB runs code
- tests/test_poll_and_gate.py 7.8 KB runs code
- tests/test_prax_monitor_bot.py 15 KB runs code
- tests/test_presence_pointer.py 24 KB runs code
- tests/test_rc_verb.py 22 KB runs code
- tests/test_relay_switch_gate.py 8.7 KB runs code
- tests/test_response_router.py 33 KB runs code
- tests/test_scheduler_bot.py 15 KB runs code
- tests/test_slash_relay.py 24 KB runs code
- tests/test_status_reset.py 8.3 KB runs code
- tests/test_stop_verb.py 12 KB runs code
- tests/test_streaming.py 22 KB runs code
- tests/test_suspend.py 52 KB runs code
- tests/test_user_message_relay.py 24 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 168 lines · 17 tokens per session scan B 99ab8f1c12f8
telegram is a skill published in the GitHub repository AIOSAI/AIPass (273 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 4,430 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
c-telegram
Bidirectional Telegram bridge — talk to Claude from your phone. Built into OpenPaw.
chatwork-tool
Chatwork integration tool for send/receive messages, search, unreplied checks, and room listing. Use when: posting to Chatwork, listing rooms, checking unreplied threads, searching messages, or handling mentions.
discord-tool
Discord integration tool for messaging, search, guild and channel listing, and reactions. Use when: posting to Discord, listing channels, searching messages, or adding reactions in guilds.
slack-tool
Slack integration tool for send/receive messages, search, unreplied checks, channel listing, and emoji reactions. Use when: posting to Slack, listing channels, replying in threads, checking unreplied items, or adding reactions.
gmail-tool
Gmail integration tool for unread checks, reading bodies, and drafts via OAuth2 Gmail API access. Use when: reading inbox mail, fetching message bodies, writing drafts, or searching labeled mail.
add-telegram-api-action
Adds a new Telegram Bot API method (action class and top-level functions). Use when implementing a new Telegram API endpoint, adding support for a specific method (e.g. sendVideoNote, getChatMemberCount), or creating a new action for the telegram-bot library.