backend-guidelines

backend-guidelines is a cursor rule for Cursor from Oriolshhh/runware-image-mcp. It costs 17 tokens per session (726 once invoked), scanned A, original, MIT.

A set of rules for building and reviewing server-side code, including APIs, data storage, validation, jobs, and integrations.

In plain words
What is it for?
Use it for backend services, HTTP or command-line interfaces, databases, queues, webhooks, migrations, caching, and operational changes.
Why use it?
It helps handle untrusted input, old data, retries, concurrent requests, authorization, and partial failures safely.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Install

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.

agentmods
npx agentmods add rules/oriolshhh/runware-image-mcp/backend-guidelines
Clone the repo
git clone --depth 1 https://github.com/Oriolshhh/runware-image-mcp

Made for: Cursor.

Wrote 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.

agentmods badge for backend-guidelines

README.md
[![agentmods](https://agentmods.dev/badge/rules/oriolshhh/runware-image-mcp/backend-guidelines.svg)](https://agentmods.dev/rules/oriolshhh/runware-image-mcp/backend-guidelines)
Your own site
<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>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 726 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2d ago against content hash fe71c4fe1638, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

.cursor/rules/backend-guidelines.mdc · 76 lines

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

  1. Validate at trust boundaries: user input, HTTP/CLI args, files, environment, database records from older versions, webhooks, and third-party responses.
  2. Keep domain rules close to domain logic. Do not bury business policy inside route handlers, persistence adapters, or transport glue.
  3. Make API contracts explicit: request/response shape, status/error behavior, pagination, idempotency, compatibility, and authorization.
  4. Handle persistence deliberately: transactions, ordering, uniqueness, migrations, rollback, nullability, and large-data behavior.
  5. Design for retries and partial failure. External calls need timeouts, backoff/retry policy when appropriate, idempotency, and observable errors.
  6. Treat auth and authorization as separate checks. Authentication proves who; authorization proves whether the action is allowed for this resource.
  7. Avoid leaking secrets or sensitive data in logs, errors, metrics, test snapshots, generated files, or client-visible responses.
  8. Keep configuration typed, validated, documented, and safe by default. Missing config should fail loudly when required.
  9. 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.
  10. Report operational impact: migrations, new env vars, background jobs, performance risks, observability, rollout, and rollback.

Read the full file on GitHub · 76 lines

Changes

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.

  1. 2d ago First seen · 76 lines · 17 tokens per session scan A fe71c4fe1638

Subscribe to this mod's changes

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.