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/coddy-project/coddy-agent/gatewaygit clone --depth 1 https://github.com/coddy-project/coddy-agentWhat 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.00000 | $0.01350 |
| Opus 5 | $0.00000 | $0.00675 |
| Sonnet 5 | $0.00000 | $0.00270 |
| Haiku 4.5 | $0.00000 | $0.00135 |
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 3d 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 — 83 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) or -tags gateway (all adapters). Without these tags coddy gateway is present in the binary but returns a "not compiled" error.
Package layout
| Package | Role |
|---|---|
external/gateway |
Adapter interface, Hub, IncomingMessage, OutgoingMessage |
external/gateway/access |
CanAccess, EffectiveAccess, EffectiveIsolation — ACL helpers |
external/gateway/sessionstore |
Store: maps stable chat/user keys to Coddy session IDs; 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 (inline keyboards), markdown.go (md → Telegram format) |
Session store
sessionstore.NewPersisted(path) loads/saves a JSON map of key→session-ID on every mutation. The file lives at $CODDY_HOME/sessions/gateway_sessions.json (set in external/gateway/start.go). On restart the bot reloads the map so existing conversations continue without re-sending the one-time initialization hint.
KnownIDs() is called at startup to pre-populate the seenSessions set (prevents re-injecting the Telegram formatting hint into existing sessions after a restart).
SessionRunner interface
Adapters call the session manager through SessionRunner (defined in external/gateway/telegram/bot.go). session.Manager satisfies this interface directly:
type SessionRunner interface {
EnsureHTTPSession(ctx context.Context, sessionID string, defaultCWD string) (*session.State, error)
HandleSessionPromptWithSender(ctx context.Context, params acp.SessionPromptParams, sender acp.UpdateSender, opts *session.PromptRunOpts) (*acp.SessionPromptResult, error)
ForgetLiveSession(sessionID string)
HandleSessionSetMode(ctx context.Context, params acp.SessionSetModeParams) error
HandleSessionSetConfigOption(ctx context.Context, params acp.SessionSetConfigOptionParams) (*acp.SessionSetConfigOptionResult, error)
Cfg() *config.Config
}
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.
- 3d ago First seen · 83 lines · 0 tokens per session scan A b1e41781b941
gateway is a cursor rule published in the GitHub repository coddy-project/coddy-agent (127 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,350 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
workflow
Compatibility shell — routes tasks to skill-based-architecture's self-hosted SKILL.md at repo root.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.