cursor-deploy

A deployment rulebook for a product with a backend, website, mobile apps, desktop apps, and an admin panel. It defines release order, checks, credential handling, and platform-specific publishing steps.

In plain words
What is it for?
Use it when deploying, launching, or publishing a new version. It covers backend migrations, release gates, desktop builds, Android checks, website updates, and keeping deployment credentials out of the repository.
Why use it?
Releasing connected parts in the wrong order can break interfaces, run unsafe database changes, or leave one client behind. The rules provide a single checklist for coordinating a full release.

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/lawofall/agentcore/cursor-deploy
Clone the repo
git clone --depth 1 https://github.com/Lawofall/AgentCore

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,229 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.00000 $0.01229
Opus 5 $0.00000 $0.00615
Sonnet 5 $0.00000 $0.00246
Haiku 4.5 $0.00000 $0.00123

Measured yesterday against content hash 0763b4a0c95e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursor-deploy 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 yesterday.

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/cursor-deploy.mdc · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

部署规范

完整操作手册 → 发布与门禁.md · 本地发布操作手册。入口壳 → 部署与运维

铁律

  • 凭据禁令deploy/.env.deploy.local 不入仓。禁止在 chat 索要/回显 token、SSH 私钥或其它部署凭据。
  • 不重新启用 deploy/release workflow 的 push/tag/schedule 自动触发。
  • 新增/改接口 → 后端必须先部署。前端 deploy 脚本内置版本漂移门禁。
  • 协议 / UI 混改:api + admin + desktop + Android + website 同一发版窗口一起发(独立 semver,不强制同 tag / 同 SHA)。同船内后端仍先部署。勿把桌面拆到「过几天再补」。
  • 桌面发版:Win = 本地 release:win;Mac = GHA 仅 mac;勿用 GHA 打 Win。官网首装 / updater feed → 发布与门禁 §7.6b
  • 发布前本地一键门禁:pnpm release:gate(含 schema gate)。日常可用 :lite发布仍须全量
  • deploy:backend 前须等 ci.yml 全绿(本地 gate 不含 integration、且 Win≠Linux)→ 发布与门禁 · 决策与落差
  • 后端上线顺序:停旧 api → alembic upgrade → schema gate --live → 起新 api。禁止旧容器接流量时跑破坏性迁移。
  • 紧急续跑 finish:镜像已在机上、finish 因 /data/logs 权限失败 → node deploy/scripts/resume-finish.mjs <short-sha>(chown 后再跑 finish-server.sh)。不是主路径、不是 npm script。

全端发布顺序(速查)

半自动清单(只打印步骤/探针,不替你 Publish):pnpm release:ship--track api = 仅热修轨;--check = 探桌面·Android draft 资产 + updater feed 健康:走公开 DoH 解析后校 TLS 到期与 feed 当前 version,断言版本,勿据此判「没同步」)。full 清单含 Android APK 步(release:android 出包前自动 CORS 预检 → 真机冒烟仅签名安装 / WebView / SSE → Publish android-v*)。

公告两段式:人定「今天发 + 约时」后立刻预告(与 gate / 修拦阻并行);门禁不过则改约时或归档预告。收口在验收完成后发。勿绑进 deploy:backend 自动发。部署前仍须 release:gate 全绿。

pnpm release:notice -- --phase preview …   # 约时后立刻(可与下行并行)
pnpm release:gate                          # Win 默认串行;红灯不得部署
# bump(api 轨会连带同步 uv.lock + openapi info.version)→ commit → push
gh run watch <id> --exit-status            # 等 ci.yml 全绿;Linux 面只有它能兜
pnpm deploy:backend <sha>
# full:Win release:win ∥ Mac GHA → 齐资产后 Publish
# full:Android release:android(CORS 预检自动跑)→ 仅原生面变更才真机(签名安装 / WebView / SSE)再 Publish android-v*;纯 renderer/协议跟发直接转正。其它轨不等 APK。CDN 由脚本末尾 sync(与桌面 v* 分轨)
# full:admin / web →(桌面 Publish 后)website deploy:pages(独立 m. 站已下线,勿再 deploy mobile Pages)
pnpm release:notice -- --phase done …      # 收口
# tag prod-* / desktop-v*

Read the full file on GitHub · 52 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. yesterday First seen · 52 lines · 0 tokens per session scan A 0763b4a0c95e

Subscribe to this mod's changes

cursor-deploy is a cursor rule published in the GitHub repository Lawofall/AgentCore (78 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,229 tokens. 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-30.