tg-rich-send
Send a Markdown document or message to the user's Telegram through the ~/dev/scripts/tg-rich CLI (Bot API sendRichMessage, rich markdown style, RTL, automatic fence-aware chunking). Use when the user asks to send something "به تلگرام", "to telegram", "vasam befrest", or wants a long markdown analysis/report delivered to their Telegram.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- tg-rich-send
- description
- Send a Markdown document or message to the user's Telegram through the ~/dev/scripts/tg-rich CLI (Bot API sendRichMessage, rich markdown style, RTL, automatic fence-aware chunking). Use when the user asks to send something "به تلگرام", "to telegram", "vasam befrest", or wants a long markdown analysis/report delivered to their Telegram.
03 SKILL.md 正文
tg-rich-send
Send Markdown to the user's Telegram. All logic (env, chunking, retries) lives in the script — call it, do not re-implement it.
Quick start
python3 ~/dev/scripts/tg-rich FILE.md # send a file
cat doc.md | python3 ~/dev/scripts/tg-rich - # send stdin
python3 ~/dev/scripts/tg-rich FILE.md --dry-run # preview chunking only
Write the Markdown to a temp file first if it only exists in the conversation
(/tmp/opencode/ is the approved scratch dir).
What the script does
- Reads
TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_IDfrom env or~/dev/.env - Sends via
sendRichMessagewithrich_message.markdown(rich markdown style:#headings,>quotes, lists,---dividers, ``` fences) andis_rtl: true - Chunks at top-level
---boundaries, never inside code fences (limit 3900 chars) - Prints
part i/N: ok=True · message_id=...per chunk; exits non-zero on failure
Flags
| Flag | Effect |
|---|---|
--dry-run |
show chunk sizes without sending |
--no-rtl |
left-to-right (English/LTR-only content) |
--limit N |
chunk size in chars |
--chat ID |
override chat id |
Notes
- On failure the script prints the Telegram API error body — report it verbatim.
- Missing env → check
~/dev/.env; do not hard-code the token anywhere. - Order of chunks is preserved; tell the user how many parts were sent.
04 同仓库更多 Skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
claude-api
暂无简介
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.