Borrowing it
Nothing to install: this file belongs to leshchenko1979/fast-mcp-telegram. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/leshchenko1979/fast-mcp-telegram/master/.cursor/skills/telegram-patterns/SKILL.mdgit clone --depth 1 https://github.com/leshchenko1979/fast-mcp-telegramWrote 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.
[](https://agentmods.dev/skills/leshchenko1979/fast-mcp-telegram/telegram-patterns)<a href="https://agentmods.dev/skills/leshchenko1979/fast-mcp-telegram/telegram-patterns"><img src="https://agentmods.dev/badge/skills/leshchenko1979/fast-mcp-telegram/telegram-patterns/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.
<a href="https://agentmods.dev/skills/leshchenko1979/fast-mcp-telegram/telegram-patterns"><img src="https://agentmods.dev/badge/skills/leshchenko1979/fast-mcp-telegram/telegram-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Rogue Agent · line 113 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00012 | $0.00886 |
| Opus 5.5 | $0.00005 | $0.00354 |
| Sonnet 5.5 | $0.00002 | $0.00177 |
| Haiku 4.5 | $0.00001 | $0.00089 |
Grade A, and why
telegram-patterns 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- telegram-patterns — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Telegram-Specific Patterns
Entity Resolution
Always resolve chat/user entities using the utility functions:
from src.utils.entity import get_entity_by_id
# ✅ Correct - handles all entity types (users, chats, channels)
entity = await get_entity_by_id(chat_id)
if not entity:
raise ValueError(f"Could not find chat with ID '{chat_id}'")
# ❌ Wrong - don't use client.get_entity directly
entity = await client.get_entity(chat_id) # Missing error handling
Special Chat Identifiers
Use these special identifiers for common chats:
# Saved Messages (your own messages)
chat_id = "me"
# Channel IDs (always start with -100)
channel_id = "-1001234567890"
# User IDs (numeric strings)
user_id = "123456789"
# Usernames (without @)
username = "telegram"
Message Content Detection
Check for various types of message content:
# Check for text content
has_text = message.text and message.text.strip()
# Check for media content (photos, documents, etc.)
has_media = hasattr(message, "media") and message.media is not None
# Check for specific media types
is_photo = hasattr(message, "photo") and message.photo is not None
is_document = hasattr(message, "document") and message.document is not None
is_voice = hasattr(message, "voice") and message.voice is not None
Message Iteration
Use proper patterns for iterating through messages:
# ✅ Correct - limit results and handle empty messages
async for message in client.iter_messages(entity, limit=50):
if not message:
continue
# Process message
await process_message(message)
# ❌ Wrong - no limit can cause performance issues
async for message in client.iter_messages(entity): # No limit!
pass
Forwarded Message Handling
Handle forwarded messages properly:
# Check if message is forwarded
if hasattr(message, "forward") and message.forward:
forward_info = await _extract_forward_info(message)
original_sender = forward_info.get("sender")
original_chat = forward_info.get("chat")
forward_date = forward_info.get("date")
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.
- 1mo ago First seen · 153 lines · 12 tokens per session scan A 0173f6e04a12
telegram-patterns is a skill published in the GitHub repository leshchenko1979/fast-mcp-telegram (50 stars, last pushed 8d ago), licensed MIT. It adds 12 tokens to every session and 886 once invoked, about $0.0000 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-08-30.
Other skills, from other repositories
fastapi-common
A shared foundation for FastAPI web backends, covering cross-origin access, error handling, request logs, and consistent API responses. FastAPI is a Python framework for building web APIs.
python-dev
Python backend conventions for this project. Use when implementing or modifying API endpoints, database models/migrations, services, schemas, or backend tests.
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
pytdbot
Write Telegram bots and userbots with Pytdbot (async TDLib wrapper with high-level helpers; not the Telegram Bot API). Use when the user works with Pytdbot, TDLib, or pytdbot.Client.
django
Expert Django assistance covering ORM, models, class-based views, admin interface, migrations, and Django REST Framework. Use when developing robust, scalable Python web applications and REST APIs.
fastapi
Expert FastAPI assistance covering Pydantic models, async endpoints, dependency injection, and OpenAPI generation. Use when developing high-performance Python REST APIs and microservices.