auth

A command for signing in to a Telegram account from an active Claude session. It guides you through the SMS code and, when needed, Telegram’s optional two-factor password.

In plain words
What is it for?
Use it to start Telegram authorization, submit the login code and two-factor password, and confirm the account’s authorized status.
Why use it?
It avoids using a terminal for an interactive login that needs user input. It also handles invalid or expired codes and checks whether the session is ready.

Command

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 commands/uri6407/claudegram/auth
Clone the repo
git clone --depth 1 https://github.com/Uri6407/claudegram
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00014 $0.00431
Opus 5 $0.00007 $0.00216
Sonnet 5 $0.00003 $0.00086
Haiku 4.5 $0.00001 $0.00043

Measured 2d ago against content hash 5f89c4050512, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

auth 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 2d 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.

Origin

This is a copy

100% identical to auth — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/auth.md · 30 lines

What it actually says

Двухшаговый интерактивный логин в Telegram прямо из активной Claude-сессии.

Шаги:

  1. Запусти mcp__plugin_claudegram_claudegram__health_check — если уже authorized: true, скажи юзеру и выйди.
  2. Иначе вызови auth_request_code() — Telegram пришлёт SMS-код на привязанный номер. Покажи юзеру phone (маскированный).
  3. Спроси у юзера код через AskUserQuestion (поле code, 5 цифр). Если в userConfig не было пароля 2FA — спроси и его (опционально).
  4. Вызови auth_submit_code(code=<код>, password_2fa=<2fa или "">).
  5. Если в ответе needs_2fa: true — спроси пароль и повтори с ним.
  6. Если в ответе error: PhoneCodeInvalidError/Expired — предложи запросить новый код через auth_request_code().
  7. После успеха вызови health_check — должен показать ok=true, authorized=true, self_id. Скажи юзеру что готово.

Важно: НЕ предлагай ! claudegram-auth через Bash — он требует интерактивного stdin, который Bash tool в Claude Code не предоставляет (commands/auth.md устаревший подход). Используй ТОЛЬКО эти MCP-tools.

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. 2d ago First seen · 30 lines · 14 tokens per session scan A 5f89c4050512

Subscribe to this mod's changes

auth is a command published in the GitHub repository Uri6407/claudegram (2 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 431 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to auth, differing in 0 lines, and is treated as a copy.