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/oriolshhh/runware-image-mcp/backend-guidelinesgit clone --depth 1 https://github.com/Oriolshhh/runware-image-mcpWrote 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/oriolshhh/runware-image-mcp/backend-guidelines)<a href="https://agentmods.dev/rules/oriolshhh/runware-image-mcp/backend-guidelines"><img src="https://agentmods.dev/badge/rules/oriolshhh/runware-image-mcp/backend-guidelines.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.1 | $0.00017 | $0.00726 |
| Opus 5 | $0.00009 | $0.00363 |
| Sonnet 5 | $0.00003 | $0.00145 |
| Haiku 4.5 | $0.00002 | $0.00073 |
Grade A, and why
backend-guidelines 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 2d 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 — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: backend-guidelines
Backend Guidelines
Purpose
Keep backend changes correct under real-world inputs, failures, concurrency, security boundaries, and operational constraints.
When to use it
- Implementing or reviewing APIs, commands, services, jobs, storage, queues, auth, permissions, integrations, or server-side business logic.
- Adding validation, serialization, caching, retries, transactions, migrations, or configuration.
- Debugging backend failures where root cause may involve data shape, race conditions, external services, or environment differences.
Instructions
- Validate at trust boundaries: user input, HTTP/CLI args, files, environment, database records from older versions, webhooks, and third-party responses.
- Keep domain rules close to domain logic. Do not bury business policy inside route handlers, persistence adapters, or transport glue.
- Make API contracts explicit: request/response shape, status/error behavior, pagination, idempotency, compatibility, and authorization.
- Handle persistence deliberately: transactions, ordering, uniqueness, migrations, rollback, nullability, and large-data behavior.
- Design for retries and partial failure. External calls need timeouts, backoff/retry policy when appropriate, idempotency, and observable errors.
- Treat auth and authorization as separate checks. Authentication proves who; authorization proves whether the action is allowed for this resource.
- Avoid leaking secrets or sensitive data in logs, errors, metrics, test snapshots, generated files, or client-visible responses.
- Keep configuration typed, validated, documented, and safe by default. Missing config should fail loudly when required.
- Add tests at the right level: unit tests for domain rules, integration tests for contracts/persistence, regression tests for bugs, and boundary tests for invalid input and permission failures.
- Report operational impact: migrations, new env vars, background jobs, performance risks, observability, rollout, and rollback.
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.
- 2d ago First seen · 76 lines · 17 tokens per session scan A fe71c4fe1638
backend-guidelines is a cursor rule published in the GitHub repository Oriolshhh/runware-image-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 726 once invoked, about $0.0001 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-09-03.
Other cursor rules, from other repositories
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
query-optimization
查詢優化、EXPLAIN、index 設計與 RLS 效能測量.
ehs-ims-conventions
EHS IMS app — RBAC, data layer, tRPC, migrations, AI boundaries.