telegram-userbot

telegram-userbot is a skill for Claude Code, Codex from smixs/iva-agent. It costs 144 tokens per session (1,232 once invoked), scanned A, original, MIT.

A skill for connecting to and working through the owner's personal Telegram account, rather than a Telegram bot. It can read personal chats, search messages, and send messages as the account owner after setup and consent.

In plain words
What is it for?
Use it for reading private chats, searching the owner's messages, replying to people, forwarding messages, or connecting the personal Telegram account.
Why use it?
It provides access to conversations and actions that a bot account cannot perform. Using personal-account automation can violate Telegram's terms and may put the account at risk.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/smixs/iva-agent/telegram-userbot
Any agent
npx skills add smixs/iva-agent --skill telegram-userbot
Clone the repo
git clone --depth 1 https://github.com/smixs/iva-agent

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for telegram-userbot

README.md
[![agentmods](https://agentmods.dev/badge/skills/smixs/iva-agent/telegram-userbot.svg)](https://agentmods.dev/skills/smixs/iva-agent/telegram-userbot)
Your own site
<a href="https://agentmods.dev/skills/smixs/iva-agent/telegram-userbot"><img src="https://agentmods.dev/badge/skills/smixs/iva-agent/telegram-userbot.svg" alt="Measured on agentmods" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,232 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00144 $0.01232
Opus 5 $0.00072 $0.00616
Sonnet 5 $0.00029 $0.00246
Haiku 4.5 $0.00014 $0.00123

Measured 6d ago against content hash 5a36359580ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

telegram-userbot scanned grade A with 0 findings 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent/skills/telegram-userbot/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

telegram-userbot

Доступ к личному Telegram-аккаунту владельца (Telethon, MTProto) — отдельный аккаунт-человек, НЕ бот, через которого ты сейчас общаешься. Всё делается ТОБОЙ прямо в этом чате: настройку ты проводишь сам (через bash-тул на хосте), а работу — через MCP-тулы connection__telegram-userbot__<tool> (ищи их через connection_search). Пользователь только пишет в чат — терминал он не трогает.

⚠️ Сначала — предупреди и получи согласие

Автоматизация личного аккаунта нарушает ToS Telegram и может привести к бану аккаунта (особенно отправка). Одной фразой скажи владельцу, что это на его страх и риск и что безопаснее всего только чтение. Продолжай, только если он согласился.

Шаг 1. Подключён ли аккаунт?

Вызови login_status.

  • connected → всё готово, переходи к работе (Шаг 4).
  • not_connected → нужен онбординг (Шаг 3), но сперва проверь, поднят ли прокси (Шаг 2).
  • Если сам вызов падает (сервер недоступен) → прокси ещё не установлен, иди в Шаг 2.

Шаг 2. Поднять прокси (первый раз, делаешь ты через bash)

Прокси — opt-in Python-сервис; при первом подключении подними его сам.

  1. Проверь: iva userbot status.
  2. Нужны api_id / api_hash с my.telegram.org. Проведи владельца: «Открой https://my.telegram.orgAPI development tools → создай приложение (название любое, платформа Desktop) → пришли мне api_id и api_hash». Дождись, пока он пришлёт оба в чат.
  3. Запиши ключи (через stdin, БЕЗ утечки в список процессов):
    iva userbot creds <<'CREDS'
    <api_id>
    <api_hash>
    CREDS
    
  4. Подними прокси (сборка venv может занять ~1–2 мин — ставь timeoutMs ≥ 300000):
    iva userbot setup
    
    Команда соберёт окружение, создаст токен и запустит сервис. iva перезапускать НЕ нужно. Если iva не найден — запусти из каталога установки: node bin/iva.mjs userbot setup.

Шаг 3. Онбординг по QR (в чате)

  1. Вызови qr_login_start. Сервер отрисует QR и сам пришлёт его картинкой в этот чат. (Если сразу после setup вызов не прошёл — прокси ещё поднимается, повтори через несколько секунд.)
  2. Скажи владельцу: открой приложение Telegram того аккаунта, который подключаешь → Настройки → Устройства → Подключить устройство → отсканируй QR.
  3. Опрашивай qr_login_status раз в несколько секунд:
    • authorized → готово.
    • password_needed → включена двухфакторка. Попроси у владельца пароль и передай в qr_login_password. Предупреди: пароль пройдёт через чат — пусть сменит его потом, если переживает. Не логируй и не повторяй пароль в ответах.
    • waiting → ещё не отсканировал, подожди.
    • expired / error → начни заново с qr_login_start, объясни причину.

Read the full file on GitHub · 80 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 6d ago First seen · 80 lines · 144 tokens per session scan A 5a36359580ee

Subscribe to this mod's changes

telegram-userbot is a skill published in the GitHub repository smixs/iva-agent (201 stars, last pushed yesterday), licensed MIT. It adds 144 tokens to every session and 1,232 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.