telegram-bot: Instructions file for Codex

AGENTS.md

telegram-bot AGENTS.md is an instructions file for Codex, OpenCode from vendelieu/telegram-bot. It costs 467 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for contributors to a Kotlin library that helps build Telegram bots. They cover the development commands, testing, project folders, API annotations, and rules for required and optional parameters.

In plain words
What is it for?
Use them when adding bot actions or API functions, changing annotations or the Kotlin symbol processor, updating tests, or running release and API-validation checks.
Why use it?
They explain the checks needed before a change is submitted and the conventions that keep the library aligned with Telegram's API.

Instructions file for CodexOpenCode

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

This is vendelieu/telegram-bot's own configuration. It tells Codex and OpenCode how to work on telegram-bot 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-bot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to vendelieu/telegram-bot. 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/vendelieu/telegram-bot/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/vendelieu/telegram-bot

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-bot AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/vendelieu/telegram-bot/agents-md"><img src="https://agentmods.dev/badge/instructions/vendelieu/telegram-bot/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 467 This file is loaded in full into every session.
When invoked 467 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.00467 $0.00467
Opus 5.5 $0.00187 $0.00187
Sonnet 5.5 $0.00093 $0.00093
Haiku 4.5 $0.00047 $0.00047

Measured 1mo ago against content hash 123890ae4a2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

telegram-bot 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 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.

AGENTS.md · 40 lines

What it actually says

AGENTS.md

Project context and conventions for AI coding assistants working on the telegram-bot library.

Dev environment

  • Build: ./gradlew prepareRelease before committing (format, api validation, kdocs, api violations check)
  • Kotlin: Follow Kotlin coding conventions
  • Target branch: dev for PRs

Testing

  • Add tests for new code
  • Run ./gradlew prepareRelease to validate
  • Run ./gradlew apiDump to generate api dump
  • Tests replay recorded Telegram responses by default (no network, no .env); see TESTING.md
  • New or changed API action: ./gradlew :telegram-bot:recordFixtures --tests '*YourTest' and commit the fixture
  • Never wait with delay() or use GlobalScope in tests; echoed values must be constants, not now/random

Project structure

  • telegram-bot/ — main library
  • ktnip/ — KSP processor for annotations
  • api-sentinel/ — API validation against Telegram spec

Key conventions

  • Use @TgAPI on Action classes and top-level API functions for validation
  • Required params must be non-null; optional params must be nullable
  • Method names must match @TgAPI.Name annotation
  • For Activity, WizardActivity, functional DSL vs annotation approach, and ProcessingPipeline, see .cursor/rules/telegram-bot-handling.mdc

Cursor-specific resources

  • Rules: .cursor/rules/ — API, handling, types, tests, KSP processor
  • Skills: .cursor/skills/ — organized by audience:
    • library-dev/ — for contributors extending the library (API actions, update fields, KSP collectors)
    • bot-user/ — for developers building bots (keyboards, handlers, wizards, callback queries)
  • See .cursor/skills/README.md for the full skill index
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. 1mo ago Changed · +3 lines · +86 tokens per session 123890ae4a2b
  2. 2mo ago First seen · 37 lines · 381 tokens per session scan A 2e8842764e18

Subscribe to this mod's changes

telegram-bot AGENTS.md is an instructions file published in the GitHub repository vendelieu/telegram-bot (249 stars, last pushed yesterday), licensed Apache-2.0. It adds 467 tokens to every session, about $0.0019 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.

Related

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

telegram-bot AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
telegram-bot AGENTS.mdvendelieu/telegram-botInstructions file249yesterdayApache-2.0A467Codex, OpenCode
graftcode graftcode-kotlin.instructions.mdgrft-dev/graftcodeInstructions file9671mo agononeA4,533GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot