advance-minimax-m3-cursor-rules / rules
Cursor rule126 starsChanged 6 months agoMITView on GitHub
DevOps and infrastructure: Docker, Kubernetes, Terraform, CI/CD. Load when editing Dockerfiles, compose, k8s manifests, Terraform, or workflow YAML — not for application code.
- Reads credentials
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository27 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- .cursor/rules/3d-graphics.mdcCursor rule
- .cursor/rules/agent-teams.mdcCursor rule
- .cursor/rules/clarify-first-prompting.mdcCursor rule
- .cursor/rules/cursor-agent-orchestration.mdcCursor rule
- .cursor/rules/cursor-mcp-optimization.mdcCursor rule
- .cursor/rules/cursor-tools-mastery.mdcCursor rule
- .cursor/rules/design-systems.mdcCursor rule
- .cursor/rules/fable5-coding-craft.mdcCursor rule
- .cursor/rules/fable5-reasoning.mdcCursor rule
- .cursor/rules/language-agnostic-patterns.mdcCursor rule
- .cursor/rules/minimax-m3-core.mdcCursor rule
- .cursor/rules/minimax-m3-self-evolution.mdcCursor rule
- .cursor/rules/minimax-m3-status-verification.mdcCursor rule
- .cursor/rules/minimax-m3-verification.mdcCursor rule
- .cursor/rules/minimax-mcp-tools.mdcCursor rule
- .cursor/rules/mobile-cross-platform.mdcCursor rule
- .cursor/rules/model-compatibility.mdcCursor rule
- .cursor/rules/skill-authoring.mdcCursor rule
- .cursor/rules/tool-discovery.mdcCursor rule
- 3d-web-experiencesSkill
- anti-slop-designSkill
- deep-researchSkill
- incident-triage-harnessSkill
- minimax-m3-long-contextSkill
- minimax-m3-multimodal-inputSkill
- minimax-multimodal-toolkitSkill
The file
We split this devops-infrastructure.mdc into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Read existing Docker, compose, k8s, Terraform, Helm, and CI workflow files in this repo first.
- Distinctive: line 20
Prefer plan / dry-run / validate before apply / deploy / push.
- Very specific: line 35
Never recommend terraform apply, kubectl apply, or production deploy without a plan/dry-run step unless the user explicitly skips it.
- Very specific: line 76
Treat .env, kubeconfig, and TF state as sensitive — never paste contents into chat or commits.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: "DevOps and infrastructure: Docker, Kubernetes, Terraform, CI/CD. Load when editing Dockerfiles, compose, k8s manifests, Terraform, or workflow YAML — not for application code."
globs: ["**/Dockerfile*", "**/*.tf", "**/docker-compose*.yml", "**/docker-compose*.yaml", "**/k8s/**", "**/.github/workflows/**", "**/.gitlab-ci.yml", "**/Jenkinsfile", "**/cloudbuild.yaml", "**/terraform/**", "**/helm/**"]
alwaysApply: false
---
# DevOps & Infrastructure Patterns
Mechanical reference for containerization, orchestration, IaC, and CI/CD. For general coding workflow (read-before-edit, minimal diff, verification labels), the always-on core **Code Discipline** and **App And Scaffold Discipline** sections are canonical.
Load this rule when touching infrastructure files matched by globs. For unfamiliar provider APIs or version-sensitive changes, verify against current official docs (or use the `deep-research` skill) — do not invent flags, resource names, or provider syntax.
---
## Before Changing Infrastructure
1. Read existing Docker, compose, k8s, Terraform, Helm, and CI workflow files in this repo first.
2. Note pinned base images, provider versions, and environment naming — match them unless the task requires a deliberate upgrade.
3. Identify blast radius: prod deploy, secrets, stateful resources, and rollback path.
4. Prefer **plan / dry-run / validate** before **apply / deploy / push**.
---
## Validate Before Apply
| Tool | Smallest useful check |
|------|------------------------|
| Docker | `docker build -t test:local .` |
| Compose | `docker compose config` |
| Kubernetes | `kubectl apply --dry-run=client -f …` or `kubectl diff -f …` |
| Terraform | `terraform fmt -check`, `terraform validate`, `terraform plan` |
| Helm | `helm lint`, `helm template` (render locally) |
| GitHub Actions | YAML syntax + action pin review; run workflow on a branch when safe |
Never recommend `terraform apply`, `kubectl apply`, or production deploy without a plan/dry-run step unless the user explicitly skips it.
---
## Decision Quick Reference
| Need | Prefer |
|------|--------|
| Local dev stack | Docker Compose when sufficient; k8s only when repo already uses it |
| Secrets | Platform secret stores / CI secrets — never commit plaintext |
| CI | Extend existing workflow patterns in `.github/workflows/` rather than inventing a parallel pipeline |
| Image tags | Pin major.minor (or digest); avoid `:latest` in anything that ships |
| Terraform state | Remote backend + locking when team/shared; do not hand-edit state |
---
## Common Traps
- **YAML tabs** — spaces only (2-space indent is standard).
- **Unquoted YAML scalars** — quote version strings and booleans when they must stay strings (`"1.0"`, `"true"`).
- **Secrets in repo** — no passwords, tokens, or keys in Dockerfile `ENV`, compose, or workflow YAML; use `${{ secrets.* }}`, K8s `secretKeyRef`, or TF variables from a vault.
- **`:latest` base images** — pin `node:20-alpine`, `python:3.12-slim`, etc.; verify current tags against official registries.
- **Blind apply** — skipping `plan` / dry-run on shared or production infra.
- **Drift from repo conventions** — new services that ignore existing naming, networks, labels, or backend config.
---
## CI/CD Discipline
- Reuse job names, runner labels, cache keys, and artifact patterns already in the repo.
- Pin third-party GitHub Actions to a commit SHA or semver tag — not `@main`.
- Scope secrets to the minimum job that needs them.
- For deploy workflows: require manual approval or environment gates when the repo already uses them; do not remove safety rails opportunistically.
---
## Security (infra-specific)
- Least-privilege IAM / service accounts; no admin credentials in CI logs.
- Scan images when the repo already has Trivy/Snyk/similar — do not add heavy tooling unprompted.
- Network policies / security groups: default deny between services unless the architecture requires otherwise.
- Treat `.env`, kubeconfig, and TF state as sensitive — never paste contents into chat or commits.
---
## Verification After Changes
Match proof to the claim (see always-on status-verification rule):
| Change | Minimum proof |
|--------|----------------|
| Dockerfile / compose | `docker build` or `docker compose config` succeeds |
| k8s manifest | dry-run or schema validation passes |
| Terraform | `validate` + `plan` with expected diff |
| CI workflow | YAML valid; optional dry-run on branch if user allows |
Label deploy/runtime behavior as `unverified` until exercised in the target environment.
---
## When NOT to Load This File
- Application logic, API handlers, or UI — use core **Code Discipline** instead.
- Full cloud architecture from scratch — inspect the repo and ask on real forks (provider, region, existing VPC/cluster).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

