tg-read-context

tg-read-context is a skill for Claude Code, Codex from matskevich/tg-mcp-guarded. It costs 30 tokens per session (623 once invoked), scanned A, original, MIT.

A procedure for safely reading Telegram conversations and identifying the correct account and chat before doing further work. It checks stable numeric identifiers rather than relying only on visible names.

In plain words
What is it for?
Use it to verify Telegram identity, resolve a person or chat, inspect recent messages, and establish the correct conversation context for later actions.
Why use it?
It reduces mistakes caused by the wrong logged-in account, a similarly named contact, or a changed session. It also provides a way to inspect the relevant repository documentation when implementation details are needed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to verify Telegram identity, resolve a person or chat, inspect recent messages, and establish the correct conversation context for later actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/matskevich/tg-mcp-guarded/tg-read-context
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 matskevich/tg-mcp-guarded --skill tg-read-context
Clone the repo
git clone --depth 1 https://github.com/matskevich/tg-mcp-guarded

Made for: Claude Code, Codex.

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-read-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/matskevich/tg-mcp-guarded/tg-read-context/github.svg)](https://agentmods.dev/skills/matskevich/tg-mcp-guarded/tg-read-context)
Your own site
<a href="https://agentmods.dev/skills/matskevich/tg-mcp-guarded/tg-read-context"><img src="https://agentmods.dev/badge/skills/matskevich/tg-mcp-guarded/tg-read-context/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-read-context

Your own site · 80×15
<a href="https://agentmods.dev/skills/matskevich/tg-mcp-guarded/tg-read-context"><img src="https://agentmods.dev/badge/skills/matskevich/tg-mcp-guarded/tg-read-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 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.00030 $0.00623
Opus 5.5 $0.00012 $0.00249
Sonnet 5.5 $0.00006 $0.00125
Haiku 4.5 $0.00003 $0.00062

Measured 13d ago against content hash 700e1cd768a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tg-read-context 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 13d 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.

skills/tg-read-context/SKILL.md · 56 lines

How it starts

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

telegram context

use the private operator profile in your workspace for the expected account username and numeric user id, read/actions server aliases, repository path and recipient scope. use the installed tool schemas; names below are tg-mcp tool names, not client aliases. when implementation details matter, resolve documentation from the profile's repository path, then inspect the relevant code. do not assume the skill's installation location.

identity and target

  1. call tg_auth_status on the read server. require authorized status and compare the live username and account.id with the profile. the backend username guard does not enforce numeric identity; compare the id yourself, also after a restart or session change. stop on a mismatch; do not silently switch sessions.
  2. resolve the named person/chat with tg_resolve_username, tg_search_contacts or a small tg_get_my_dialogs result. use a stable numeric peer id for subsequent work.
  3. verify the peer's username, title and context against the request. a display name alone is weak evidence. if a numeric peer lookup fails, resolve its username again and use that fallback only when the returned id matches the intended numeric id.

retrieve the smallest useful slice

  • start with recent messages or a scoped search in the identified dialog.
  • use explicit limits and date bounds when known; widen only if the next decision needs older evidence. avoid account-wide exports for a single conversation.
  • page older history with offset_id; keep the oldest returned id as the next offset.
  • tg_get_messages_since has a default unlimited count: provide a finite limit.
  • use global search only when the target cannot be identified locally, with a bounded query and date window. stop once the intended conversation is found.

supported call shapes, with operator-resolved values:

tg_get_messages(group=peer_id_string, limit=30)
tg_search_messages(group=peer_id_string, query=search_term, limit=30, date_from=start_date, date_to=end_date)
tg_get_messages(group=peer_id_string, limit=30, offset_id=oldest_returned_id)

Read the full file on GitHub · 56 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. 13d ago First seen · 56 lines · 30 tokens per session scan A 700e1cd768a6

Subscribe to this mod's changes

tg-read-context is a skill published in the GitHub repository matskevich/tg-mcp-guarded (10 stars, last pushed 3d ago), licensed MIT. It adds 30 tokens to every session and 623 once invoked, about $0.0001 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-10-19.

Related

Other skills, from other repositories

orbit-notion

Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…

nexu-io/open-design · 117 tokens

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by your inbox assignment.

paperclipai/paperclip · 30 tokens

Cortex

LifeOS memory, prior-session recall, and learning capture. USE WHEN capture this learning, document this learning, what did we learn recently, recent learnings, cortex, knowledge, knowledge base, search knowledge, what do we know about, archive, harvest, knowledge status, develop note, add to knowledge, add a people…

danielmiessler/LifeOS · 184 tokens

rowboat-spaces

How to work as a member of Rowboat Spaces, the team chat where people and agents work together. Load it once per session, before acting on any request that reaches you from Rowboat; it covers your setup, mentions and hand-offs, the tools, and files.

rowboatlabs/rowboat · 60 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens