secrets

secrets is a cursor rule for Cursor from YuDefine/nuxt-supabase-starter. It costs 0 tokens per session (1,555 once invoked), scanned A, original, MIT.

A set of rules for storing Cloudflare Workers secrets in GitHub repository secrets and copying them to workers during deployment. Cloudflare Workers are server-side programs that run on Cloudflare’s network.

In plain words
What is it for?
Use it when naming environment secrets, configuring GitHub Actions deployments, rotating values and synchronising secrets to staging or production workers.
Why use it?
It keeps secret rotation tied to the deployment process and prevents sensitive values from being placed in configuration files or managed manually in a dashboard.

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/yudefine/nuxt-supabase-starter/secrets
Clone the repo
git clone --depth 1 https://github.com/YuDefine/nuxt-supabase-starter

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 secrets

README.md
[![agentmods](https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/secrets.svg)](https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/secrets)
Your own site
<a href="https://agentmods.dev/rules/yudefine/nuxt-supabase-starter/secrets"><img src="https://agentmods.dev/badge/rules/yudefine/nuxt-supabase-starter/secrets.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 1,555 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 $0.00000 $0.01555
Opus 5 $0.00000 $0.00777
Sonnet 5 $0.00000 $0.00311
Haiku 4.5 $0.00000 $0.00155

Measured yesterday against content hash 9e12b36e04e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

secrets 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 yesterday.

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.

template/.cursor/rules/secrets.mdc · 83 lines

How it starts

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

Cloudflare Workers Secrets

Single source of truth = GitHub repo secret。所有 worker runtime 用的 secret 一律走 GitHub Actions + cloudflare/wrangler-action@v3secrets: input 推進 worker。

MUST

  • MUST 把所有 runtime secret 設在 GitHub repo secret,naming 對齊 STAGING_<NAME> / PRODUCTION_<NAME>(per-env)或 <NAME>(cross-env shared,限非敏感如 OAuth client id)
  • MUSTdeploy-{staging,production}.ymlcloudflare/wrangler-action@v3 並透過 secrets: | list + env: block 把 GitHub secret 推進 worker
  • MUST 對應 worker runtime env 名稱(不帶 STAGING_ / PRODUCTION_ 前綴)— GitHub secret 帶前綴、worker runtime 不帶
  • MUST rotation 只動 GitHub Secret(gh secret set),下次 deploy workflow 自動 sync 進 worker
  • MUST 把 secret 值寫進 Notion「GitHub Secrets & 環境變數」page(per consumer)。義務綁的是「收到明文的當下」,不是「改動 secret 值時」 —— 全文與唯一例外的措辭在 [[secret-custody]],本條只是它在 Workers 面的入口

NEVER

  • NEVER 手動跑 wrangler secret put <NAME> 設 production / staging worker secret — 繞過正規流程,rotation 會脫節
  • NEVER 把 secret 寫進 wrangler.toml[vars] 區塊 — [vars] 是 plaintext,會在 worker dashboard 可見且 commit 進 git
  • NEVERwrangler-action 之外的 workflow step 直接 echo secret 到 wrangler secret put — 同樣繞過 SoT,且 echo 容易 leak 進 log
  • NEVER dev / staging / production 共用同一條 secret(rotation 風險:一漏全崩)— 每個 env 獨立生成

唯一例外

只在以下情況可手動跑 wrangler secret put

  • Bootstrap 初次 deploy 之前:worker 尚未存在、deploy workflow 還沒跑過第一次,需要手動 push 初始 secret 才能讓 first deploy 不 crash。第一次 deploy 後立即把 secret 加進 workflow secrets: list,後續 rotation 走正規流程
  • 緊急 incident response:production secret 洩漏需立即 rotation,等不及下次 deploy。必同時 gh secret set 更新 GitHub Secret + 開 issue / 在 commit message 註記,下次 deploy 會 overwrite 同值

推送流程範例( production)

# .github/workflows/deploy-production.yml
- uses: cloudflare/wrangler-action@v3
  with:
    apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
    accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
    command: deploy --env production
    secrets: |
      EVLOG_AUDIT_SECRET     # ← secret name 在 worker runtime 看到的
      SUPABASE_SECRET_KEY
      ...
  env:
    EVLOG_AUDIT_SECRET: ${{ secrets.PRODUCTION_EVLOG_AUDIT_SECRET }}  # ← GitHub secret name
    SUPABASE_SECRET_KEY: ${{ secrets.PRODUCTION_SUPABASE_SECRET_KEY }}
    ...

Read the full file on GitHub · 83 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. yesterday First seen · 83 lines · 0 tokens per session scan A 9e12b36e04e8

Subscribe to this mod's changes

secrets is a cursor rule published in the GitHub repository YuDefine/nuxt-supabase-starter (45 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,555 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-09-03.