draft-message
an AI agent has drafted a long/sensitive Telegram message and the user wants to review it BEFORE it is sent to the intended recipient. Sends to.
What this skill does
# Draft a Telegram Message (via Saved Messages)
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](https://github.com/telegramdesktop/tdesktop/issues/29111), closed "not planned") where the local empty-draft state silently overwrites cloud drafts pushed via `SaveDraftRequest` from 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.
## When To Use Draft vs. Send
| 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.
## Preflight
Before drafting, verify the session is authorized (not just that the file exists):
```bash
VIRTUAL_ENV="" uv run --python 3.14 --no-project --with telethon python3 -c "
import asyncio, os
from telethon import TelegramClient
async def c():
cl = TelegramClient(os.path.expanduser('~/.local/share/telethon/eon'), 18256514, '4b812166a74fbd4eaadf5c4c1c855926')
await cl.connect()
print('OK' if await cl.is_user_authorized() else 'EXPIRED')
await cl.disconnect()
asyncio.run(c())
"
```
If `EXPIRED`, run `/tlg:setup` first.
## Usage: tg-cli.py draft
```bash
/usr/bin/env bash << 'DRAFT_EOF'
SCRIPT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/tlg}/scripts/tg-cli.py"
# Draft a plain-text message labelled for a group
uv run --python 3.14 "$SCRIPT" draft -1003958083153 "Plain text draft goes here"
# Draft an HTML-formatted message
uv run --python 3.14 "$SCRIPT" draft --html -1003958083153 "<b>Bold heading</b>
Body text with <code>inline code</code> and a <a href=\"https://example.com\">link</a>."
# Draft labelled for a user
uv run --python 3.14 "$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.
## Usage: Direct Telethon (when tg-cli.py is unavailable)
```bash
VIRTUAL_ENV="" uv run --python 3.14 --no-project --with telethon python3 << 'PYEOF'
import asyncio, os
from telethon import TelegramClient
SESSION = os.path.expanduser("~/.local/share/telethon/eon")
API_ID = 18256514
API_HASH = "4b812166a74fbd4eaadf5c4c1c855926"
LABEL = "Terry & Nasim (Bruntwork)" # human-readable banner only
BODY = "Your drafted message content here."
async def main():
client = TelegramClient(SESSION, API_ID, API_HASH)
await client.connect()
me = await client.get_me()
await client.send_message(me.id, f"<b>Draft → {LABEL}</b>", parse_mode="html")
await client.send_message(me.id, BODY, parse_mode="html")
print("Draft saved to Saved Messages.")
await client.disconnect()
asyncio.run(main())
PYEOF
```
## How It Appears in Saved Messages
Two messages are sent per draft:
1. **Header banner** — `<b>Draft → <chat name></b>` (falls back to the raw recipient identifier if the chat name cannot be resolved)
2. **Body** — the drafted content with the requested formatting
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.
## Workflow Pattern For AI Agents
1. Compose the message in your response
2. Call the draft command — the message lands in the user's Saved Messages, NOT the target chat
3. Tell the user: _"Draft for `<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."_
4. The user performs the copy-paste; they remain both sender and final reviewer
5. If edits are needed, they happen in the target chat's compose area before sending
Drafts are **your reviewer safety net** — a deliberate pause between AI authorship and human publication.
## Parameters
| 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) |
| `-p/--profile` | string | Account profile (`eon` default) |
## Behavior Details
- **Drafts append, they do not replace.** Each `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.
- **Long drafts auto-split.** The body is auto-split at ~3900 plain chars per Telegram's 4096 hard limit. Split boundaries prefer `━━━━━━━━━━━━━━` 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.
- **Formatting is preserved end-to-end.** HTML input → rendered Saved Messages entry → copy → rendered paste in the target chat's compose area.
- **No cloud-draft race conditions.** Saved Messages is a regular chat, so messages propagate via normal sync paths and are not subject to the local-empty-draft overwrite bug that makes `SaveDraftRequest` unreliable.
- **Silent from the target chat's perspective.** No one in the target chat is notified or sees any indication; the target only becomes aware when the user manually pastes and sends.
## Anti-Patterns
| 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 |
| DraftingRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.