env-files-read-only

env-files-read-only is a cursor rule for Cursor from seeincodes/skyfi-mcp. It costs 302 tokens per session, scanned A, original, MIT.

Rules for keeping environment files, such as .env files that hold local settings and secrets, safe from changes, commits, and disclosure.

In plain words
What is it for?
Reviewing or changing environment variables, documenting new configuration, validating required settings, and keeping secret values out of code, logs, and version control.
Why use it?
They reduce the risk of accidentally exposing API keys, logging secrets, modifying configuration without approval, or storing credentials in source code.

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/seeincodes/skyfi-mcp/env-files-read-only
Clone the repo
git clone --depth 1 https://github.com/seeincodes/skyfi-mcp

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 env-files-read-only

README.md
[![agentmods](https://agentmods.dev/badge/rules/seeincodes/skyfi-mcp/env-files-read-only.svg)](https://agentmods.dev/rules/seeincodes/skyfi-mcp/env-files-read-only)
Your own site
<a href="https://agentmods.dev/rules/seeincodes/skyfi-mcp/env-files-read-only"><img src="https://agentmods.dev/badge/rules/seeincodes/skyfi-mcp/env-files-read-only.svg" alt="Measured on agentmods" height="20"></a>
Per session 302 This file is loaded in full into every session.
When invoked 302 The same file — it is already loaded in full.
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.00302 $0.00302
Opus 5 $0.00151 $0.00151
Sonnet 5 $0.00060 $0.00060
Haiku 4.5 $0.00030 $0.00030

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

Security

Grade A, and why

env-files-read-only 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 4d 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/env-files-read-only.mdc · 36 lines

What it actually says

Environment File Protection

Rules

  1. Never modify .env files without explicit user confirmation
  2. Never commit .env files to git — they are in .gitignore
  3. Never display API key values in output, logs, or error messages
  4. Never hardcode secrets in source code — always reference env vars
  5. Never log environment variables at runtime (even at DEBUG level)

Required Environment Variables

SKYFI_API_KEY=                    # SkyFi platform API key
SKYFI_API_BASE_URL=               # SkyFi API base URL
SKYFI_API_VERSION=                # Pinned API version
SKYFI_SIMULATE=                   # Simulation mode toggle
PORT=                             # HTTP server port
RATE_LIMIT_PER_MIN=               # Per-key rate limit
LOG_LEVEL=                        # Logging level

Adding New Environment Variables

  1. Add the variable to .env (local, not committed)
  2. Add the variable with empty value to .env.example (committed)
  3. Add the variable to docs/TECH_STACK.md Environment Variables section
  4. Add validation in the config loader (fail fast on missing required vars)
  5. Document the variable's purpose and default value
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. 4d ago First seen · 36 lines · 302 tokens per session scan A f7cc34df4cca

Subscribe to this mod's changes

env-files-read-only is a cursor rule published in the GitHub repository seeincodes/skyfi-mcp (0 stars, last pushed 5mo ago), licensed MIT. It adds 302 tokens to every session, about $0.0015 per session on Opus 5. 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.