# Send Telegram Media Resolver to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "tg-media-resolve",
    "name": "Telegram Media Resolver",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/kurinzo/tg-media-resolve",
    "canonicalUrl": "https://clawhub.ai/kurinzo/tg-media-resolve",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/tg-media-resolve",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tg-media-resolve",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/fetch_media.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "tg-media-resolve",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-09T19:45:20.339Z",
      "expiresAt": "2026-05-16T19:45:20.339Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tg-media-resolve",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tg-media-resolve",
        "contentDisposition": "attachment; filename=\"tg-media-resolve-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "tg-media-resolve"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/tg-media-resolve"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/tg-media-resolve",
    "downloadUrl": "https://openagent3.xyz/downloads/tg-media-resolve",
    "agentUrl": "https://openagent3.xyz/skills/tg-media-resolve/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tg-media-resolve/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tg-media-resolve/agent.md"
  }
}
```
## Documentation

### 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 image tool or exec

### 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_id and message_id from 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 image tool 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-to with a private chat (e.g. bot owner's DM) to avoid visible forwards in group chats
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: kurinzo
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-09T19:45:20.339Z
- Expires at: 2026-05-16T19:45:20.339Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/tg-media-resolve)
- [Send to Agent page](https://openagent3.xyz/skills/tg-media-resolve/agent)
- [JSON manifest](https://openagent3.xyz/skills/tg-media-resolve/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/tg-media-resolve/agent.md)
- [Download page](https://openagent3.xyz/downloads/tg-media-resolve)