---
name: runtime-env-secrets
description: Use when configuring, inspecting, troubleshooting, or explaining Remix runtime environment variables, secrets, .env materialization, Vault-backed values, secret redaction, or environment scope.
---

# Runtime Env Secrets

Use this skill when the user asks about runtime env vars, secrets, missing variables in sandbox execution, `.env` behavior, Vault storage, redacted output, or environment-specific runtime configuration.

This skill is for secret and runtime environment workflows, not for running commands or previewing apps.

Mental model:

- Runtime env values are secrets by default.
- Secret values are write-only through the normal tools; list/read surfaces should return metadata, not values.
- Runtime execution materializes env values into the sandbox so runtime targets and sandbox commands can use them.
- Redacted output such as `[REDACTED]` is expected behavior, not evidence that the env is missing.

Recommended sequence:

1. Start with `remix_collab_env_list` to inspect names, scopes, and metadata without exposing values.
2. Resolve the intended project, repo fingerprint, target, and environment before changing anything.
3. Use `remix_collab_env_set` only when the user explicitly asks to create or rotate a value.
4. Use `remix_collab_env_delete` only when the user explicitly asks to remove a value.
5. If a preview, runtime target, or sandbox command cannot see an env var, inspect env metadata and the command's selected `environment` before rerunning.

Important rules:

- Never print, echo, summarize, or commit secret values.
- Do not ask the user to reveal a secret value unless setting or rotating it is the task.
- Do not use broad env-dump commands as a first debugging step. If an env check is needed, prefer checking one variable name at a time and expect redaction.
- Treat `environment=development` as the default unless the user or existing command explicitly chooses another environment.
- Generated sandbox `.env` files are runtime materialization artifacts. They should not be treated as source files or allowed to dirty collaboration change application.
- Prefer explaining scope and redaction behavior before assuming the backend failed to store a value.
