From tlg
user wants to clean up Telegram by purging deleted or ghost accounts from their dialog list and contacts, or removing spam ghosts that clutter.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tlg:cleanup-deletedThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scan and purge deleted/ghost accounts from your Telegram dialog list and contacts. These are accounts that were deleted by their owners or banned by Telegram but still appear as "Deleted Account" in your chat list.
Scan and purge deleted/ghost accounts from your Telegram dialog list and contacts. These are accounts that were deleted by their owners or banned by Telegram but still appear as "Deleted Account" in your chat list.
The script uses 3 progressively aggressive deletion methods because Telegram's dialog cache can be stubborn:
After the first pass, it re-scans for survivors and retries with method 3.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
~/.local/share/gramjs/<profile>.session
/tlg:setup first/usr/bin/env bash << 'EOF'
SCRIPT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/tlg}/scripts/cleanup_deleted.ts"
# Scan only (no deletions)
bun "$SCRIPT" --dry-run
# Clean all profiles
bun "$SCRIPT"
# Clean specific profile
bun "$SCRIPT" -p eon
# Clean multiple specific profiles
bun "$SCRIPT" -p eon missterryli
EOF
| Parameter | Type | Description |
|---|---|---|
-p/--profile | list | Profiles to clean (default: all) |
--dry-run | flag | Scan and report without deleting |
| Source | Action |
|---|---|
| Regular dialogs | Deleted user chats removed |
| Archived dialogs (folder=1) | Deleted user chats removed |
| Contact list | Deleted contacts removed |
| Stubborn ghosts | Block+unblock forces cache reset, then delete |
Run monthly or whenever you notice "Deleted Account" entries appearing in your chat list. Spam accounts that message you and later get banned by Telegram are the primary source.
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
npx claudepluginhub terrylica/cc-skills --plugin tlguser wants to list all Telegram chats, groups, and channels, see their contacts, find a chat ID, browse conversations, or check account info via.
Controls a personal Telegram account via MTProto (Telethon): list/search chats, read/summarize history, send/reply/forward/edit/delete/react to messages, download media, mark read, join/leave groups, and post in forum topics.
Exports, imports, and looks up Telegram contacts by username or phone number. Outputs CSV or JSON with optional message details.