{
  "schemaVersion": "1.0",
  "item": {
    "slug": "telegram-history",
    "name": "Telegram History",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/rhlsthrm/telegram-history",
    "canonicalUrl": "https://clawhub.ai/rhlsthrm/telegram-history",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/telegram-history",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=telegram-history",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/login.py",
      "scripts/tg_history.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/telegram-history"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/telegram-history",
    "agentPageUrl": "https://openagent3.xyz/skills/telegram-history/agent",
    "manifestUrl": "https://openagent3.xyz/skills/telegram-history/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/telegram-history/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Telegram History",
        "body": "Fetch message history from any Telegram chat using MTProto (Telethon). The Bot API cannot read chat history — this skill uses the user API instead."
      },
      {
        "title": "1. Install Telethon",
        "body": "pip3 install telethon"
      },
      {
        "title": "2. Get API credentials",
        "body": "Go to https://my.telegram.org/apps and create an app. Save credentials in the skill directory:\n\ncat > <skill-dir>/api_credentials.json << 'EOF'\n{\"api_id\": YOUR_API_ID, \"api_hash\": \"YOUR_API_HASH\"}\nEOF"
      },
      {
        "title": "3. Login (one-time)",
        "body": "All paths below are relative to the skill directory.\n\n# Step 1: Request a login code (sent to your Telegram app)\npython3 scripts/login.py send +1234567890\n\n# Output: Code sent! phone_code_hash: abc123\n# Output: Run: python3 login.py verify +1234567890 <code> abc123\n\n# Step 2: Verify with the code you received\n# IMPORTANT: Do NOT send the code via Telegram — Telegram detects shared codes and blocks login.\n# Use a file, another messenger, or run the command directly in terminal.\npython3 scripts/login.py verify +1234567890 <CODE> <PHONE_CODE_HASH>\n\n# If 2FA is enabled, append your password:\npython3 scripts/login.py verify +1234567890 <CODE> <PHONE_CODE_HASH> <2FA_PASSWORD>\n\n# Check login status:\npython3 scripts/login.py check +1234567890\n\nSession persists in session/ — no need to re-login after initial setup."
      },
      {
        "title": "Usage",
        "body": "# Fetch last 50 messages from a chat\npython3 scripts/tg_history.py history <chat_id> --limit 50\n\n# Fetch from a forum topic\npython3 scripts/tg_history.py history <chat_id> --topic <topic_id> --limit 30\n\n# JSON output\npython3 scripts/tg_history.py history <chat_id> --json\n\n# Paginate (messages before a specific ID)\npython3 scripts/tg_history.py history <chat_id> --offset-id <msg_id> --limit 50"
      },
      {
        "title": "Notes",
        "body": "Group chat IDs use -100 prefix (e.g., -1001234567890)\nForum topic IDs = the thread/topic message ID\nSender names are resolved automatically\nAll paths (session, credentials) are resolved relative to the skill directory — works regardless of install location"
      }
    ],
    "body": "Telegram History\n\nFetch message history from any Telegram chat using MTProto (Telethon). The Bot API cannot read chat history — this skill uses the user API instead.\n\nSetup\n1. Install Telethon\npip3 install telethon\n\n2. Get API credentials\n\nGo to https://my.telegram.org/apps and create an app. Save credentials in the skill directory:\n\ncat > <skill-dir>/api_credentials.json << 'EOF'\n{\"api_id\": YOUR_API_ID, \"api_hash\": \"YOUR_API_HASH\"}\nEOF\n\n3. Login (one-time)\n\nAll paths below are relative to the skill directory.\n\n# Step 1: Request a login code (sent to your Telegram app)\npython3 scripts/login.py send +1234567890\n\n# Output: Code sent! phone_code_hash: abc123\n# Output: Run: python3 login.py verify +1234567890 <code> abc123\n\n# Step 2: Verify with the code you received\n# IMPORTANT: Do NOT send the code via Telegram — Telegram detects shared codes and blocks login.\n# Use a file, another messenger, or run the command directly in terminal.\npython3 scripts/login.py verify +1234567890 <CODE> <PHONE_CODE_HASH>\n\n# If 2FA is enabled, append your password:\npython3 scripts/login.py verify +1234567890 <CODE> <PHONE_CODE_HASH> <2FA_PASSWORD>\n\n# Check login status:\npython3 scripts/login.py check +1234567890\n\n\nSession persists in session/ — no need to re-login after initial setup.\n\nUsage\n# Fetch last 50 messages from a chat\npython3 scripts/tg_history.py history <chat_id> --limit 50\n\n# Fetch from a forum topic\npython3 scripts/tg_history.py history <chat_id> --topic <topic_id> --limit 30\n\n# JSON output\npython3 scripts/tg_history.py history <chat_id> --json\n\n# Paginate (messages before a specific ID)\npython3 scripts/tg_history.py history <chat_id> --offset-id <msg_id> --limit 50\n\nNotes\nGroup chat IDs use -100 prefix (e.g., -1001234567890)\nForum topic IDs = the thread/topic message ID\nSender names are resolved automatically\nAll paths (session, credentials) are resolved relative to the skill directory — works regardless of install location"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/rhlsthrm/telegram-history",
    "publisherUrl": "https://clawhub.ai/rhlsthrm/telegram-history",
    "owner": "rhlsthrm",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/telegram-history",
    "downloadUrl": "https://openagent3.xyz/downloads/telegram-history",
    "agentUrl": "https://openagent3.xyz/skills/telegram-history/agent",
    "manifestUrl": "https://openagent3.xyz/skills/telegram-history/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/telegram-history/agent.md"
  }
}