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/cdk-infrastructure-queuesWrote 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/cdk-infrastructure-queues)<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-queues"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-queues/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/cdk-infrastructure-queues"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/cdk-infrastructure-queues.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.00014 | $0.01554 |
| Opus 5.5 | $0.00006 | $0.00622 |
| Sonnet 5.5 | $0.00003 | $0.00311 |
| Haiku 4.5 | $0.00001 | $0.00155 |
Grade A, and why
cdk-infrastructure-queues 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 3mo 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 — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CDK Infrastructure
Overview
AWS CDK (Cloud Development Kit) enables infrastructure-as-code in TypeScript. This guide covers production-ready patterns for real estate Lambda applications.
Note: As of 2025, the CDK CLI and Construct Library have separate version lines. The CLI uses 2.1000+ numbering; the construct library (e.g. aws-cdk-lib) continues 2.x (e.g. 2.238+). Both work together—use aws-cdk-lib@^2.238.0 and the latest CLI.
Project Structure
cdk/
├── bin/
│ └── app.ts # CDK app entry point
├── lib/
│ ├── stacks/
│ │ ├── api-stack.ts # API Gateway + Lambda handlers
│ │ ├── messaging-stack.ts # SNS, SQS, retry queues
│ │ ├── data-stack.ts # DynamoDB, RDS, OpenSearch
│ │ └── monitoring-stack.ts # CloudWatch, alarms
│ └── constructs/
│ ├── sqs-retry-ladder.ts # Reusable retry queue pattern
│ ├── lambda-function.ts # Standard Lambda configuration
│ └── dynamodb-table.ts # Table with GSIs
├── cdk.json
├── tsconfig.json
└── package.json
Dependencies
pnpm add -D aws-cdk-lib constructs @types/node esbuild
SQS Retry Ladder Pattern
Construct Definition
// cdk/lib/constructs/sqs-retry-ladder.ts
import { Construct } from "constructs";
import { Duration, RemovalPolicy } from "aws-cdk-lib";
import { Queue, DeadLetterQueue } from "aws-cdk-lib/aws-sqs";
export interface RetryLadderProps {
/**
* Base name for the queues
*/
queueName: string;
/**
* Delay configuration for each retry tier
*/
retryDelays?: {
tier1Seconds: number;
tier2Seconds: number;
tier3Seconds: number;
};
/**
* Max receive count before moving to next tier
*/
maxReceiveCount?: number;
/**
* Message retention period
*/
retentionPeriod?: Duration;
/**
* Visibility timeout for processing
*/
visibilityTimeout?: Duration;
}
export class SqsRetryLadder extends Construct {
public readonly mainQueue: Queue;
public readonly retryQueue1: Queue;
public readonly retryQueue2: Queue;
public readonly retryQueue3: Queue;
public readonly deadLetterQueue: Queue;
constructor(scope: Construct, id: string, props: RetryLadderProps) {
super(scope, id);
const retryDelays = props.retryDelays ?? {
tier1Seconds: 30,
tier2Seconds: 300, // 5 minutes
tier3Seconds: 1800, // 30 minutes
};
const maxReceiveCount = props.maxReceiveCount ?? 3;
const retentionPeriod = props.retentionPeriod ?? Duration.days(14);
const visibilityTimeout = props.visibilityTimeout ?? Duration.seconds(30);
// Dead Letter Queue (final destination for failed messages)
this.deadLetterQueue = new Queue(this, "DLQ", {
queueName: `${props.queueName}-dlq`,
retentionPeriod: Duration.days(14),
removalPolicy: RemovalPolicy.RETAIN,
});
// Retry Queue 3 → DLQ
this.retryQueue3 = new Queue(this, "RetryQueue3", {
queueName: `${props.queueName}-retry-3`,
deliveryDelay: Duration.seconds(retryDelays.tier3Seconds),
visibilityTimeout,
retentionPeriod,
deadLetterQueue: {
queue: this.deadLetterQueue,
maxReceiveCount,
},
});
// Retry Queue 2 → Retry Queue 3
this.retryQueue2 = new Queue(this, "RetryQueue2", {
queueName: `${props.queueName}-retry-2`,
deliveryDelay: Duration.seconds(retryDelays.tier2Seconds),
visibilityTimeout,
retentionPeriod,
deadLetterQueue: {
queue: this.retryQueue3,
maxReceiveCount,
},
});
// Retry Queue 1 → Retry Queue 2
this.retryQueue1 = new Queue(this, "RetryQueue1", {
queueName: `${props.queueName}-retry-1`,
deliveryDelay: Duration.seconds(retryDelays.tier1Seconds),
visibilityTimeout,
retentionPeriod,
deadLetterQueue: {
queue: this.retryQueue2,
maxReceiveCount,
},
});
// Main Queue → Retry Queue 1
this.mainQueue = new Queue(this, "MainQueue", {
queueName: props.queueName,
visibilityTimeout,
retentionPeriod,
deadLetterQueue: {
queue: this.retryQueue1,
maxReceiveCount,
},
});
}
/**
* Returns all queue URLs as environment variables
*/
public getEnvironmentVariables(): Record<string, string> {
return {
MAIN_QUEUE_URL: this.mainQueue.queueUrl,
RETRY_QUEUE_1_URL: this.retryQueue1.queueUrl,
RETRY_QUEUE_2_URL: this.retryQueue2.queueUrl,
RETRY_QUEUE_3_URL: this.retryQueue3.queueUrl,
DLQ_URL: this.deadLetterQueue.queueUrl,
};
}
}
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.
- 3mo ago First seen · 217 lines · 14 tokens per session scan A ca68a8483a05
cdk-infrastructure-queues is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (20 stars, last pushed 9mo ago), licensed MIT. It adds 14 tokens to every session and 1,554 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.
cdk-infrastructure-queues compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cdk-infrastructure-queuesGoranErhartic/cursor-development-rules | Cursor rule | 20 | 9mo ago | MIT | A | 14 | Cursor |
| aws-ecssanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 8d ago | CC0-1.0 | A | 2,640 | Cursor |
| log-watchbriiirussell/cybersecurity-skills | Cursor rule | 542 | yesterday | MIT | A | 184 | Cursor |
| beanstalk-deploypr-pm/prpm | Cursor rule | 125 | 1mo ago | MIT | A | 0 | Cursor |
| deploymentlacymorrow/paperclip-hub | Cursor rule | 16 | 2d ago | MIT | A | 0 | Cursor |
| advisor-routingmicrosoft/azure-skills | Cursor rule | 1.7k | today | MIT | A | 37 | Cursor |
| aws-rds-best-practicesbeettlle/CursorRules | Cursor rule | 2 | 15d ago | none | A | 0 | Cursor |