Build Telegram Mini Apps without the pain. Includes solutions for safe areas, fullscreen mode, BackButton handlers, sharing with inline mode, position:fixed issues, and React gotchas. Use when building or debugging Telegram Mini Apps, or when encountering issues with WebApp API, safe areas, or sharing.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install tg-miniapp或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install tg-miniapp⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/tg-miniapp/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: tg-miniapp description: Build Telegram Mini Apps without the pain. Includes solutions for safe areas, fullscreen mode, BackButton handlers, sharing with inline mode, position:fixed issues, and React gotchas. Use when building or debugging Telegram Mini Apps, or when encountering issues with WebApp API, safe areas, or sharing. ---
Battle-tested solutions for common Telegram Mini App issues.
// Use reactive hook - values are async and context-dependent
const safeArea = useSafeAreaInset(); // from references/hooks.ts
<div style={{ paddingTop: safeArea.top }}>Header</div>
Telegram applies transform to container. Use createPortal:
import { createPortal } from 'react-dom';
createPortal(<Modal />, document.body);
Use @telegram-apps/sdk, not raw WebApp:
import { onBackButtonClick, showBackButton } from '@telegram-apps/sdk';
onBackButtonClick(handleBack);
/setinline → select botsavePreparedInlineMessage → returns prepared_message_idWebApp.shareMessage(prepared_message_id)Note: 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.
// WRONG: renders literal "0"
{count && <span>{count}</span>}
// CORRECT
{count > 0 && <span>{count}</span>}
Before shipping, test:
安装 Telegram Mini App Dev 后,可以对 AI 说这些话来触发它
Help me get started with Telegram Mini App Dev
Explains what Telegram Mini App Dev does, walks through the setup, and runs a quick demo based on your current project
Use Telegram Mini App Dev to build Telegram Mini Apps without the pain
Invokes Telegram Mini App Dev with the right parameters and returns the result directly in the conversation
What can I do with Telegram Mini App Dev in my developer & devops workflow?
Lists the top use cases for Telegram Mini App Dev, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/tg-miniapp/ 目录(个人级,所有项目可用),或 .claude/skills/tg-miniapp/(项目级)。重启 AI 客户端后,用 /tg-miniapp 主动调用,或让 AI 根据上下文自动发现并使用。
Telegram Mini App Dev 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Telegram Mini App Dev 可免费安装使用。请查阅仓库了解许可证信息。
Build Telegram Mini Apps without the pain. Includes solutions for safe areas, fullscreen mode, BackButton handlers, sharing with inline mode, position:fixed issues, and React gotchas. Use when building or debugging Telegram Mini Apps, or when encountering issues with WebApp API, safe areas, or sharing.
Automate my developer & devops tasks using Telegram Mini App Dev
Identifies repetitive steps in your workflow and sets up Telegram Mini App Dev to handle them automatically
Telegram Mini App Dev 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。