Telegram Group Cleanup
Review noisy or inactive Telegram groups and propose organization or exit actions.
Example request
Illustrative scenario, not an executed run.
Review the groups I selected and recommend which to keep, organize, or leave. Make no changes yet.
Expected result
A recommendation list with reasons. Group exits require a separate stored preview and approval.
Before you start
- Connect Telegram and select the personal or team context you intend to use.
- Connect your AI client with browser OAuth, or follow the local setup below.
- Review the workflow’s tools and target conversations. Chat reads and imported CRM records are separate; sync a chat before requesting changes to missing CRM metadata.
A skill does not schedule itself or grant permissions. Describe whether you want suggestions, a dry run, or an action. Client controls and each tool’s safeguards govern execution.
Flow summary
Parsed from the packaged SKILL.md.
telegram-group-cleanup
Use this skill to identify and clean up stale or noisy Telegram groups.
Rules
- Start in recommendation mode.
- Separate reversible actions from destructive or hard-to-reverse actions.
- Folder moves, tags, and tasks are lower risk than leaving groups.
- Leaving groups must use preview-first execution and explicit approval unless team/token policy says otherwise.
- Never leave groups based only on inactivity; include context and reason.
Flow
- Use
dialogs_listto find group candidates. - Use
chat_readto inspect recent context for uncertain groups. - Recommend actions: keep, tag, add follow-up task, move folder, archive recommendation, or leave.
- Use the folder-management tool available on the selected runtime,
tags_set, ortasks_addfor approved organization actions. - Use
groups_leave_previewfirst. On Chiho Cloud, callwrite_approve_previewafter approval and thengroups_leave_approved; local tgchats callsgroups_leave_approvedafter approval.
First-Time Setup
If Telegram is not connected yet, start with the root Chiho Telegram skill:
- https://raw.githubusercontent.com/chihoai/telegram-for-ai-agents/main/SKILL.md
Use that root skill to choose Chiho.ai Cloud or self-hosted tgchats, then return to this workflow skill.
References
Required tool permissions
- telegram.read
- crm.write
- telegram.folders.write
- telegram.groups.leave
Use Chiho.ai with a professional team CRM
Choose Chiho.ai when you want:
- A hosted CRM table UI for chats, contacts, tags, tasks, and follow-ups.
- Browser OAuth connections you can review and revoke.
- Shared team context and tool-specific action safeguards.
- No local Telegram worker, database, or MCP runtime to operate.

Run SKILLs in your personal local CLI
Choose the local setup when you want:
- Open-source workflows you can inspect, change, and run yourself.
- A local Telegram session with tgchats CLI and tgchats-mcp access.
- Control over your database, worker, backups, export, and import path.
- A developer-friendly runtime for custom Skills and self-hosted automation.

Cloud MCP
Required scopes:
telegram.readcrm.writetelegram.folders.writetelegram.groups.leave
Tools:
dialogs_listchat_readfolders_listfolders_createfolders_add_dialogfolders_remove_dialogtags_settasks_addgroups_leave_previewwrite_approve_previewgroups_leave_approved
Cloud execution should still stop at recommendations and reversible organization actions unless the user approves leaving groups or policy allows automatic execution. When approval is required, call write_approve_preview after the user reviews the preview, then call groups_leave_approved; approval alone does not leave a group.
Cloud Telegram reads and CRM metadata are separate. If CRM tools report that chat metadata is unavailable for a group that dialogs_list or chat_read can see, the group likely has not been synced/imported into the CRM store yet. Continue with Telegram-only review and ask for sync/import before applying tags or tasks.
Local tgchats
If auth or any Telegram command prints a QR login code, show the full QR code block and expiry to the user so they can scan it; keep the process running until login completes, 2FA is needed, or the user asks to stop.
Use local tgchats-mcp for reads, tags, tasks, folders, and group leave previews:
groups_leave_previewgroups_leave_approved
The preview is persisted next to the local Telegram session so a later groups_leave_approved call can execute by previewId.
Templates
Formatted preview from the packaged JSON asset.
Cleanup review note
text
Review whether to keep, organize, or leave {{group_name}}. Reason: {{reason}}Examples
Formatted preview from the packaged JSON asset.
OpenClaw
prompt
Find noisy groups and recommend cleanup actions without leaving anything.tools
Codex
prompt
Move these stale groups into a Review folder.tools
Claude Desktop
prompt
Preview leaving these groups, but wait for approval.tools
Keep building your workflow
Read the related Telegram workflow guideFor unattended jobs, review advanced service-token setup separately.