Installable skillMIT

Telegram Telethon Skill

Full Telegram automation via Telethon for chat monitoring, daemon mode, message operations, and Telegram-triggered session workflows.

BY MichaelunkaiUPDATED Oct 27, 2026
INTENDED FOR◈OpenClawInstall in a listed agent.

instructions.md

---
name: telegram-telethon
description: Full Telegram automation via Telethon for chat monitoring, daemon mode, message operations, and Telegram-triggered session workflows.
license: MIT
metadata:
  source_repo: glebis/claude-skills
  upstream_path: telegram-telethon
---

# Telegram Telethon Skill

Use this skill for comprehensive Telegram automation via the installed `telegram-telethon` package.
It covers chat listing, recent message fetches, search, unread handling, send/edit/delete/forward,
draft workflows, daemon mode, media download, transcription, channel publishing, and Telegram-triggered
session workflows.

## Installed Layout

- Skill root: `C:\Users\micha\.codex\skills\telegram-telethon`
- CLI scripts:
  - `C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py`
  - `C:\Users\micha\.codex\skills\telegram-telethon\scripts\tgd.py`
- Package import root:
  - `C:\Users\micha\.codex\skills\telegram-telethon\src\telegram_telethon`

The package is installed in editable mode on this machine, so the CLI scripts can import the package directly.

## Intent Rules

- If the user explicitly says `draft`, create or update a draft instead of sending.
- If the user explicitly says `send`, send the message.
- If the user asks to write a message without clearly saying `draft` or `send`, clarify before sending.

## First Checks

Run these before deeper Telegram work:

```bash
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py status
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py list
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tgd.py status
```

If the config is missing, use:

```bash
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py setup
```

## Common Commands

```bash
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py recent "Chat Name" --limit 20
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py search "query"
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py unread
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py send --chat "Chat Name" --text "Message text"
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py draft --chat "Chat Name" --text "Draft text"
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py drafts
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py download "Chat Name" --limit 5
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tgd.py start --foreground
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tgd.py logs
```

## Publish And Lint

```bash
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py publish --draft "path-to-draft.md" --dry-run
python C:\Users\micha\.codex\skills\telegram-telethon\scripts\tg.py lint-channel --chat "@channel"
```

## Verification

When you rely on this skill, prefer this verification order:

1. CLI help or status command succeeds.
2. Package import works.
3. Unit tests pass when relevant:

```bash
python -m pytest C:\Users\micha\.codex\skills\telegram-telethon\tests\unit -q
```

4. Only after config is present, perform live chat or daemon checks.

## Notes

- The upstream source repo is `glebis/claude-skills`.
- The local installed copy was normalized for Codex compatibility on Windows.
- If you need deeper reference material, inspect the local package files under the installed skill root instead of assuming Unix paths.
COMPATIBILITY & REFERENCES

Platform guidance

Imported from the listed AgentSkill.sh category. Complete supplied package files and notices are retained. Includes source scripts; review them before use. Required external tools and credentials are not installed. No bundled code was executed during import. Individual agent task behavior has not been tested.