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.
npx agentmods add rules/goranerhartic/cursor-development-rules/cdk-infrastructure-lambdagit clone --depth 1 https://github.com/GoranErhartic/cursor-development-rulesWhat 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 | $0.00017 | $0.01657 |
| Opus 5 | $0.00009 | $0.00829 |
| Sonnet 5 | $0.00003 | $0.00331 |
| Haiku 4.5 | $0.00002 | $0.00166 |
Grade A, and why
cdk-infrastructure-lambda 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.
How it starts
The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lambda Function Construct
Standard Lambda Configuration
// cdk/lib/constructs/lambda-function.ts
import { Construct } from "constructs";
import { Duration } from "aws-cdk-lib";
import {
Runtime,
Tracing,
Architecture,
Function as LambdaFunction,
FunctionProps,
LayerVersion,
} from "aws-cdk-lib/aws-lambda";
import { NodejsFunction, NodejsFunctionProps } from "aws-cdk-lib/aws-lambda-nodejs";
import { RetentionDays } from "aws-cdk-lib/aws-logs";
export interface StandardLambdaProps extends Omit<NodejsFunctionProps, "runtime" | "architecture"> {
/**
* Memory size in MB
*/
memorySize?: number;
/**
* Timeout in seconds
*/
timeoutSeconds?: number;
/**
* Reserved concurrency
*/
reservedConcurrentExecutions?: number;
/**
* Enable X-Ray tracing
*/
enableTracing?: boolean;
/**
* Layers to attach
*/
layers?: LayerVersion[];
}
export class StandardLambda extends NodejsFunction {
constructor(scope: Construct, id: string, props: StandardLambdaProps) {
super(scope, id, {
runtime: Runtime.NODEJS_22_X,
architecture: Architecture.ARM_64, // Cost-effective
memorySize: props.memorySize ?? 512,
timeout: Duration.seconds(props.timeoutSeconds ?? 30),
tracing: props.enableTracing !== false ? Tracing.ACTIVE : Tracing.DISABLED,
logRetention: RetentionDays.TWO_WEEKS,
reservedConcurrentExecutions: props.reservedConcurrentExecutions,
bundling: {
minify: true,
sourceMap: true,
sourcesContent: false,
externalModules: [
"@aws-sdk/*", // Use Lambda-provided SDK
],
esbuildArgs: {
"--tree-shaking": "true",
},
...props.bundling,
},
environment: {
NODE_OPTIONS: "--enable-source-maps",
LOG_LEVEL: "info",
...props.environment,
},
...props,
});
}
}
API Handler Lambda
// cdk/lib/stacks/api-stack.ts
import { Stack, StackProps, Duration } from "aws-cdk-lib";
import { Construct } from "constructs";
import { RestApi, LambdaIntegration, Cors } from "aws-cdk-lib/aws-apigateway";
import { StandardLambda } from "../constructs/lambda-function";
import { Table } from "aws-cdk-lib/aws-dynamodb";
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
interface ApiStackProps extends StackProps {
dataTable: Table;
idempotencyTable: Table;
databaseSecret: Secret;
rdsProxyEndpoint: string;
}
export class ApiStack extends Stack {
public readonly api: RestApi;
constructor(scope: Construct, id: string, props: ApiStackProps) {
super(scope, id, props);
// Create API Gateway
this.api = new RestApi(this, "RealEstateApi", {
restApiName: "Real Estate API",
defaultCorsPreflightOptions: {
allowOrigins: Cors.ALL_ORIGINS,
allowMethods: Cors.ALL_METHODS,
allowHeaders: ["Content-Type", "Authorization", "X-Correlation-Id"],
},
});
// Properties resource
const properties = this.api.root.addResource("properties");
const propertyById = properties.addResource("{propertyId}");
// Create Property Handler
const createPropertyHandler = new StandardLambda(this, "CreateProperty", {
entry: "src/functions/create-property/handler.ts",
handler: "handler",
memorySize: 512,
timeoutSeconds: 30,
environment: {
DYNAMODB_TABLE_NAME: props.dataTable.tableName,
IDEMPOTENCY_TABLE_NAME: props.idempotencyTable.tableName,
DATABASE_URL: `postgresql://user:password@${props.rdsProxyEndpoint}:5432/realestate?connection_limit=1`,
},
});
props.dataTable.grantReadWriteData(createPropertyHandler);
props.idempotencyTable.grantReadWriteData(createPropertyHandler);
props.databaseSecret.grantRead(createPropertyHandler);
properties.addMethod("POST", new LambdaIntegration(createPropertyHandler));
// Get Property Handler
const getPropertyHandler = new StandardLambda(this, "GetProperty", {
entry: "src/functions/get-property/handler.ts",
handler: "handler",
memorySize: 256,
timeoutSeconds: 10,
environment: {
DYNAMODB_TABLE_NAME: props.dataTable.tableName,
},
});
props.dataTable.grantReadData(getPropertyHandler);
propertyById.addMethod("GET", new LambdaIntegration(getPropertyHandler));
// Listings resource
const listings = properties.addResource("listings");
// Search Properties Handler
const searchHandler = new StandardLambda(this, "SearchProperties", {
entry: "src/functions/search-properties/handler.ts",
handler: "handler",
memorySize: 1024,
timeoutSeconds: 30,
environment: {
OPENSEARCH_ENDPOINT: props.opensearchEndpoint,
LISTINGS_INDEX: "listings",
},
});
this.api.root.addResource("search").addMethod(
"GET",
new LambdaIntegration(searchHandler)
);
}
}
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.
- 2d ago First seen · 237 lines · 17 tokens per session scan A 34ca530f78fc
cdk-infrastructure-lambda is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (19 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 1,657 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-08-30.
Other cursor rules, from other repositories
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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.