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/d-padmanabhan/agent-engineering-handbook/325-networkinggit clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbookWrote 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/d-padmanabhan/agent-engineering-handbook/325-networking)<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/325-networking"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/325-networking.svg" alt="Measured on agentmods" 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 | $0.00039 | $0.02634 |
| Opus 5 | $0.00019 | $0.01317 |
| Sonnet 5 | $0.00008 | $0.00527 |
| Haiku 4.5 | $0.00004 | $0.00263 |
Grade A, and why
325-networking scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **Python:** module-level `requests.Session()` (or `httpx.Client`) with a mounted `HTTPAdapter`; do not call `requests.get()` ad-hoc in hot paths. How it starts
The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Networking & Transport Non-Negotiables
Audience: engineers editing protobuf schemas, gRPC client/server code, network configuration (load balancers, edge), or HTTP client wiring.
Scope: the rules that auto-load when you touch those files. The depth and reasoning live in the networking-transport skill (skills/networking-transport/SKILL.md plus references for the gRPC-vs-REST decision matrix and protobuf schema evolution). This rule codifies the non-negotiables so they appear in context without needing to invoke the skill.
[!IMPORTANT] This rule complements
320-api-design.mdc(API surface: verbs, status codes, versioning) and316-zero-trust.mdcSection 2 (network-tier security on top of the transport). Use this rule for transport-and-wire choices; use those for the API surface and the auth model.
Transport non-negotiables
NN1. HTTP and gRPC clients are reused across requests
A fresh client per request defeats connection pooling, defeats TCP keepalive, and burns 50-150ms / call on TCP+TLS handshake. The single most common production performance bug.
- Go: package-level
http.Clientwith a tunedTransport; do not construct one per call. - Python: module-level
requests.Session()(orhttpx.Client) with a mountedHTTPAdapter; do not callrequests.get()ad-hoc in hot paths. - Node: shared
https.Agent({ keepAlive: true })passed viafetch(url, { agent })(Node 18 and older defaults tokeepAlive: false). - gRPC: one
Channelper(target, credentials)pair, reused for the process lifetime; nevernew Channel()per call.
NN2. TCP keepalive is set explicitly and tuned below the load balancer idle timeout
Linux defaults (tcp_keepalive_time = 7200s = 2 hours) are wrong for cloud. Load balancers cut idle connections much sooner; the client never notices until the next send fails.
Set keepalive interval less than the proxy's idle timeout:
| Proxy | Idle timeout | Suggested keepalive |
|---|---|---|
| AWS Network Load Balancer (NLB) | 350s (fixed) | 60-120s |
| AWS Application LB (ALB) | 60s default (1-4000s configurable) | 30s (or half the configured) |
| AWS API Gateway REST | 29s (fixed) | Don't keepalive; reconnect per request |
| Cloudflare WebSocket | ~100s free / ~300s paid | Application-level heartbeat every 30-60s |
Nginx (proxy_read_timeout) |
60s | 30s |
Envoy (stream_idle_timeout) |
1h | 30-300s by use case |
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 First seen · 212 lines · 39 tokens per session scan A 04d56c6d1c3a
325-networking is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (16 stars, last pushed 5d ago), licensed MIT. It adds 39 tokens to every session and 2,634 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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
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.
family-instance-domain-actions
Family instance domain action implementation patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
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.