Posts a long or sensitive Telegram message to Saved Messages for user review, editing, and copy-paste before sending. Bypasses cloud draft race conditions.
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.
Send a message to the user's Saved Messages so the user can review it, optionally edit it, then copy-paste it into the target chat's compose area before sending. Saved Messages is every Telegram account's built-in private chat with itself — it syncs across all clients automatically.
Why Saved Messages, not MTProto cloud drafts? The official Telegram clients have a known unfixed race condition (tdesktop#29111, closed "not planned") where the local empty-draft state silently overwrites cloud drafts pushed via
SaveDraftRequestfrom another authorization. We observed this in practice: the server confirmed the draft, but the user's compose area stayed empty. Saved Messages bypasses this entirely — full HTML formatting is preserved, and Telegram's native copy-paste between compose areas preserves rich text across iOS, Android, Desktop, and Web.
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.
The draft carries a session footer (project policy). The body posted to Saved Messages gets the provenance footer appended, so when the user copy-pastes it into the target chat the session reference travels with it — the intended behavior. Suppress with
--no-footer, override the label with--context. See send-message.
Links are made exact (automatic). Each bare link in the draft gets an explicit link that ends where its URL ends, so it never swallows the Chinese text after it, and the command exits 1 if Telegram stored one that does. See send-message.
Linked text, not bare links (enforced). A draft whose visible text shows a
github.comURL or a bare#N/repo#Nis refused unless--show-urlis given; write<a href="https://github.com/example/repo/issues/36">Title (#36)</a>with--html. Other hosts are only advised against. See send-message.
| Situation | Use |
|---|---|
| Long or multi-paragraph message an agent composed autonomously | Draft — let the human eyeball it before it lands |
| Message carries sensitive wording (hiring, firing, contract terms) | Draft — one typo or wrong name is expensive |
| Reply where tone matters (addressing a peer or an external party) | Draft — AI-generated tone can be subtly off |
| Short confirmations, status updates, routine responses | Send — friction of drafting exceeds value |
| Automated notifications, alerts, scheduled pings | Send — no human-in-the-loop needed |
| Time-critical message where draft→review→send round-trip is too slow | Send — accept the risk |
Default when uncertain: draft. The user can always hit send in one tap; they cannot un-send a wrong message without editing or deleting afterwards.
Before drafting, verify the session is authorized (not just that the file exists):
bun "$SCRIPT" check-auth
If EXPIRED, run /tlg:setup first.
/usr/bin/env bash << 'DRAFT_EOF'
ROOT="$(cc-plugin-root tlg)"
SCRIPT="$ROOT/scripts/tg-cli.ts"
# Draft a plain-text message labelled for a group
bun "$SCRIPT" draft -1003958083153 "Plain text draft goes here"
# Draft an HTML-formatted message
bun "$SCRIPT" draft --html -1003958083153 "<b>Bold heading</b>
Body text with <code>inline code</code> and <a href=\"https://github.com/example/repo/pull/2\">一个标题 (#2)</a>."
# Draft labelled for a user
bun "$SCRIPT" draft @someusername "Quick question: does this framing land right?"
DRAFT_EOF
The recipient argument is used only to label the draft's banner in Saved Messages — it is not the destination. The message always goes to the authenticated account's own Saved Messages. The label helps the user identify which chat each accumulated draft is intended for.
Two messages are sent per draft:
<b>Draft → <chat name></b> (falls back to the raw recipient identifier if the chat name cannot be resolved)Keeping the header separate lets the user long-press only the body, tap Copy, and paste cleanly into the target chat's compose area without having to trim the banner.
<chat name> saved to your Saved Messages. Open Saved Messages → long-press the body → Copy → paste into the target chat's compose area → review → send."Drafts are your reviewer safety net — a deliberate pause between AI authorship and human publication.
| Parameter | Type | Description |
|---|---|---|
| recipient | string/int | Target chat ID/username — used only to label the Saved Messages banner |
| message | string | Draft text (required) |
--html | flag | Parse message as HTML (bold/code/links) |
--show-url | flag | Allow a bare GitHub URL or #N in the visible text (refused otherwise) |
-p/--profile | string | Account profile (eon default) |
draft call sends a new (header, body) pair to Saved Messages. Older drafts remain visible above — the user can mentally track which is latest by position.━━━━━━━━━━━━━━ separators, then paragraph breaks, then line breaks. Each continuation part is labelled <i>(Part N/M)</i>. See send-message SKILL.md "Auto-split for long messages" for the full algorithm.SaveDraftRequest unreliable.| Anti-Pattern | Why It Fails |
|---|---|
| Drafting when the message is short and boilerplate | Wastes the user's time — they could send directly and edit in the compose area |
| Drafting many messages in rapid succession | Saved Messages becomes a wall of stale drafts; hard to tell which is current |
| Using draft for time-critical alerts (downtime, outages) | User may not open Saved Messages until hours later |
| Claiming a draft was "sent to the group" | Be explicit: "Draft saved to Saved Messages for your review" vs. "Message sent" |
| Forgetting to tell the user to paste into the target chat | The draft sits in Saved Messages forever if the user doesn't know the next step |
| Error | Cause | Fix |
|---|---|---|
Cannot find any entity | Bad username/chat ID | Label falls back to raw identifier — draft still saves to Saved Messages |
Session expired | Session no longer valid | Run /tlg:setup |
send-message — use when no human review is needed; includes edit-vs-supplement discipline for already-sent messagesdraft-message (this) — use when human review IS needed before sendsearch-messages — useful for checking existing chat context before drafting a replyAfter this skill completes, check before closing:
Only update this SKILL.md if the issue is real and reproducible.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
/tlg:draft-messagefrom tlg
npx claudepluginhub terrylica/cc-skills --plugin tlg16 skills in this plugin
/cleanup-deleteduser wants to clean up Telegram by purging deleted or ghost accounts from their dialog list and contacts, or removing spam ghosts that clutter./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./dump-channeluser wants to archive, dump, or back up an entire Telegram channel or chat history to NDJSON with all media files downloaded. Full history./find-userUse when user wants to find, look up, or resolve a Telegram user by username, phone number, or ID, or get someone's Telegram profile info.