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/logging-tracing-capturegit 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.00023 | $0.01708 |
| Opus 5 | $0.00012 | $0.00854 |
| Sonnet 5 | $0.00005 | $0.00342 |
| Haiku 4.5 | $0.00002 | $0.00171 |
Grade A, and why
logging-tracing-capture scanned grade A with 1 finding 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 3d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(options.url, { How it starts
The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lambda X-Ray Capture & CDK
Tracing AWS SDK Clients
// src/shared/clients/dynamodb.ts
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
import { tracer } from "@/shared/tracer";
let docClient: DynamoDBDocumentClient | undefined;
export function getDynamoDBClient(): DynamoDBDocumentClient {
if (!docClient) {
const client = new DynamoDBClient({});
// Capture AWS SDK calls in X-Ray
tracer.captureAWSv3Client(client);
docClient = DynamoDBDocumentClient.from(client);
}
return docClient;
}
Tracing HTTP Clients (External APIs)
// src/shared/clients/http-client.ts
import { tracer } from "@/shared/tracer";
import { getRequestContext } from "@/shared/observability/request-context";
import { logger } from "@/shared/logger";
interface HttpRequestOptions {
method: "GET" | "POST" | "PUT" | "DELETE";
url: string;
headers?: Record<string, string>;
body?: unknown;
timeout?: number;
}
export async function tracedFetch<T>(options: HttpRequestOptions): Promise<T> {
const context = getRequestContext();
const segment = tracer.getSegment();
const subsegment = segment?.addNewSubsegment(`HTTP ${options.method} ${new URL(options.url).hostname}`);
const startTime = Date.now();
try {
// Add trace context to outgoing request
const headers: Record<string, string> = {
...options.headers,
"X-Correlation-Id": context?.correlationId ?? "",
};
// Propagate X-Ray trace header for downstream tracing
if (process.env._X_AMZN_TRACE_ID) {
headers["X-Amzn-Trace-Id"] = process.env._X_AMZN_TRACE_ID;
}
subsegment?.addAnnotation("correlationId", context?.correlationId ?? "unknown");
subsegment?.addAnnotation("url", options.url);
subsegment?.addAnnotation("method", options.method);
subsegment?.addMetadata("requestHeaders", headers);
const response = await fetch(options.url, {
method: options.method,
headers,
body: options.body ? JSON.stringify(options.body) : undefined,
signal: options.timeout ? AbortSignal.timeout(options.timeout) : undefined,
});
const duration = Date.now() - startTime;
subsegment?.addAnnotation("statusCode", response.status);
subsegment?.addMetadata("responseHeaders", Object.fromEntries(response.headers));
logger.info({
correlationId: context?.correlationId,
url: options.url,
method: options.method,
statusCode: response.status,
durationMs: duration,
}, "External HTTP request completed");
if (!response.ok) {
const error = new Error(`HTTP ${response.status}: ${response.statusText}`);
subsegment?.addError(error);
throw error;
}
return response.json() as Promise<T>;
} catch (error) {
subsegment?.addError(error as Error);
logger.error({
correlationId: context?.correlationId,
url: options.url,
err: error,
}, "External HTTP request failed");
throw error;
} finally {
subsegment?.close();
}
}
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.
- 3d ago First seen · 249 lines · 23 tokens per session scan A 60cc776b7c6b
logging-tracing-capture is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (19 stars, last pushed 6mo ago), licensed MIT. It adds 23 tokens to every session and 1,708 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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
aws-ecs
Definitive guidelines for building, deploying, and operating applications on AWS ECS, emphasizing immutable containers, secure secrets management, and robust operational patterns.
redteam-compute
Compute security sub-agent for an Azure red team engagement. Covers VMs, VMSS, App Service, and Functions. Finds disk encryption gaps, exposed managed identities, plaintext secrets, runCommand exposure, FTP/remote-debug, and missing auth. Containers and Kubernetes (AKS, ACR, Container Apps/Instances) are owned by the…
cloud-workload-cost-estimator
Pre-deployment cost modeling for new workloads, architecture alternatives, and migration plans. Produces estimates the FinOps and Engineering teams both trust, with explicit assumptions and sensitivity ranges.
union-mcp-v2
Rules for using the Union MCP v2 server to run compute- or io-intensive workloads on Flyte.
tanaakk-multi-cloud-iam
クラウド非依存のマルチクラウド IAM 標準(Alibaba/AWS/GCP/Azure に依存しない).
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.