Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/GoranErhartic/cursor-development-rulesnpx agentmods add rules/goranerhartic/cursor-development-rules/multi-environmentWrote 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/goranerhartic/cursor-development-rules/multi-environment)<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/multi-environment"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/multi-environment/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/multi-environment"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/multi-environment.svg" alt="Reviewed on agentmods" width="80" 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.00020 | $0.00986 |
| Opus 5.5 | $0.00008 | $0.00394 |
| Sonnet 5.5 | $0.00004 | $0.00197 |
| Haiku 4.5 | $0.00002 | $0.00099 |
Grade A, and why
multi-environment 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 1mo 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 — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Multi-Environment CDK
Overview
Use CDK context and environment parameters to deploy the same app to dev, staging, and prod with stage-specific configuration. Use conditional resources (e.g. provisioned concurrency only in prod) and stage-aware stack names.
Context and cdk.json
// cdk.json
{
"app": "npx ts-node bin/app.ts",
"context": {
"dev": {
"stage": "dev",
"logLevel": "DEBUG",
"provisionedConcurrency": 0
},
"staging": {
"stage": "staging",
"logLevel": "INFO",
"provisionedConcurrency": 1
},
"prod": {
"stage": "prod",
"logLevel": "WARN",
"provisionedConcurrency": 5
}
}
}
Stage-Aware App Entry
// cdk/bin/app.ts
import "source-map-support/register";
import { App, Environment } from "aws-cdk-lib";
import { DataStack } from "../lib/stacks/data-stack";
import { ApiStack } from "../lib/stacks/api-stack";
const app = new App();
const stage = app.node.tryGetContext("stage") ?? "dev";
const context = app.node.tryGetContext(stage) ?? {};
const env: Environment = {
account: process.env.CDK_DEFAULT_ACCOUNT,
region: process.env.CDK_DEFAULT_REGION ?? "us-east-1",
};
const dataStack = new DataStack(app, `RealEstateData-${stage}`, {
env,
stage,
...context,
});
new ApiStack(app, `RealEstateApi-${stage}`, {
env,
stage,
dataTable: dataStack.dataTable,
idempotencyTable: dataStack.idempotencyTable,
opensearchEndpoint: dataStack.opensearchEndpoint,
...context,
});
app.synth();
Conditional Resources
// cdk/lib/stacks/api-stack.ts
import { Stack, StackProps } from "aws-cdk-lib";
import { Construct } from "constructs";
import { Alias } from "aws-cdk-lib/aws-lambda";
import { StandardLambda } from "../constructs/lambda-function";
interface ApiStackProps extends StackProps {
stage: string;
provisionedConcurrency?: number;
dataTable: Table;
}
export class ApiStack extends Stack {
constructor(scope: Construct, id: string, props: ApiStackProps) {
super(scope, id, props);
const criticalHandler = new StandardLambda(this, "CriticalHandler", {
entry: "src/functions/critical/handler.ts",
handler: "handler",
memorySize: 512,
timeoutSeconds: 30,
environment: {
STAGE: props.stage,
LOG_LEVEL: props.logLevel ?? "INFO",
},
});
if ((props.provisionedConcurrency ?? 0) > 0) {
const version = criticalHandler.currentVersion;
new Alias(this, "CriticalAlias", {
aliasName: "live",
version,
provisionedConcurrentExecutions: props.provisionedConcurrency,
});
}
}
}
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.
- 1mo ago First seen · 153 lines · 20 tokens per session scan A 7e165203936f
multi-environment is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (19 stars, last pushed 7mo ago), licensed MIT. It adds 20 tokens to every session and 986 once invoked, about $0.0001 per session on Opus 5.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.
Other cursor rules, from other repositories
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
aws-ecs
Definitive guidelines for building, deploying, and operating applications on AWS ECS, emphasizing immutable containers, secure secrets management, and robust operational patterns.
aws-rds-best-practices
AWS RDS PostgreSQL best practices - database configuration, connection management, authentication, backup, and performance optimization standards.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.