keda

keda is a cursor rule for Cursor from nitinjain999/platform-skills. It costs 0 tokens per session (977 once invoked), scanned A, original, Apache-2.0.

A set of rules for generating KEDA autoscaling resources in Kubernetes. KEDA automatically changes the number of running application copies based on events such as queue length.

In plain words
What is it for?
Use it when creating or reviewing KEDA ScaledObjects and ScaledJobs, including their target workloads, scaling limits, timing settings, triggers, and authentication.
Why use it?
It helps prevent unsafe scaling setups, missing limits, inline credentials, and unstable scaling behavior.

Cursor rule for Cursor

Written for Cursor: installed under .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/nitinjain999/platform-skills/keda
Clone the repo
git clone --depth 1 https://github.com/nitinjain999/platform-skills

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 keda

README.md
[![agentmods](https://agentmods.dev/badge/rules/nitinjain999/platform-skills/keda.svg)](https://agentmods.dev/rules/nitinjain999/platform-skills/keda)
Your own site
<a href="https://agentmods.dev/rules/nitinjain999/platform-skills/keda"><img src="https://agentmods.dev/badge/rules/nitinjain999/platform-skills/keda.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 977 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.1 $0.00000 $0.00977
Opus 5 $0.00000 $0.00489
Sonnet 5 $0.00000 $0.00195
Haiku 4.5 $0.00000 $0.00098

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

Security

Grade A, and why

keda 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 6d 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.

.cursor/rules/keda.mdc · 115 lines

How it starts

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

KEDA Rules

Always generate ScaledObject and ScaledJob resources with all of the following. Missing any item is a Critical finding.

Required fields on every ScaledObject

spec:
  scaleTargetRef:
    apiVersion: apps/v1           # Always explicit — don't rely on the default
    kind: Deployment              # Or StatefulSet — be explicit
    name: <exact-deployment-name>

  minReplicaCount: 1              # Use 0 only when cold-start latency is acceptable and documented
  maxReplicaCount: <N>            # Always set — never omit the ceiling

  pollingInterval: 30             # 30s is a safe default; lower only for latency-sensitive queues
  cooldownPeriod: 300             # 5-minute cooldown prevents thrashing

  advanced:
    restoreToOriginalReplicaCount: true   # Always set — restores replicas on ScaledObject deletion

Required on every trigger

triggers:
  - type: <scaler>
    metadata:
      activationThreshold: "<N>"  # or activationQueueLength / activationLagThreshold
      # Prevents activation on noise/sparse events
    authenticationRef:
      name: <trigger-auth-name>   # Always use TriggerAuthentication — never inline credentials

TriggerAuthentication: prefer Pod Identity

# ✅ Best practice — no static credentials
spec:
  podIdentity:
    provider: aws                 # aws | azure | gcp | aws-eks

# ⚠️ Only when Pod Identity is unavailable — rotate keys; scope the Secret tightly
spec:
  secretTargetRef:
    - parameter: <param>
      name: <secret-name>
      key: <key>

Scaler-specific minimum IAM permissions (least privilege)

Scaler Minimum permission
aws-sqs-queue sqs:GetQueueAttributes, sqs:GetQueueUrl — NOT sqs:ReceiveMessage
kafka consumer group describe + offset fetch — NOT produce
azure-servicebus Listen on the specific queue or subscription only
prometheus No auth for cluster-internal Prometheus

Cron scaler rules

# Cron windows must not overlap.
# Always pair with a Prometheus/queue trigger as a safety net for unexpected spikes.
# Use idleReplicaCount or minReplicaCount >= 1 to keep a warm pod during off-hours.
# Always set timezone explicitly — never rely on UTC as an unstated assumption.
- type: cron
  metadata:
    timezone: Europe/Berlin       # IANA timezone — always explicit
    start: "0 8 * * 1-5"
    end: "0 20 * * 1-5"
    desiredReplicas: "10"

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

Subscribe to this mod's changes

keda is a cursor rule published in the GitHub repository nitinjain999/platform-skills (40 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 977 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-30.