yaml-config

yaml-config is a cursor rule for Cursor from inboxpraveen/Minimize-Cursor-Cost. It costs 0 tokens per session (574 once invoked), scanned A, original, Apache-2.0.

Coding rules for YAML and infrastructure configuration files, including Docker, Kubernetes, Terraform, and GitHub Actions. They preserve whitespace, key order, quoting, and the existing structure.

In plain words
What is it for?
Use it when editing YAML manifests, Dockerfiles, Docker Compose files, Kubernetes or Helm files, Terraform, or GitHub Actions configuration.
Why use it?
YAML depends on indentation, and infrastructure edits can change deployments or invalidate build caches. These rules keep changes narrow and consistent with the existing configuration.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when editing YAML manifests, Dockerfiles, Docker Compose files, Kubernetes or Helm files, Terraform, or GitHub Actions configuration.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/inboxpraveen/minimize-cursor-cost/yaml-config
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.

Clone the repo
git clone --depth 1 https://github.com/inboxpraveen/Minimize-Cursor-Cost

Made for: Cursor.

Wrote 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.

agentmods badge for yaml-config

README.md
[![agentmods](https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/yaml-config/github.svg)](https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/yaml-config)
Your own site
<a href="https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/yaml-config"><img src="https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/yaml-config/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.

agentmods 80×15 button for yaml-config

Your own site · 80×15
<a href="https://agentmods.dev/rules/inboxpraveen/minimize-cursor-cost/yaml-config"><img src="https://agentmods.dev/badge/rules/inboxpraveen/minimize-cursor-cost/yaml-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00574
Opus 5 $0.00000 $0.00287
Sonnet 5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00057

Measured 9d ago against content hash 6cdd8093998b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

yaml-config 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 9d 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.

lean-cursor/.cursor/rules/yaml-config.mdc · 62 lines

How it starts

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

YAML / Config / Infra Rules

Universal

  • Match existing indentation exactly. YAML is whitespace-sensitive — never change indent width.
  • Match existing key ordering; don't sort alphabetically as a side-effect.
  • Match existing quoting (none / single / double).
  • Show only the changed key(s) and the minimum surrounding context to anchor location.

Output

  • For a single key change, show the parent path + the changed line:
    spec:
      template:
        spec:
          containers:
            - name: api
              image: myrepo/api:v1.4.2  # ← changed
    
  • Don't reprint the entire manifest.

Dockerfile

  • Match existing base image strategy; don't switch from alpine to debian unless asked.
  • Don't reorder layers — that invalidates caches the user is depending on.
  • Don't combine/split RUN instructions unless that's the task.
  • Don't add HEALTHCHECK / USER / LABEL unless siblings have them.

docker-compose

  • Match existing version key.
  • Don't add new services to a feature task — only what's asked.
  • Don't change exposed ports unless requested.

Kubernetes / Helm

  • Don't change apiVersion unless that's the explicit task.
  • Don't add new resources (HPA, PDB, NetworkPolicy) speculatively.
  • Match existing label/annotation conventions exactly.
  • For Helm: don't move values between values.yaml and templates without flagging.

Terraform

  • Match existing module structure — don't refactor into new modules.
  • Don't change provider versions while doing a feature.
  • Don't add new providers.
  • Match existing variable naming (snake_case is conventional).
  • Show only the changed resource / module block.

GitHub Actions / CI

  • Match existing workflow trigger style.
  • Don't add new actions/marketplace dependencies without flagging.
  • Don't pin/unpin action versions as a side-effect.
  • Don't add caching steps to workflows that don't have them — that changes runtime behavior.

Never

  • Don't add comments to production manifests unless a value is non-obvious.
  • Don't introduce environment variables that need new secrets without flagging.
  • Don't change resource limits/requests as a side-effect.
  • Don't suggest "switch to a different infra tool" as a fix.

Read the full file on GitHub · 62 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. 9d ago First seen · 62 lines · 0 tokens per session scan A 6cdd8093998b

Subscribe to this mod's changes

yaml-config is a cursor rule published in the GitHub repository inboxpraveen/Minimize-Cursor-Cost (7 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 574 tokens. 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-31.