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.
npx agentmods add rules/mergisi/openclaw-rules/telegram-botgit clone --depth 1 https://github.com/mergisi/openclaw-rulesWhat 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 | $0.00640 | $0.00640 |
| Opus 5 | $0.00320 | $0.00320 |
| Sonnet 5 | $0.00128 | $0.00128 |
| Haiku 4.5 | $0.00064 | $0.00064 |
Grade A, and why
telegram-bot 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.
How it starts
The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Telegram Bot Integration
When setting up or modifying Telegram bot integration for OpenClaw agents.
Setup
- Create a bot via @BotFather on Telegram
- Save the token (format:
1234567890:ABCdefGHIjklMNOpqrSTUvwxYZ) - Get your chat ID by messaging @userinfobot
- Add to secrets:
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID
Sending Messages
function sendTelegram(token, chatId, text) {
return new Promise((resolve, reject) => {
const body = JSON.stringify({ chat_id: chatId, text: text });
const req = require("https").request({
hostname: "api.telegram.org",
path: `/bot${token}/sendMessage`,
method: "POST",
headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body) },
}, res => {
let b = "";
res.on("data", d => b += d);
res.on("end", () => resolve(JSON.parse(b)));
});
req.on("error", reject);
req.write(body);
req.end();
});
}
Important: Use Plain Text
Never use parse_mode: "Markdown" or parse_mode: "MarkdownV2". Dynamic content (URLs, titles, code) often contains []_* characters that break Markdown parsing and cause "Bad Request: can't parse entities" errors.
Always send plain text. If you need formatting, use parse_mode: "HTML" which is more forgiving.
Message Length Limits
Telegram messages have a 4096 character limit. For long reports:
function sendLongMessage(token, chatId, text) {
const chunks = [];
const lines = text.split("\n");
let current = "";
for (const line of lines) {
if ((current + "\n" + line).length > 4000) {
chunks.push(current);
current = line;
} else {
current += (current ? "\n" : "") + line;
}
}
if (current) chunks.push(current);
return chunks.reduce((p, chunk, i) =>
p.then(() => sendTelegram(token, chatId, chunk))
.then(() => i < chunks.length - 1 ? new Promise(r => setTimeout(r, 500)) : null),
Promise.resolve()
);
}
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.
- 2d ago First seen · 87 lines · 640 tokens per session scan A 33878337da1c
telegram-bot is a cursor rule published in the GitHub repository mergisi/openclaw-rules (2 stars, last pushed 6mo ago), licensed MIT. It adds 640 tokens to every session, about $0.0032 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.
Other cursor rules, from other repositories
050-plan
When the user types /plan or asks to create a project plan, feature PRD, or retrospective.
webdriver-management
Selenium WebDriver lifecycle management — driver factory, explicit waits, browser options, and teardown.
django-middleware
关于使用 Django 中间件处理认证、日志和缓存等横切关注点的指南。.
minimax-m3-status-verification
MiniMax M3 status and verification contract: exact claim labels, proof matching, multimodal-grounded visual claims, and evidence-first closeouts.
matcha
This project uses the matcha engineering convention. Read the AGENTS.md file at the project root and follow its philosophy.
002-verify-before-act
Requires Claude to read before writing, verify before installing, and confirm before destructive operations.