tg-miniapp

tg-miniapp is a skill for Claude Code from RaNDoM6913/claude-code-superkit. It costs 47 tokens per session (1,670 once invoked), scanned A, original, MIT.

A collection of patterns for Telegram Mini Apps, which are web apps opened inside Telegram, including device safe areas, fixed elements, navigation buttons, sharing, and fullscreen behavior.

In plain words
What is it for?
Use it when building Telegram Web Apps with fullscreen screens, modals, bottom sheets, safe-area padding, or Telegram navigation controls.
Why use it?
Telegram and different phones can reserve space for status bars and controls in different ways, causing overlaps or broken layouts.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when building Telegram Web Apps with fullscreen screens, modals, bottom sheets, safe-area padding, or Telegram navigation controls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/random6913/claude-code-superkit/tg-miniapp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RaNDoM6913/claude-code-superkit --skill tg-miniapp
Clone the repo
git clone --depth 1 https://github.com/RaNDoM6913/claude-code-superkit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tg-miniapp

README.md
[![agentmods](https://agentmods.dev/badge/skills/random6913/claude-code-superkit/tg-miniapp/github.svg)](https://agentmods.dev/skills/random6913/claude-code-superkit/tg-miniapp)
Your own site
<a href="https://agentmods.dev/skills/random6913/claude-code-superkit/tg-miniapp"><img src="https://agentmods.dev/badge/skills/random6913/claude-code-superkit/tg-miniapp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tg-miniapp

Your own site · 80×15
<a href="https://agentmods.dev/skills/random6913/claude-code-superkit/tg-miniapp"><img src="https://agentmods.dev/badge/skills/random6913/claude-code-superkit/tg-miniapp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,670 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01670
Opus 5.5 $0.00019 $0.00668
Sonnet 5.5 $0.00009 $0.00334
Haiku 4.5 $0.00005 $0.00167

Measured 1mo ago against content hash 354502e87336, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tg-miniapp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/showcase/.claude/skills/tg-miniapp/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Telegram Mini App — Critical Patterns

🔴 CRITICAL: Safe Area в Fullscreen

safeAreaInset может вернуть 0 при инициализации — нельзя читать один раз. Значения обновляются асинхронно. iOS и Android дают разные safe areas.

Решение — реактивный хук (файл: src/hooks/useSafeAreaInset.ts):

import { useSafeAreaInset } from "@/hooks/useSafeAreaInset";

// В компоненте:
const safeArea = useSafeAreaInset();

// Полные поля:
safeArea.top         // комбинированная safe area (systemTop + contentTop, с fallback)
safeArea.bottom      // нижний отступ
safeArea.systemTop   // высота статус-бара устройства (0 вне fullscreen)
safeArea.contentTop  // высота TG-контролов — "Закрыть", "˅", "..." (0 вне fullscreen)
safeArea.isFullscreen // true если Mini App в fullscreen

// Простое использование — paddingTop = combined safe area:
<div style={{ paddingTop: safeArea.top }}>

Минимальные fallback для fullscreen:

  • iOS: top = 100px (если сумма < 80)
  • Android: top = 80px (если сумма < 80)

Архитектура safe area зон (fullscreen):

┌──────────────────────────────┐
│  22:54   📶  📶  🔋          │  ← systemTop (статус-бар / notch)
│ ✕ Закрыть          ˅  ...   │  ← contentTop (TG floating controls)
│  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─   │  ← safeArea.top = systemTop + contentTop
│       App content            │
  • safeAreaInset.top и contentSafeAreaInset.top — аддитивны в fullscreen
  • Вне fullscreen оба = 0 (нативный TG-хидер управляет сам)

Sticky header с safe area:

// WRONG — контент просвечивает сквозь gap
<div className="sticky top-0">Header</div>

// CORRECT
<div className="sticky top-0" style={{ paddingTop: safeArea.top, background: COLORS.bg }}>
  Header
</div>

🔴 CRITICAL: Брендинг в зоне TG-контролов (fullscreen header)

В fullscreen режиме можно разместить текст/логотип между системными кнопками TG ("Закрыть" слева, "˅ + ..." справа). Это заменяет кастомный хидер и экономит место.

Паттерн — branding в TG controls zone:

const safeArea = useSafeAreaInset();

{/* Прозрачный spacer = вся safe area */}
{safeArea.top > 0 && (
  <div className="shrink-0 relative" style={{ height: safeArea.top }}>
    {/* Текст позиционирован точно в зоне TG-контролов */}
    {safeArea.isFullscreen && safeArea.contentTop > 0 && (
      <div
        className="absolute left-0 right-0 flex items-center justify-center pointer-events-none"
        style={{
          top: safeArea.systemTop,
          height: safeArea.contentTop,
        }}
      >
        <span
          className="text-[15px] font-bold tracking-[0.08em] uppercase"
          style={{ color: "rgba(228,228,240,0.55)" }}
        >
          MyApp
        </span>
      </div>
    )}
  </div>
)}

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 178 lines · 47 tokens per session scan A 354502e87336

Subscribe to this mod's changes

tg-miniapp is a skill published in the GitHub repository RaNDoM6913/claude-code-superkit (3 stars, last pushed 4d ago), licensed MIT. It adds 47 tokens to every session and 1,670 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

ionic

Ionic development guidelines for building cross-platform mobile applications with Angular, Cordova, and Firebase integration.

Mindrally/skills · 22 tokens

flutter-development

Cross-platform development with Flutter and Dart for iOS, Android, Web, Desktop, and embedded. Use when building Flutter apps, implementing Material/Cupertino design, or optimizing Dart code.

travisjneuman/.claude · 41 tokens

impeccable

Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context. Call with 'craft' for…

wrg32786/aigent-os · 90 tokens

ui-architecture

Iris's new UI surface design skill. Takes a brief for a new screen, component, or design system and produces a complete visual architecture spec — component tree, layout grid, interaction states, breakpoints, tokens. No code.

wrg32786/aigent-os · 51 tokens

visual-polish

Iris's UI visual polish review skill. Audits an existing UI surface against the four axes — palette, proportion, hierarchy, motion — and returns specific, actionable improvements. No code. Spec output only.

wrg32786/aigent-os · 46 tokens

taste-skill

Senior UI/UX Engineer. Architect digital interfaces overriding default LLM biases. Enforces metric-based rules, strict component architecture, CSS hardware acceleration, and balanced design engineering.

wrg32786/aigent-os · 38 tokens