serejaris/telegram-skills / skills/tg-widgets
tg-widgets
VerifiedUse when building or sending a Telegram message widget (HTML bubble, HTMLBubbles, `sendWidget`, `messageMediaWidget`, Bot API 10.4): an interactive HTML, CSS and JS program inside a chat bubble, such as a game, poll, calculator or live ticker. Teaches everything needed to write one: size, bubble, input, sandbox rules, state and requests, sending, and which chats accept a widget in production. Not for Mini Apps or Rich Messages.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.3 KB |
| examples/aquarium-pixel.html | other | 7.4 KB |
| examples/index.html | other | 5.3 KB |
| examples/night-deploy-pixel.html | other | 6.9 KB |
| examples/night-deploy-textmode.html | other | 7.2 KB |
| examples/textmode-panel.html | other | 3.7 KB |
| scripts/widget_tool.py | script | 2.3 KB |
| tests/test_widget_tool.py | script | 883 B |
tests/test_widget_tool.py
View on GitHubimport importlib.util
import unittest
import os
import pathlib
path = pathlib.Path(__file__).parents[1] / "scripts" / "widget_tool.py"
spec = importlib.util.spec_from_file_location("widget_tool", path)
tool = importlib.util.module_from_spec(spec)
spec.loader.exec_module(tool)
class WidgetToolTest(unittest.TestCase):
def test_small_widget_is_ok(self):
assert tool.measure(b"<p>hello</p>")["verdict"] == "ok"
def test_incompressible_html_is_too_large(self):
assert tool.measure(os.urandom(5000))["verdict"] == "too_large"
def test_over_html_limit_is_too_large_even_if_it_compresses(self):
assert tool.measure(b"a" * 40000)["verdict"] == "too_large"
def test_examples_fit(self):
for example in (path.parents[1] / "examples").glob("*.html"):
assert tool.measure(example.read_bytes())["verdict"] != "too_large", example
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |