devops-infrastructure

A set of working rules for running software infrastructure. It covers Docker containers, Kubernetes clusters, Terraform configuration, automated build pipelines, and cloud deployment.

In plain words
What is it for?
Use it to build and validate containers, manage Kubernetes deployments, define infrastructure with Terraform, and check automated delivery configurations.
Why use it?
It helps prevent infrastructure changes from being made blindly by checking existing files, installed tools, and configuration validity first.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/madebyaris/rakitui-ai/devops-infrastructure
Clone the repo
git clone --depth 1 https://github.com/madebyaris/rakitui-ai

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 4,736 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.04736
Opus 5 $0.00000 $0.02368
Sonnet 5 $0.00000 $0.00947
Haiku 4.5 $0.00000 $0.00474

Measured 2d ago against content hash e3ba8bcb273f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

devops-infrastructure scanned grade B with 2 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

# Never run as root

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
.cursor/rules/devops-infrastructure.mdc · 914 lines

How it starts

The opening of the file, as written. The whole thing — 914 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DevOps & Infrastructure Patterns

Containerization, orchestration, infrastructure as code, and CI/CD best practices.

CRITICAL: Agentic-First DevOps

Pre-Development Verification (MANDATORY)

Before writing ANY DevOps configuration:

1. CHECK TOOL AVAILABILITY
   → run_terminal_cmd("docker --version")
   → run_terminal_cmd("kubectl version --client")
   → run_terminal_cmd("terraform --version")
   → run_terminal_cmd("helm version")
   
2. VERIFY CURRENT VERSIONS (use web_search)
   → web_search("Terraform latest version December 2024")
   → web_search("Kubernetes latest stable version 2024")
   → web_search("Docker best practices 2024")
   
3. CHECK EXISTING INFRASTRUCTURE
   → Read existing Dockerfile, docker-compose.yml, *.tf files
   → Understand current state before modifying
   → Check terraform.tfstate or remote state
   
4. VALIDATE CONFIGURATIONS BEFORE APPLYING
   → terraform validate
   → docker-compose config
   → kubectl apply --dry-run=client

CLI-First DevOps Workflow

ALWAYS use CLI for validation:

# Docker
docker build -t test:latest .
docker-compose config  # Validate compose file
docker-compose up --dry-run  # Test without running

# Kubernetes
kubectl apply --dry-run=client -f manifest.yaml
kubectl diff -f manifest.yaml  # See changes before applying
kubeval manifest.yaml  # Validate against schema

# Terraform
terraform init
terraform fmt -recursive
terraform validate
terraform plan -out=tfplan  # ALWAYS plan before apply

# Helm
helm lint ./my-chart
helm template ./my-chart  # Render templates locally
helm install --dry-run --debug my-release ./my-chart

Post-Edit Verification

After ANY infrastructure code changes:

# Docker
docker build --no-cache -t test:latest .
docker run --rm test:latest echo "Build verified"

# Terraform
terraform fmt -check -recursive
terraform validate
terraform plan

# Kubernetes
kubectl apply --dry-run=server -f .  # Server-side validation
kubectl get events --sort-by='.lastTimestamp'  # Check for issues

Read the full file on GitHub · 914 lines

Changes

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.

  1. 2d ago First seen · 914 lines · 0 tokens per session scan B e3ba8bcb273f

Subscribe to this mod's changes

devops-infrastructure is a cursor rule published in the GitHub repository madebyaris/rakitui-ai (5 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,736 tokens. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.