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/webhook-co/webhookWrote 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/webhook-co/webhook/engineering-conventions)<a href="https://agentmods.dev/rules/webhook-co/webhook/engineering-conventions"><img src="https://agentmods.dev/badge/rules/webhook-co/webhook/engineering-conventions/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/webhook-co/webhook/engineering-conventions"><img src="https://agentmods.dev/badge/rules/webhook-co/webhook/engineering-conventions.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.00787 | $0.00787 |
| Opus 5.5 | $0.00315 | $0.00315 |
| Sonnet 5.5 | $0.00157 | $0.00157 |
| Haiku 4.5 | $0.00079 | $0.00079 |
Grade A, and why
engineering-conventions 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 1mo 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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Engineering conventions (TypeScript / Workers)
Language & types
- TypeScript everywhere,
stricton. Noanyunless justified with a comment; preferunknown+ narrowing. Validate all external input (webhook bodies, API params) at the boundary with a schema. - Keep
shared/the home for cross-surface types. The same operation across CLI / API / web / MCP should share types — don't redefine payloads per surface. - Node↔Workers tsconfig boundary. Packages export source for live cross-package types, but a
Node-typed package (
types: ["node"]) and a Workers-typed one (types: ["@cloudflare/workers-types"]) must never recompile each other's source — the lib worlds disagree (e.g.@types/node'sUint8Array<ArrayBufferLike>vs the DOMBufferSourcefor WebCrypto). So an internal dependency edge that crosses that boundary resolves to the dep's builtdist/*.d.tsvia tsconfigpaths, not its source; same-world edges stay on source. Use the@webhook-co/*→distwildcard when every internal dep crosses (db); use an exact@webhook-co/<pkg>redirect when only some do (api/mcp → db). Thetsconfig-boundaryguard (scripts/tsconfig-boundary.mjs, wired intolintand CI) fails the build if a cross-boundary edge isn't redirected.
Workers / Durable Objects
- Workers handlers stay thin: validate → delegate → respond. ACK ingestion fast; do delivery work off the request hot path (via the DO + alarms), not inline.
- One Durable Object per endpoint is the ordering/isolation primitive — preserve FIFO semantics and never share a DO across endpoints.
- Schedule retries/backoff with DO Alarms, not hot-path queues. Make delivery idempotent and dedup by event id.
- Never block on long outbound work in a Worker; route heavy/blocking delivery through the container-delivery seam (don't bypass the interface).
- Use bindings (KV, R2, Hyperdrive, DO) — never hardcode endpoints or credentials.
Error handling
- Fail loud internally, fail safe externally. Return Standard-Webhooks-correct status codes; don't leak internal errors, stack traces, secrets, or tenant data to responses or logs.
- Errors are typed and actionable; wrap with context rather than swallowing. Retryable vs terminal failures must be distinguishable so the retry scheduler does the right thing.
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.
- 1mo ago First seen · 56 lines · 787 tokens per session scan A 4b097f0ba44e
engineering-conventions is a cursor rule published in the GitHub repository webhook-co/webhook (0 stars, last pushed 5d ago), licensed Apache-2.0. It adds 787 tokens to every session, about $0.0031 per session on Opus 5.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
new-tool-from-docs
This rule generates tool implementations for the Razorpay MCP server based on API documentation.
boundaries
Package dependency boundaries - tag map and enforced invariants.
hatch3r-api-design
REST, GraphQL, and gRPC contract patterns covering versioning, auth, CORS, pagination, webhooks, rate limiting, and security headers.
php-client-implementation
Guidelines for implementing MCP clients in PHP.
realtime-websockets
Socka-first Durable Object WebSockets, SSR-safe client URLs, no fake localhost. Use for durable-objects/, apps/web, WebSocket forwarding, or @firtoz/socka.
mcp-development
Cursor rule "mcp-development" from floriscornel/todo-mcp, covering mcp development patterns, tool definition structure, error handling patterns, tool naming conventions and response formatting.