awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.
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/sanjeed5/awesome-cursor-rules-mdcnpx agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/dockerWrote 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/sanjeed5/awesome-cursor-rules-mdc/docker)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/docker"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/docker/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/sanjeed5/awesome-cursor-rules-mdc/docker"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/docker.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.01836 | $0.01836 |
| Opus 5.5 | $0.00734 | $0.00734 |
| Sonnet 5.5 | $0.00367 | $0.00367 |
| Haiku 4.5 | $0.00184 | $0.00184 |
Grade A, and why
docker 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
CMD curl -f http://localhost:3000/health || exit 1 Copies of this mod
1 near-identical copy found in the catalogue:
- Docker-guidelines — 100% identical, 21 lines differ
How it starts
The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.
docker Best Practices
Docker is the cornerstone of modern container-first development. Treat your Dockerfile and docker-compose.yml as critical source code. These rules ensure your images are fast, secure, reproducible, and aligned with modern DevOps practices.
1. Optimize for Multi-Stage Builds
Always use multi-stage builds. This pattern isolates build-time dependencies from runtime, drastically reducing final image size and attack surface.
❌ BAD: Single-stage build with all dependencies
FROM node:20
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
CMD ["node", "dist/server.js"]
✅ GOOD: Multi-stage build for production
# Stage 1: Build application artifacts
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production # Install only production dependencies for build
COPY . .
RUN npm run build
# Stage 2: Create minimal runtime image
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules # Copy only necessary runtime modules
USER node # Run as non-root user
EXPOSE 3000
CMD ["node", "dist/server.js"]
2. Choose Minimal, Trusted Base Images
Start with the smallest possible base image from a trusted source (Docker Official Images, Verified Publishers). Alpine variants are often the best choice for minimal footprints.
❌ BAD: Large, generic base image
FROM ubuntu:latest # Too large, many unnecessary packages and vulnerabilities
✅ GOOD: Minimal, specific base image
FROM node:20-alpine # Official, small, specific to Node.js
# Or for static content:
FROM nginx:alpine
3. Leverage .dockerignore
Always use a .dockerignore file to exclude irrelevant files and directories from your build context. This significantly speeds up builds and prevents sensitive or unnecessary files from being copied into the image.
❌ BAD: No .dockerignore (sends node_modules, .git, .env, etc., to the daemon)
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 · 247 lines · 0 tokens per session scan A 71692f33f0d5
docker is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,574 stars, last pushed 5mo ago), licensed CC0-1.0. It adds 1,836 tokens to every session, about $0.0073 per session on Opus 5.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
python-containerization-cursorrules-prompt-file
Cursor rules for Python development with containerization integration.
hack
Hack is local-first. This project uses hack for local runtime orchestration (compose + DNS/TLS + logs + sessions). Prefer hack when shell access is available. Use MCP only when shell access is unavailable.
local-compose-db-lifecycle-for-web-tests
Keep local compose DB lifecycle ready for web tests.
runwhen-infrastructure
Infrastructure conventions for scripts targeting Kubernetes and databases via RunWhen runners.
container-rightsizer
Rightsizes container CPU and memory requests and limits using real usage data. Reduces requested resources without hitting OOMKills or CPU throttling.
kubernetes-helm
Kubernetes and Helm best practices including resource management, security, chart organization, and deployment patterns.