plan-infra

plan-infra is a cursor rule for Cursor from golid-ai/golid. It costs 8 tokens per session (424 once invoked), scanned A, original, MIT.

A planning rule for infrastructure work, including deployment, environments, DNS, secrets, databases, and operational runbooks. It starts with safe operator commands and traces how configuration moves through the deployment process.

In plain words
What is it for?
Use it when planning deployments, environment changes, database operations, secret handling, resets, rollbacks, or custom domains.
Why use it?
Infrastructure changes can fail through incorrect environment settings, unsafe resets, missing rollback steps, or unclear ownership of manual tasks.

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/golid-ai/golid/plan-infra
Clone the repo
git clone --depth 1 https://github.com/golid-ai/golid

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 plan-infra

README.md
[![agentmods](https://agentmods.dev/badge/rules/golid-ai/golid/plan-infra.svg)](https://agentmods.dev/rules/golid-ai/golid/plan-infra)
Your own site
<a href="https://agentmods.dev/rules/golid-ai/golid/plan-infra"><img src="https://agentmods.dev/badge/rules/golid-ai/golid/plan-infra.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 424 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.00008 $0.00424
Opus 5 $0.00004 $0.00212
Sonnet 5 $0.00002 $0.00085
Haiku 4.5 $0.00001 $0.00042

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

Security

Grade A, and why

plan-infra 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 6d 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/plan-infra.mdc · 37 lines

What it actually says

Plan Infrastructure

Thesis: Infra plans start from operator commands and environment boundaries; code changes follow from making those commands safe.

Use this rule for deploy, environment, DNS, reset, secrets, database operations, and runbook plans.

Checklist

  • Define operator commands first, e.g. ./scripts/deploy.sh demo --reset.
  • Verify current infra paths: deploy scripts, Cloud Build files, Dockerfiles, env files, Secret Manager names, DNS/custom domains, migrations, and seed files.
  • Trace every env var across the chain: config file, deploy script, Cloud Run env/secrets, Docker build args for VITE_*, and runtime code.
  • Separate environments by purpose, data, reset policy, third-party credentials, buckets, and auth-cookie posture.
  • State whether custom domains are manual operator steps or script-managed.
  • Name reset/rollback commands and the minimum safety gates required.
  • Include cost/scaling assumptions, especially always-on resources like Cloud SQL.
  • Document the runbook in docs/, not just the plan.

Safety Calibration

  • Match safeguards to the failure mode. Manual demo reset needs fewer gates than scheduled prod data mutation.
  • Prefer simple gates first: explicit env, DB/instance pattern, and DB marker.
  • Add scheduler/concurrency/advisory-lock complexity only when scheduled or concurrent operations actually exist.

Anti-Rationalization

Excuse Counter
"We'll wire the env var during deploy" Env vars fail at the weakest link. Specify config, build, deploy, and runtime plumbing.
"It's only demo data" Demo data is part of the product surface. Seed it around the walkthrough, not convenience.
"The reset script is obviously safe" A tired operator will run the wrong command. Add explicit env and DB guards.
"Costs are small" Cloud Run can scale to zero; Cloud SQL usually cannot. Price always-on resources.
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. 6d ago First seen · 37 lines · 8 tokens per session scan A 0477113e117b

Subscribe to this mod's changes

plan-infra is a cursor rule published in the GitHub repository golid-ai/golid (40 stars, last pushed 2mo ago), licensed MIT. It adds 8 tokens to every session and 424 once invoked, about $0.0000 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-30.