tg-media-resolve
Resolve Telegram <media:image>, <media:document>, <media:video> and other media placeholders into actual files for vision/analysis. Use when a Telegram message contains a media placeholder (e.g. <media:image>) that you cannot see — typically in quoted/replied-to messages or group chat history. Downloads the media via Telegram Bot API and returns a local file path for the image tool or further processing.
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- tg-media-resolve
- description
- Resolve Telegram <media:image>, <media:document>, <media:video> and other media placeholders into actual files for vision/analysis. Use when a Telegram message contains a media placeholder (e.g. <media:image>) that you cannot see — typically in quoted/replied-to messages or group chat history. Downloads the media via Telegram Bot API and returns a local file path for the image tool or further processing.
03 SKILL.md 正文
Telegram Media Resolver
Resolves <media:*> placeholders from Telegram messages into downloadable files.
When to use
When you see <media:image>, <media:document>, <media:video>, <media:sticker>, <media:voice>, or <media:animation> in a Telegram message (especially in reply-quoted context or group history) and need to actually see/analyze the content.
How it works
- Temporarily forwards the target message via Bot API to get file metadata
- Downloads the file from Telegram servers
- Deletes the forwarded copy (cleanup)
- Returns local file path for use with
imagetool orexec
Usage
python3 scripts/fetch_media.py \
--bot-token "$BOT_TOKEN" \
--chat-id CHAT_ID \
--message-id MESSAGE_ID \
[--out /tmp] \
[--forward-to SELF_CHAT_ID]
Parameters
--bot-token— Telegram Bot API token (read from OpenClaw config:channels.telegram.botToken)--chat-id— Chat where the message lives (from message context, e.g.-1001234567890)--message-id— ID of the message containing media (from[id:XXXXX]in message context)--out— Output directory (default:/tmp)--forward-to— Chat ID for temporary forward (default: same as--chat-id). Use bot owner's DM chat ID to avoid visible forwards in groups.
Extracting parameters from message context
OpenClaw formats Telegram messages like:
[Telegram GroupName id:CHAT_ID topic:N ...] User (USER_ID): <media:image> [id:MSG_ID chat:CHAT_ID]
Extract CHAT_ID and MSG_ID from this format.
Workflow
- Extract
chat_idandmessage_idfrom the message context - Read bot token:
cat ~/.openclaw/openclaw.json | python3 -c "import sys,json; print(json.load(sys.stdin)['channels']['telegram']['botToken'])" - Run fetch script
- Use returned file path with
imagetool for vision analysis
Supported media types
Photos, documents, videos, animations (GIFs), stickers, voice messages, video notes, audio files.
Limitations
- Bot must be a member of the chat containing the target message
- Files over 20MB cannot be downloaded via Bot API
- The temporary forward may briefly appear in the forward-to chat before deletion
- Use
--forward-towith a private chat (e.g. bot owner's DM) to avoid visible forwards in group chats
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.