agentleFS
schenkei-codeschenkei-code/telegram-unleashed/skills/account/SKILL.md

account

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Connect the user's own Telegram account (MTProto) so the bridge can fetch files past the 20 MB Bot API cap. Use when a download failed with "file is too big", when the user asks to set up the account fallback, or says "/telegram-unleashed:account".

  • Reads credentials
  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. sonilo-ai/skills★ 117same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

Files
SKILL.md

Account fallback — files past 20 MB

Telegram caps bot downloads at 20 MB. A logged-in user account has no such cap. This skill connects the user's own account once; afterwards download_attachment falls back to it automatically whenever the Bot API refuses a file.

What the agent does vs. what the user does

The login is interactive — Telegram texts a code to the account and may ask a 2FA password. The agent never runs the login itself; it prepares the command and the user runs it in their terminal (! <command> in Claude Code).

Setup

  1. Check Python + Telethon (agent may do this): python -c "import telethon; print(telethon.__version__)" — if missing: pip install telethon
  2. API credentials (user): https://my.telegram.org → API development tools → create an app → note api_id and api_hash. These identify the application, not the login; they are not secret enough to panic over but belong in the channel .env, not in a repo.
  3. Login (user, in their own terminal):
    python <plugin>/scripts/mtproto_login.py <api_id> <api_hash> <phone> ~/.claude/channels/telegram/mtproto
    Telegram sends a code; enter it (and the 2FA password if asked). This writes ~/.claude/channels/telegram/mtproto.session.
  4. Wire it up (agent): add to ~/.claude/channels/telegram/.env:
    TELEGRAM_MTPROTO_SESSION=C:/Users/<you>/.claude/channels/telegram/mtproto
    TELEGRAM_MTPROTO_API_ID=<api_id>
    TELEGRAM_MTPROTO_API_HASH=<api_hash>
    TELEGRAM_MTPROTO_PYTHON=<python path, optional — default "python">
    (Session path without the .session extension.)
  5. Restart the bridge (user: /mcp reconnect or /reload-plugins), then send a >20 MB video and call download_attachment — it should land in the inbox via the fallback.

How the fallback matches files

Bot-API file_ids mean nothing to MTProto and the two number messages differently. The helper finds the file by chat + size (+ name) among the last 50 messages of the same chat — exact size match, newest first.

Security notes

  • The session file is the account login. It stays in the channel state directory (outside any repo), same protection level as the bot token.
  • The fallback only ever downloads from chats the bridge already saw the attachment in — it sends nothing and reads nothing else.
  • Revoke anytime: Telegram → Settings → Devices → terminate that session.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.