Scans and purges deleted/ghost accounts from Telegram dialog list and contacts using multiple deletion methods. Run monthly or when 'Deleted Account' entries appear.
Ships in tlg. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole 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.
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'
ROOT="$(cc-plugin-root tlg)"
SCRIPT="$ROOT/scripts/cleanup_deleted.ts"
# Scan only (no deletions)
bun "$SCRIPT" --dry-run
# Clean all profiles
bun "$SCRIPT"
# Clean specific profile
bun "$SCRIPT" -p work
# Clean multiple specific profiles
bun "$SCRIPT" -p work personal
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.
What SKILL.md sets; muted values are Claude Code's defaults
/tlg:cleanup-deletedfrom tlg
npx claudepluginhub terrylica/cc-skills --plugin tlg16 skills in this plugin
/create-groupUse when user wants to create a new Telegram group, supergroup, or channel, optionally inviting members on creation./delete-messagesUse when user wants to delete, remove, or unsend Telegram messages from a chat, either for everyone or just for themselves./download-mediaUse when user wants to download, save, or extract media files such as photos, videos, and documents from Telegram messages./draft-messageUse when an AI agent has drafted a long or sensitive Telegram message and the user wants to review it before sending: posts it to Saved Messages for editing and copy-paste.Other plugins' skills for the same job