telegram-commandcode: Instructions file for Codex

AGENTS.md

telegram-commandcode AGENTS.md is an instructions file for Codex, OpenCode from qrak/telegram-commandcode. It costs 1,216 tokens per session, scanned A, original, MIT.

Repository instructions for qrak/telegram-commandcode. They describe the project's structure and explain how its gateway and command layers are organized.

In plain words
What is it for?
Use them when working on the Telegram command gateway or command-handling code in that repository.
Why use it?
They help an agent place changes in the correct part of the codebase and follow the project's architecture.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is qrak/telegram-commandcode's own configuration. It tells Codex and OpenCode how to work on telegram-commandcode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything telegram-commandcode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to qrak/telegram-commandcode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/qrak/telegram-commandcode/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/qrak/telegram-commandcode

Made for: Codex, OpenCode.

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 telegram-commandcode AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/qrak/telegram-commandcode/agents-md/github.svg)](https://agentmods.dev/instructions/qrak/telegram-commandcode/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/qrak/telegram-commandcode/agents-md"><img src="https://agentmods.dev/badge/instructions/qrak/telegram-commandcode/agents-md/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 telegram-commandcode AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/qrak/telegram-commandcode/agents-md"><img src="https://agentmods.dev/badge/instructions/qrak/telegram-commandcode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,216 This file is loaded in full into every session.
When invoked 1,216 The same file — it is already loaded in full.
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.01216 $0.01216
Opus 5.5 $0.00486 $0.00486
Sonnet 5.5 $0.00243 $0.00243
Haiku 4.5 $0.00122 $0.00122

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

Security

Grade A, and why

telegram-commandcode 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 23d 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 · 104 lines

How it starts

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

AGENTS.md — telegram-commandcode

Two deliverables in one repository:

  1. index.js — MCP stdio server, agent → Telegram. This is the primary product and the part that works with every MCP client.
  2. telegram_commandcode/ — Python Telegram bot, Telegram → cmd CLI. Coupled to Command Code's closed-source argument surface.

legacy/ holds the original Node bot. Archived, unsupported, excluded from the npm package. Do not add features there.

Status: daemon frozen, MCP server maintained

The MCP server is where new work goes. The bot daemon is feature-frozen at 2.2.0: fix bugs, do not add commands or flags. Command Code now ships its own Telegram bridge (/rc, announced 2026-09-29) for its own sessions, so a new daemon feature would be re-implementing a vendor feature. The daemon remains for self-hosting a bot on a server and for driving a CLI from chat.

Repository map

index.js                      MCP server (7 tools, SDK 1.29 schemas)
package.json                  npm metadata, bin, npm test
scripts/build-skill.mjs       builds dist/telegram-bridge-skill.zip
skill/                        publishable SKILL.md + 4 reference docs
test/mcp.test.mjs             node:test protocol tests (spawns the server)
tests/                        pytest suite (163 tests, no network, no `cmd`)
legacy/                       old Node bot + Discord bridge (archived)
deploy/                       systemd unit

telegram_commandcode/
├── bot.py                    PTB Application, 48-command menu, startup
├── session.py                ChatSession dataclass + file-backed SessionStore
├── executor.py               async `cmd` runner, per-chat process tracker
├── chunking.py               code-fence-aware 4096-char splitter
├── formatter.py              MarkdownV2 escaping, table rendering
├── gateway/
│   ├── gateway.py            BotGateway: locks, rate limits, identity
│   ├── router.py             access control, group mention logic, dispatch
│   ├── sender.py             send/edit with parse fallback + flood control
│   ├── processor.py          enqueue → per-chat lock → streaming pipeline
│   └── media.py              download, transcribe, auto-attach MEDIA: paths
└── commands/
    ├── router.py             dispatch table (48 entries, TG→CC name map)
    ├── base.py               shared send_md/run_cli/config/state helpers
    ├── info_cmds.py          12 commands
    ├── session_cmds.py        9 commands
    ├── config_cmds.py         7 commands
    ├── prompt_cmds.py        11 commands
    └── cli_cmds.py            8 commands

Read the full file on GitHub · 104 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. 23d ago Changed · -41 lines · -634 tokens per session 068f8a5c7eac
  2. 2mo ago First seen · 145 lines · 1,850 tokens per session scan A 3635020217bc

Subscribe to this mod's changes

telegram-commandcode AGENTS.md is an instructions file published in the GitHub repository qrak/telegram-commandcode (3 stars, last pushed 16d ago), licensed MIT. It adds 1,216 tokens to every session, about $0.0049 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-31.

Related

telegram-commandcode AGENTS.md compared with instructions from other repositories

telegram-commandcode AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
telegram-commandcode AGENTS.mdqrak/telegram-commandcodeInstructions file316d agoMITA1,216Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot