telegram-cli AGENTS.md

Repository instructions for clitg, a non-interactive command-line program that lets AI agents work with Telegram through structured JSON output.

In plain words
What is it for?
Use them when developing or testing Telegram listing, searching, resolving, authentication, and capability commands with uv, Ruff, and type checking.
Why use it?
They define the public behavior agents and scripts depend on, including schemas, exit codes, safety rules, and protection of private login information.

Instructions file for CodexOpenCode

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.

agentmods
npx agentmods add instructions/leynier/telegram-cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/leynier/telegram-cli

Made for: Codex, OpenCode.

Per session 526 This file is loaded in full into every session.
When invoked 526 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00526 $0.00526
Opus 5 $0.00263 $0.00263
Sonnet 5 $0.00105 $0.00105
Haiku 4.5 $0.00053 $0.00053

Measured 2d ago against content hash ee81727cbc11, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

telegram-cli AGENTS.md 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 2d 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.

AGENTS.md · 50 lines

How it starts

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

AGENTS.md

Purpose

Build and maintain clitg as a deterministic, non-interactive Telegram CLI for AI agents. Treat its stdout JSON, schemas, exit codes, safety checks, and capability manifest as public APIs.

Tooling

  • Use uv for all Python and dependency operations.
  • Create project metadata with uv init; add or remove dependencies with uv add and uv remove.
  • Commit uv.lock and .python-version. Do not hand-edit dependency arrays.
  • Run Python commands through uv run.
  • Use Ruff for formatting and linting, and ty for type checking.
  • Write code, comments, documentation, tests, and commit messages in English.

Product invariants

  • Never add interactive prompts. All values must arrive through options, environment variables, files, or explicitly selected stdin.
  • Emit operational successes and failures as schema-versioned JSON or JSONL on stdout.
  • Keep stderr empty unless redacted verbose diagnostics were explicitly requested.
  • Never print or log API hashes, login codes, passwords, auth keys, or session material.
  • Do not mark messages read during list, get, search, resolve, schema, or capability operations.
  • Resolve ambiguous peers by returning candidates; never guess a mutation target.
  • Support --dry-run for every mutation. Preserve exact confirmation and critical-token checks.
  • Treat unknown raw methods as critical until their risk has been reviewed.
  • Keep personal sessions, credentials, Telegram data, and real account identifiers out of tests.

Architecture

  • Keep Typer presentation, application services, storage, and Telethon integration separated.
  • Keep Telethon and dynamic TL values at adapter boundaries; use typed Pydantic models internally.
  • Prefer the friendly Telethon API for dedicated commands and the generated TL registry for raw coverage.
  • Update generated schemas and capabilities whenever public models or Telethon change.
  • Preserve schema 0.2 across patch releases. A breaking contract requires a new minor schema and a coordinated skill update.

Read the full file on GitHub · 50 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. 2d ago First seen · 50 lines · 526 tokens per session scan A ee81727cbc11

Subscribe to this mod's changes

telegram-cli AGENTS.md is an instructions file published in the GitHub repository leynier/telegram-cli (8 stars, last pushed 2d ago), licensed MIT. It adds 526 tokens to every session, about $0.0026 per session on Opus 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-31.

Related

Other instructions, from other repositories

antigravity-testing-kit GEMINI.md

Instructions for anhtester/antigravity-testing-kit, covering gemini ai - global automation agent rules, git pull restriction rule, browser rules (mandatory), 🖥️ viewport & mode and 🔄 thứ tự debug bắt buộc (playwright mcp).

anhtester/antigravity-testing-kit · 3,029 tokens

toh-framework CLAUDE.md

Instructions for wasintoh/toh-framework, covering claude.md — toh framework (repo development guide), what this is, everyday commands, verification protocol and single source, transformed per ide.

wasintoh/toh-framework · 3,818 tokens

awesome-copilot-id AGENTS.md

Instructions for GulajavaMinistudio/awesome-copilot-id, covering communication, explanation and documentation, markdown formatting, user communication style and workflow & methodology.

GulajavaMinistudio/awesome-copilot-id · 7,686 tokens

amp-acp AGENTS.md

Instructions for tao12345666333/amp-acp, covering agents.md, commands, architecture and code style.

tao12345666333/amp-acp · 340 tokens

free-ai-gateway AGENTS.md

Instructions for zaber-dev/free-ai-gateway, covering 🤖 free-ai gateway - agentic development guidelines, 🏛️ monorepo architecture & package boundaries, 🛑 strict architectural rules for agents, 💻 essential developer commands and build all packages across monorepo.

zaber-dev/free-ai-gateway · 955 tokens

codevira CLAUDE.md

Instructions for sachinshelke/codevira, covering codevira — persistent project memory, when to call which codevira tool, at the start of every session, before modifying any file and before adopting a pattern, library, or naming convention.

sachinshelke/codevira · 2,807 tokens