cloudflare-email-telegram-cursorrules-prompt-file

cloudflare-email-telegram-cursorrules-prompt-file is a cursor rule for coding agents from PatrickJS/awesome-cursorrules. It costs 720 tokens per session, scanned A, original, CC0-1.0.

A set of Cursor instructions for forwarding email to Telegram through Cloudflare Email Routing and Workers. Cloudflare manages the domain’s email routing, while a Telegram bot receives the forwarded messages.

In plain words
What is it for?
Planning an email-to-Telegram setup with the mail2tg command-line tool. It covers required Cloudflare and Telegram credentials, domain and Node.js prerequisites, and the initial setup and plan commands.
Why use it?
Setting this up requires several accounts, permissions, secrets, and DNS-related checks. The instructions organise the prerequisites and require reviewing a plan before continuing.

Cursor rule

About the project

PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.

PatrickJS/awesome-cursorrules · 40,726 stars · on GitHub

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 rules/patrickjs/awesome-cursorrules/cloudflare-email-telegram-cursorrules-prompt-file
Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

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 cloudflare-email-telegram-cursorrules-prompt-file

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/cloudflare-email-telegram-cursorrules-prompt-file.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/cloudflare-email-telegram-cursorrules-prompt-file)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/cloudflare-email-telegram-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/cloudflare-email-telegram-cursorrules-prompt-file.svg" alt="Measured on agentmods" height="20"></a>
Per session 720 This file is loaded in full into every session.
When invoked 720 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.00720 $0.00720
Opus 5 $0.00360 $0.00360
Sonnet 5 $0.00144 $0.00144
Haiku 4.5 $0.00072 $0.00072

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

Security

Grade A, and why

cloudflare-email-telegram-cursorrules-prompt-file 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 5d 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.

rules/cloudflare-email-telegram-cursorrules-prompt-file.mdc · 75 lines

How it starts

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

You are an expert at setting up email-to-Telegram forwarding using Cloudflare Email Routing and Workers.

When the user asks to set up email forwarding to Telegram, route domain email to Telegram, or mentions "mail2tg", "email to telegram", follow this workflow.

Tool

Use the mail2tg CLI published on npm: https://www.npmjs.com/package/mail2tg Source: https://github.com/shatzibitten/mail2tg

Prerequisites

  1. Domain DNS managed by Cloudflare (nameservers pointing to Cloudflare, status "Active").
  2. Cloudflare API token with scopes: Zone Read, DNS Edit, Worker Scripts Edit, Email Routing Rules Edit. Create at dash.cloudflare.com/profile/api-tokens → "Create Custom Token".
  3. Telegram bot created via @BotFather, token copied. User has sent /start to the bot.
  4. Node.js >= 20.

Plan-first workflow

export CLOUDFLARE_API_TOKEN="<token>"
export TELEGRAM_BOT_TOKEN="<bot-token>"

# Replace <reviewed-version> only after reviewing the npm package and source.
MAIL2TG_DOMAIN=example.com \
[email protected] \
npx -y mail2tg@<reviewed-version> init --json

npx -y mail2tg@<reviewed-version> plan --json

# Stop here, show the plan to the user, and wait for explicit approval.
npx -y mail2tg@<reviewed-version> apply --json
npx -y mail2tg@<reviewed-version> doctor --json

Interactive workflow

npx -y mail2tg@<reviewed-version> init
export CLOUDFLARE_API_TOKEN="<token>"
export TELEGRAM_BOT_TOKEN="<bot-token>"
npx -y mail2tg@<reviewed-version> plan

# Stop here, show the plan to the user, and wait for explicit approval.
npx -y mail2tg@<reviewed-version> apply
npx -y mail2tg@<reviewed-version> doctor

What it does

  • Deploys a Cloudflare Worker that parses incoming emails (MIME) and forwards headers, body, and attachments (up to 50 MB) to a Telegram chat via Bot API.
  • Creates MX and SPF DNS records so Cloudflare receives mail for the domain.
  • Creates an Email Routing rule directing the configured address to the Worker.
  • Sets Worker secrets (TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID).

Read the full file on GitHub · 75 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. 5d ago First seen · 75 lines · 0 tokens per session scan A e1055afd55e4

Subscribe to this mod's changes

cloudflare-email-telegram-cursorrules-prompt-file is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,726 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 720 tokens to every session, about $0.0036 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-30.