telegram-mini-app
Installation
SKILL.md
Telegram Mini App
Telegram Mini Apps (TMA, formerly "Web Apps") are HTML/JS apps that run inside the Telegram client as a WebView, with a JS bridge to the host (window.Telegram.WebApp). They look like native UI but are web tech — with extra rules and capabilities you do not get in a normal browser.
This skill assumes the developer knows web fundamentals. It teaches: what is different from the regular web, which SDKs to use, how authentication actually works end-to-end, and a large recommendations block of things that break in production.
Quick start
Two paths. Pick modern SDK for any new project; pick raw script only for prototypes or vanilla HTML.
Modern: @telegram-apps/sdk (recommended)
npm i @telegram-apps/sdk
import { init, miniApp, themeParams, viewport, mainButton, backButton, initData } from '@telegram-apps/sdk';