Install
$ agentstack add skill-intertwine-sops-encrypted-envs-mac-sops-age-env-migration ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
SOPS + age env migration
Core rule
Never leave decrypted secret files in the repo. Do not print secret values. Make the normal project commands decrypt into process environment at runtime, then validate that the encrypted file is ciphertext and the app/test commands still work.
Workflow
- Inspect the repo before changing it:
pwd,git status --short --branchrg -n "dotenv|load_dotenv|godotenv|direnv|process\\.env|os\\.environ|ENV\\[|--env-file|env_file|\\.env(\\.|$)" .- package/task files:
package.json,pyproject.toml,Makefile,docker-compose*.yml,Procfile,bin/*, CI files.
- Decide the encrypted file name:
- Use encrypted
.envonly if the app will not auto-load it as plaintext/ciphertext, or you remove/disable the automatic dotenv loader. - Prefer
.env.sopsfor frameworks that auto-load.env(next,vite, Rails, many Python CLIs) so ciphertext is not parsed by the app.
- Create or update
.sops.yamlwith the age recipient and a narrowpath_regex. - Encrypt the secret file using the project toolkit when available:
scripts/encrypt-env REPO ENV_FILE- or
sops encrypt --input-type dotenv --output-type dotenv --filename-override ENV_FILE --in-place ENV_FILE
- Update project commands so humans and agents decrypt at process start:
sops exec-env .env 'command'for encrypted files named.envscripts/sops-env .env.sops -- commandor toolkitscripts/run-with-env .env.sops -- commandfor.env.sops
- Keep plaintext
.env,.env.local, and other.env.*fallbacks ignored or absent. Ensure the encrypted file is not ignored and will be committed.
- Be explicit in
.gitignoreedits. For.env.sops, a common pattern is keeping.env*ignored but adding!.env.sops.
- Validate:
sops decrypt --input-type dotenv --output-type dotenv ENV_FILE >/dev/null- project tests or a representative smoke command through the SOPS wrapper
scripts/validate-repo REPO ENV_FILE -- smoke commandwhen the toolkit is available.
- Report exactly what changed and what command proved the migration.
Conversion Patterns
Use the SOPS wrapper at the outermost command boundary. Plain sops exec-env infers dotenv parsing from filenames ending in .env; for .env.sops, copy templates/sops-env and templates/read-age-key-from-keychain into the target repo as scripts/sops-env and scripts/read-age-key-from-keychain.
scripts/sops-env .env.sops -- npm run dev:raw
scripts/sops-env .env.sops -- uv run pytest
scripts/sops-env .env.sops -- go test ./...
Do not wrap a command in itself. For package scripts, create raw/internal scripts:
{
"scripts": {
"dev": "scripts/sops-env .env.sops -- npm run dev:raw",
"dev:raw": "next dev",
"test": "scripts/sops-env .env.sops -- npm run test:raw",
"test:raw": "vitest run"
}
}
For Makefiles:
SOPS_ENV ?= .env.sops
.PHONY: test test-raw
test:
scripts/sops-env $(SOPS_ENV) -- $(MAKE) test-raw
test-raw:
uv run pytest
Language References
Read references/language-patterns.md when adapting a specific stack. It covers common Node/TypeScript, Python, Ruby/Rails, Go, Docker Compose, Makefile, and CI patterns.
Read references/validation-checklist.md before declaring the migration done.
Guardrails
- Do not commit private age identities, decrypted
.envfiles, screenshots of secrets, shell history, or logs containing secrets. - Do not use
sops decrypt ENV_FILE > .envas a steady-state solution. - Do not assume encrypted
.envis drop-in compatible with framework dotenv loaders. - Do not bulk-migrate multiple repos until one repo has passed runtime validation.
- If existing
.envis already committed in git history, note that encryption now does not remove historical exposure; recommend rotation and history remediation separately.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: intertwine
- Source: intertwine/sops-encrypted-envs-mac
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.