{
  "schemaVersion": "1.0",
  "item": {
    "slug": "tg-miniapp",
    "name": "Telegram Mini App Dev",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Zenith2828/tg-miniapp",
    "canonicalUrl": "https://clawhub.ai/Zenith2828/tg-miniapp",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/tg-miniapp",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tg-miniapp",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/KNOWLEDGE.md",
      "references/components.tsx",
      "references/hooks.ts"
    ],
    "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/tg-miniapp"
    },
    "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/tg-miniapp",
    "agentPageUrl": "https://openagent3.xyz/skills/tg-miniapp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tg-miniapp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tg-miniapp/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 Mini App Development",
        "body": "Battle-tested solutions for common Telegram Mini App issues."
      },
      {
        "title": "Safe Area (Fullscreen Mode)",
        "body": "// Use reactive hook - values are async and context-dependent\nconst safeArea = useSafeAreaInset(); // from references/hooks.ts\n<div style={{ paddingTop: safeArea.top }}>Header</div>"
      },
      {
        "title": "position:fixed Broken",
        "body": "Telegram applies transform to container. Use createPortal:\n\nimport { createPortal } from 'react-dom';\ncreatePortal(<Modal />, document.body);"
      },
      {
        "title": "BackButton Not Firing",
        "body": "Use @telegram-apps/sdk, not raw WebApp:\n\nimport { onBackButtonClick, showBackButton } from '@telegram-apps/sdk';\nonBackButtonClick(handleBack);"
      },
      {
        "title": "Sharing with Inline Mode",
        "body": "Enable inline mode: @BotFather → /setinline → select bot\nBackend calls savePreparedInlineMessage → returns prepared_message_id\nFrontend calls WebApp.shareMessage(prepared_message_id)\n\nNote: prepared_message_id is single-use — prepare fresh for each share tap.\nFor static content, consider caching images on R2/CDN and preparing per-tap."
      },
      {
        "title": "React \"0\" Rendering",
        "body": "// WRONG: renders literal \"0\"\n{count && <span>{count}</span>}\n\n// CORRECT\n{count > 0 && <span>{count}</span>}"
      },
      {
        "title": "Detailed Guides",
        "body": "references/KNOWLEDGE.md — Full knowledge base with all gotchas and solutions\nreferences/hooks.ts — Copy-paste React hooks (useSafeAreaInset, useFullscreen, etc.)\nreferences/components.tsx — Ready-to-use components (SafeAreaHeader, DebugOverlay)"
      },
      {
        "title": "Testing Checklist",
        "body": "Before shipping, test:\n\nOpen from folder (chat list)\n Open from direct bot chat\n iOS device\n Android device\n Share flow (tap → dismiss → tap again)\n Share to different chat types (user, group, channel)\n Back button\n Scroll with sticky header"
      }
    ],
    "body": "Telegram Mini App Development\n\nBattle-tested solutions for common Telegram Mini App issues.\n\nQuick Reference\nSafe Area (Fullscreen Mode)\n// Use reactive hook - values are async and context-dependent\nconst safeArea = useSafeAreaInset(); // from references/hooks.ts\n<div style={{ paddingTop: safeArea.top }}>Header</div>\n\nposition:fixed Broken\n\nTelegram applies transform to container. Use createPortal:\n\nimport { createPortal } from 'react-dom';\ncreatePortal(<Modal />, document.body);\n\nBackButton Not Firing\n\nUse @telegram-apps/sdk, not raw WebApp:\n\nimport { onBackButtonClick, showBackButton } from '@telegram-apps/sdk';\nonBackButtonClick(handleBack);\n\nSharing with Inline Mode\nEnable inline mode: @BotFather → /setinline → select bot\nBackend calls savePreparedInlineMessage → returns prepared_message_id\nFrontend calls WebApp.shareMessage(prepared_message_id)\n\nNote: prepared_message_id is single-use — prepare fresh for each share tap. For static content, consider caching images on R2/CDN and preparing per-tap.\n\nReact \"0\" Rendering\n// WRONG: renders literal \"0\"\n{count && <span>{count}</span>}\n\n// CORRECT\n{count > 0 && <span>{count}</span>}\n\nDetailed Guides\nreferences/KNOWLEDGE.md — Full knowledge base with all gotchas and solutions\nreferences/hooks.ts — Copy-paste React hooks (useSafeAreaInset, useFullscreen, etc.)\nreferences/components.tsx — Ready-to-use components (SafeAreaHeader, DebugOverlay)\nTesting Checklist\n\nBefore shipping, test:\n\n Open from folder (chat list)\n Open from direct bot chat\n iOS device\n Android device\n Share flow (tap → dismiss → tap again)\n Share to different chat types (user, group, channel)\n Back button\n Scroll with sticky header"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Zenith2828/tg-miniapp",
    "publisherUrl": "https://clawhub.ai/Zenith2828/tg-miniapp",
    "owner": "Zenith2828",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/tg-miniapp",
    "downloadUrl": "https://openagent3.xyz/downloads/tg-miniapp",
    "agentUrl": "https://openagent3.xyz/skills/tg-miniapp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tg-miniapp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tg-miniapp/agent.md"
  }
}