telegram-cli
Skill4 starsChanged 12 days agoMITView on GitHub
Send and read Telegram messages and media from a personal Telegram user account using the bundled `telegram-cli.py` Telethon helper. Use for DM-ing a bot or user, reading recent chat history, sending images/files/voice notes, downloading voice messages, and send-and-wait bot smoke tests. Triggers on: "message @SomeBot on Telegram", "read my Telegram chat with X", "send a Telegram message/photo/voice note", "test the Telegram bot reply", "download Telegram voice messages".
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- hmjBill/skillstheir own version, first seen Nov 1, 2026
- pengelbrecht/skillstheir own version, first seen Jul 12, 2026
- miolamio/agent-skillstheir own version, first seen Mar 24, 2026
- eazieman88/ClaudeSkillstheir own version, first seen Mar 23, 2026
- miolamio/claude-skillstheir own version, first seen Mar 23, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- miolamio/claude-skills★ 28same name
- miolamio/agent-skills★ 13same name
- pengelbrecht/skills★ 1same name
- eazieman88/ClaudeSkills★ 0same name
- hmjBill/skills★ 0same 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 repository52 other files it gives its agents.
- skills/take-ownership/AGENTS.mdAGENTS.md
- blogpostSkill
- analyst-hedgefundSkill
- analyst-peter-lynchSkill
- analyst-weinsteinSkill
- app-builderSkill
- bitwarden-cliSkill
- blogpostSkill
- build-in-public-reelSkill
- chrome-devtools-remoteSkill
- chrome-useSkill
- claude-sessionsSkill
- dev-workflowSkill
- dev-workflow-supervisorSkill
- duckdns-domainSkill
- flutter-android-releaseSkill
- github-copilot-sessionsSkill
- git-worktreeSkill
- google-workspace-cliSkill
- humanize-textSkill
- hyperagent-eval-skillSkill
- job-searchSkill
- macro-panelSkill
- make-storySkill
- mermaid2excalidrawSkill
- naste-slaste-styleSkill
- no-github-backlogSkill
- no-pr-backlogSkill
- opencode-apiSkill
- opencodeSkill
- overflowSkill
- podcast-audioSkill
- prompt-hermes-aiSkill
- reportSkill
- retrospectiveSkill
- secretsctlSkill
- smart-money-signalsSkill
- solo-founder-meta-agentSkill
- solo-founderSkill
- spaceship-dnsSkill
- stocks-advisor-fastSkill
- stocks-dip-alertSkill
- stocks-reportSkill
- take-ownership-meta-agentSkill
- take-ownershipSkill
- telegram-cliSkill
- tradingview-newsSkill
- vercel-lfsSkill
- whale-options-flowSkill
- write-agents-mdSkill
- write-skillSkill
- yc-pitch-deckSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
Prefer ask over send whenever you need to confirm a bot replied — it captures the response instead of leaving you to poll with read.
- Very specific: line 52
Use whoami to confirm *which* account a session belongs to before sending anything — it prints id, username, phone, name, premium/bot …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
telegram-cli
Drive Telegram from a personal user account (not a bot account) via a Telethon-backed CLI — message bots and users, read history, exchange media, and run send-and-wait QA checks without opening the Telegram app.
The bundled script lives next to this file: {baseDir}/telegram-cli.py ({baseDir} = this skill's directory). Run it with python3. Telethon must be installed (pip install telethon).
Commands
target is a username (@SomeBot) or numeric Telegram ID for every command.
# Show which account the current session is logged in as
"{baseDir}/telegram-cli.py" whoami
"{baseDir}/telegram-cli.py" whoami --json
# Read recent history (default --limit 5)
"{baseDir}/telegram-cli.py" read @SomeBot --limit 10
# Send a text message
"{baseDir}/telegram-cli.py" send @SomeBot "Hello"
# Send and wait for the reply — the command for bot testing (default --wait 30s)
"{baseDir}/telegram-cli.py" ask @SomeBot "What can you do?" --wait 30
# Send media (--caption optional)
"{baseDir}/telegram-cli.py" send-image @SomeBot ./avatar.png --caption "Test"
"{baseDir}/telegram-cli.py" send-file @SomeBot ./report.pdf --caption "Latest"
"{baseDir}/telegram-cli.py" send-voice @SomeBot ./note.ogg --caption "Update"
# Download recent voice notes (--limit to save, --scan history depth, --out-dir target)
"{baseDir}/telegram-cli.py" get-voice @SomeBot --limit 3 --scan 50 --out-dir ./downloadsPrefer ask over send whenever you need to confirm a bot replied — it captures the response instead of leaving you to poll with read. Use .ogg/Opus for send-voice so Telegram renders a true voice note rather than an audio file.
First-time login
The session must exist before any other command works.
"{baseDir}/telegram-cli.py" login # interactive: asks phone + code
"{baseDir}/telegram-cli.py" login --phone +15551234 # pre-seed phone; only the code is askedRe-run login whenever a command reports session not authenticated.
Use whoami to confirm which account a session belongs to before sending anything —
it prints id, username, phone, name, premium/bot flags, and the resolved
profile / session_path. Exit code 0 = authorized, 1 = not logged in.
$ TELEGRAM_PROFILE=dev "{baseDir}/telegram-cli.py" whoami
authorized : True
id : 6668889106
username : @someuser
phone : +15551234567
first_name : Den
profile : dev
session_path : /Users/me/.config/telethon/dev/session.datThe tool auto-migrates the session DB schema to match the installed Telethon version
(Telethon 1.43+ adds a tmp_auth_key column that 1.40.x can't read). This is transparent
and crash-safe. If you ever hit a persistent SQLite / too many values to unpack error on
connect, delete the session file (~/.config/telethon/<profile>/session.dat.session) and
re-run login.
Multiple accounts (profiles)
Each profile is an isolated account with its own session file. Set the profile env var on every command for that account — login, send, read, ask, and media commands alike — or the command silently targets the default account.
# Directory-path profile (recommended): session stored at <dir>/session.dat
TELEGRAM_CLI_PROFILE=~/.config/telegram/2 "{baseDir}/telegram-cli.py" login --phone +15551234
TELEGRAM_CLI_PROFILE=~/.config/telegram/2 "{baseDir}/telegram-cli.py" ask @SomeBot "/status" --wait 20
# Short-name profile: session at ~/.config/telethon/<name>/session.dat
TELEGRAM_PROFILE=dev "{baseDir}/telegram-cli.py" send @SomeBot "Hi from dev account"Session selection, most specific wins:
TELEGRAM_SESSION_PATH (explicit file) → TELEGRAM_CLI_PROFILE (dir → <dir>/session.dat) → TELEGRAM_PROFILE (name → ~/.config/telethon/<name>/session.dat) → default ~/.config/telethon/session.dat.
Other env vars (defaults baked into the script, rarely changed): TELEGRAM_API_ID, TELEGRAM_API_HASH.
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
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.

