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.
git clone --depth 1 https://github.com/coddy-project/coddy-agentWrote 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.
[](https://agentmods.dev/rules/coddy-project/coddy-agent/gateway)<a href="https://agentmods.dev/rules/coddy-project/coddy-agent/gateway"><img src="https://agentmods.dev/badge/rules/coddy-project/coddy-agent/gateway/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.
<a href="https://agentmods.dev/rules/coddy-project/coddy-agent/gateway"><img src="https://agentmods.dev/badge/rules/coddy-project/coddy-agent/gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.07129 |
| Opus 5.5 | $0.00000 | $0.02852 |
| Sonnet 5.5 | $0.00000 | $0.01426 |
| Haiku 4.5 | $0.00000 | $0.00713 |
Grade A, and why
gateway 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.
How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Messenger Gateway (external/gateway)
Built with -tags gateway.telegram (Telegram only), -tags gateway.pachca (Pachca only) or -tags gateway (all adapters). Each bot is a subsystem of coddy serve of its own (serve.KindGateway for Telegram, serve.KindGatewayPachca), started by gateway.ServeTelegram / gateway.ServePachca (serve_<name>.go, with a _stub.go and a <Name>Available const per adapter); a bot enabled in a binary without its tag is refused at startup by name.
Package layout
| Package | Role |
|---|---|
external/gateway |
Adapter interface, Hub, IncomingMessage, OutgoingMessage |
external/gateway/access |
CanAccess, EffectiveAccess, EffectiveIsolation over access.Policy (admins, user groups, defaults, ChatOverride), which config.TelegramGatewayConfig and config.PachcaGatewayConfig both satisfy |
external/gateway/sessionstore |
Store: maps stable chat/user keys to Coddy session IDs (Get mints, Reset replaces for /clear, Bind points a chat at an existing session for /resume); persisted to gateway_sessions.json |
external/gateway/proxyutil |
BuildHTTPClient — HTTP/SOCKS5 proxy support for outbound adapter requests |
external/gateway/telegram |
Bot (polling, dispatch, ACL), Sender (streaming output), commands.go (the inline keyboard for /model, the callback dispatcher, callbackValue for payloads over 64 bytes), resume.go (/resume: the session picker over HandleSessionList, the query matcher, the resume:s: / resume:p: callbacks), media.go (what a person sends besides text, below), isSettingsCommand (/model <id>, /think, /nothink, /reasoning, /agent, /plan, /ask with --once / --count=N go to the session as a message and the manager takes them; /permissions does not, the bot approves its chat agent itself), prompt.go (what the model is told about answering here), markdown.go (md → Telegram format) |
external/gateway/pachca |
The Pachca integration bot: client.go (REST client, 429 policy), poll.go (the events history walk, the watermark in gateway_pachca_state.json), dispatch.go (addressing, ACL, commands, turns), sender.go (one streamed message, edits, splitting), commands.go (/model buttons, clicks), permission.go, wake.go, prompt.go, markdown.go |
internal/pachcafake (untagged) |
The fake Pachca API the adapter's tests run on httptest: token info, profile, chats, messages with buttons and edits, the events history (newest first, cursor pages, delete), faults, and the person's side (UserPosts, UserClicks, StartThread) |
tgfake (github.com/EvilFreelancer/tgfake, pinned in go.mod) |
The fake Bot API, kept in its own repository: every method the adapter calls, long-polled getUpdates, getFile and the file downloads, the /sim/* API (the person's photos, documents and albums through InjectMedia / /sim/media included) and the chat page, pkg/llmstub for a scripted model; Mini Apps too - web_app buttons, the menu button, signed launches (/sim/webapp/launch) and a phone frame on the page that plays Telegram's client for the app. Tests import pkg/server (as tgfake) and run it on httptest; scripts and CI start its binary of the same version (docs/contributing/tgfake.md) |
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.
- 5d ago Changed · +4 lines b1b009fa1319
- 10d ago Changed a885bcdf0da6
- 13d ago Changed · +19 lines 4000f161fbed
- 20d ago Changed · +1 lines 8f21ef11f0e2
- 26d ago Changed 93a9c98d8d78
- 28d ago Changed · -1 lines a864f15e7f4b
- 29d ago Changed · +4 lines ee1f79bc5bf0
- 1mo ago Changed · +14 lines 4fced6728abc
- 1mo ago Changed · +6 lines c024b4122f5c
- 1mo ago First seen · 91 lines · 0 tokens per session scan A bdcd8a42c018
gateway is a cursor rule published in the GitHub repository coddy-project/coddy-agent (179 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,129 tokens. 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.
Other cursor rules, from other repositories
proxy-auth-transport
Every CLI command or browser UI action that calls a crit-web API must work in both modes.
go-api-handlers
Use authorization functions for apps.
use-frontend-api-client
Generated API client usage.
mcp-server
MCP (Model Context Protocol) server architecture and implementation.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.