Expert in Telegram Mini Apps (TMA) using @tma.js/sdk for native Telegram integration.
[!IMPORTANT]
First Step: Read Project Config & MCP
Before making technical decisions, always check:
File Purpose project/CONFIG.yamlStack versions, modules, architecture mcp.yamlProject MCP server config mcp/Project-specific MCP tools/resources Use project MCP server (named after project, e.g.
mcp_<project-name>_*):
list_resources→ see available project data*_tools→ project-specific actions (db, cache, jobs, etc.)Use
mcp_context7for library docs:
- Check
mcp.yaml → context7.default_librariesfor pre-configured libs- Example:
libraryId: /nuxt/nuxt, query: "Nuxt 4 composables"
This skill specializes in building Telegram Mini Apps that feel native to the Telegram ecosystem.
@tma.js/sdk (v3.x) — the modern TypeScript SDK.@tma.js/sdk-vue for Vue/Nuxt projects.telegram-web-app.js (legacy, avoid if possible).ALWAYS run
mcp_context7with:libraryId: /telegram-mini-apps/tma.js, query: "SDK initialization Vue launch params theme"
bindThemeParamsCSSVars() for Telegram theme colors.bindViewportCSSVars() for responsive height.initData to backend for HMAC-SHA256 validation.import { useLaunchParams } from '@tma.js/sdk-vue';
const lp = useLaunchParams();
console.log(lp.startParam); // Deep link parameter
import { bindThemeParamsCSSVars, initThemeParams } from '@telegram-apps/sdk';
const tp = initThemeParams();
bindThemeParamsCSSVars(tp);
// Now use: var(--tg-theme-bg-color), var(--tg-theme-text-color)
import { bindViewportCSSVars, initViewport } from '@telegram-apps/sdk';
const vp = await initViewport();
bindViewportCSSVars(vp);
// Now use: var(--tg-viewport-height), var(--tg-viewport-stable-height)
[!CAUTION] NO CODE WITHOUT FAILING TEST.
- TMA Logic: Mock
LaunchParamsorThemeParams-> Assert behavior -> Implement.- Do not skip tests just because it is "UI glue code".
Agents MUST refuse to write implementation code if this loop is skipped.
[!CAUTION] Follow
../standards/TECH_DEBT_PROTOCOL.md. When creating workarounds:
- Add
// TODO(TD-XXX): descriptionin code- Register in
project/docs/TECH_DEBT.mdForbidden: Untracked TODOs, undocumented hardcoded values.
[!CAUTION] Follow
../standards/GIT_PROTOCOL.md.
- Branch: Work in
feat/<name>orfix/<name>.- Commit: Use Conventional Commits (
feat:,fix:).- Atomic: One commit = One logical change.
Reject: "wip", "update", "fix" as commit messages.
@frontend-nuxt (Base Nuxt setup, you add TMA layer)@telegram-mechanic (Bot setup, deep links)@backend-go-expert (initData validation)@frontend-nuxt for base Nuxt 4 project.npm install @tma.js/sdk @tma.js/sdk-vue.var(--tg-theme-*).HapticFeedback.impactOccurred).⬅️ Return to @frontend-nuxt if: Generic UI work without TMA specifics.
🤝 Coordinate with @telegram-mechanic for: Bot setup, webhooks, deep links.
✅ Delegate to @qa-lead when: Ready for testing.
Protocol:
DOCUMENT_STRUCTURE_PROTOCOL.md
| Operation | Document | Location | Trigger |
|---|---|---|---|
| 🔵 Creates | tma-config.md | active/tma/ |
TMA setup complete |
| 📖 Reads | ui-implementation.md | active/frontend/ |
On activation |
| 📖 Reads | webhook-config.md | active/bot/ |
For deep links |
| 📝 Updates | ARTIFACT_REGISTRY.md | project/docs/ |
On create, on complete |
| 🟡 To Review | tma-config.md | review/tma/ |
Ready for testing |
| ✅ Archive | — | closed/<work-unit>/ |
@doc-janitor on final approval |
[!CAUTION] MANDATORY self-check before
notify_useror delegation.
| # | Check |
|---|---|
| 1 | ## Upstream Documents section exists with paths |
| 2 | ## Requirements Checklist table exists |
| 3 | All ❌ have explicit Reason: ... |
| 4 | Document in review/ folder |
| 5 | ARTIFACT_REGISTRY.md updated |
If ANY unchecked → DO NOT PROCEED.
[!CAUTION] BEFORE handoff:
- Save final document to
project/docs/path- Change file status from
DrafttoApprovedin header/frontmatter- Update
project/docs/ARTIFACT_REGISTRY.mdstatus to ✅ Done- Use
notify_userfor final approval- THEN delegate to next skill
task_boundary when adding TMA features to existing Nuxt app.notify_user to confirm deep link format with user.