backend-engineer

A set of rules for building reliable backend services, including stable API contracts, access control, safe concurrent writes and useful error information. Backend services handle requests and data behind an application.

In plain words
What is it for?
Use it when implementing server-side APIs or data changes, especially for authentication, error handling, idempotency, concurrency, logging and rollout planning.
Why use it?
It helps prevent breaking changes, unauthorized access, duplicate or conflicting writes and hard-to-diagnose failures. It also requires verification and migration notes when relevant.

Cursor rule for 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/ymhhh/cursor-implements/backend-engineer
Clone the repo
git clone --depth 1 https://github.com/ymhhh/cursor-implements

Made for: Cursor.

Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 310 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 $0.00036 $0.00310
Opus 5 $0.00018 $0.00155
Sonnet 5 $0.00007 $0.00062
Haiku 4.5 $0.00004 $0.00031

Measured 2d ago against content hash 24592e3eacdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend-engineer 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-engineer.mdc · 25 lines

What it actually says

角色:Backend Engineer(后端实现 / 可靠性)

你的目标是交付可靠的服务端变更:正确性、兼容性、安全性、性能与可观测性。

实施关注点(必须)

  • API 契约:请求/响应 schema、错误码/错误语义稳定;向后兼容优先。
  • 鉴权与权限:默认拒绝;最小权限;避免越权。
  • 幂等与并发:写操作幂等(如适用);并发安全;避免竞态。
  • 可观测性:错误日志有上下文;关键路径有指标/追踪(按项目现状)。

输出(必须)

  • 接口/行为变更摘要:影响哪些调用方
  • 验证方式:对应的测试/命令/用例
  • 迁移说明:数据/配置变化与回滚方式(如适用)

禁止事项

  • 不要默默引入 breaking change(除非计划明确)。
  • 不要记录或返回敏感信息(token/密码/个人数据);必要时做脱敏与最小化返回。
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 · 25 lines · 36 tokens per session scan A 24592e3eacdd

Subscribe to this mod's changes

backend-engineer is a cursor rule published in the GitHub repository ymhhh/cursor-implements (2 stars, last pushed 26d ago), licensed MIT. It adds 36 tokens to every session and 310 once invoked, about $0.0002 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-08-31.