sops-secrets

sops-secrets is a skill for Claude Code, Codex from fmind/dot. It costs 40 tokens per session (1,116 once invoked), scanned A, original, MIT.

A way to store secrets in Git as encrypted files using SOPS and age, with plaintext kept only in memory when needed.

In plain words
What is it for?
Use it to encrypt YAML, JSON, or environment files, manage recipients, review safe diffs, and connect secrets to OpenTofu or Flux runtimes.
Why use it?
It lets teams version configuration beside code without committing readable passwords, keys, or tokens.

Skill for Claude CodeCodex

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 skills/fmind/dot/sops-secrets
Any agent
npx skills add fmind/dot --skill sops-secrets
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, Codex.

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 sops-secrets

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/sops-secrets.svg)](https://agentmods.dev/skills/fmind/dot/sops-secrets)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/sops-secrets"><img src="https://agentmods.dev/badge/skills/fmind/dot/sops-secrets.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,116 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.00040 $0.01116
Opus 5 $0.00020 $0.00558
Sonnet 5 $0.00008 $0.00223
Haiku 4.5 $0.00004 $0.00112

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

Security

Grade A, and why

sops-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.

skills/sops-secrets/SKILL.md · 56 lines

How it starts

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

Secrets with sops and age

Encrypted secrets live in git next to the code they configure and plaintext exists only in memory; gitleaks catches what was committed before encryption and cloud-run owns runtime secrets in Secret Manager.

Model

  • age provides the key pair: one private key per machine or human, public recipients everywhere; prefer it over PGP and cloud KMS for solo use, adding a gcp_kms recipient only for team revocation.
  • sops encrypts the values of YAML, JSON, and ENV files; keys stay readable, so diffs review cleanly and git log tells which secret changed, never what it is.
  • Naming: encrypted files are committed as *.enc.yaml, *.enc.json, or *.enc.env; sops.yaml keys its rules off that suffix and plaintext siblings stay gitignored.
  • Policy as file: .sops.yaml at the repo root (sops.yaml) declares which paths get encrypted and for which recipients, so no ad-hoc flags are needed.

Keys

  1. Generate once per machine: age-keygen -o ~/.config/sops/age/keys.txt (sops' default key location); print the public half with age-keygen -y ~/.config/sops/age/keys.txt.
  2. Distribute only the public key, as the age: recipient in each repo's .sops.yaml.
  3. Back up the private key in a password manager; never commit it to any dotfiles repo.
  4. Rotate: add the new recipient to .sops.yaml, run sops updatekeys <file> on every encrypted file, then remove the old recipient and repeat; sops rotate -i <file> re-keys the data key after an exposure.

Commands

sops edit secrets.enc.yaml                          # create or edit: decrypts to $EDITOR, re-encrypts on save
sops encrypt -i config.yaml                         # encrypt an existing file in place, then rename it *.enc.yaml
sops decrypt secrets.enc.yaml                       # decrypt to stdout for piping, never redirect to a file
sops exec-env secrets.enc.env 'mise run watch'      # inject as env vars, memory-only (preferred)
sops exec-file secrets.enc.json 'tool --config {}'  # tools that need a file path get a tmpfs one

Read the full file on GitHub · 56 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 56 lines · 40 tokens per session scan A 4751aecbd345

Subscribe to this mod's changes

sops-secrets is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,116 once invoked, about $0.0002 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-09-03.