agentleFS
CsHengCsHeng/agent-skills/skills/sops-age-guardrails/SKILL.md

sops-age-guardrails

Skill3 starsChanged 10 days agoMITView on GitHub

Use for SOPS/age secret editing and review: .sops.yaml creation_rules, encrypted_regex/unencrypted_regex, age recipients and identity environment boundaries, avoiding whole-file encryption, decrypt/edit/re-encrypt workflows, and repo-local secret placement.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the nearest .sops.yaml before editing encrypted files, and confirm the path matches a creation_rules.path_regex entry.

    line 12
  2. Very specific:

    Before sops -e -i, confirm a narrow encrypted_regex, encrypted_suffix or unencrypted_regex rule limits encryption to secret keys such as …

    line 13
  3. Distinctive:

    Write only through SOPS read, edit and encrypt commands.

    line 14
  4. Distinctive:

    Verify the diff keeps non-secret metadata readable and shows no broad ciphertext churn outside the intended secret subtree.

    line 15
  5. Very specific:

    Read a single secret with sops -d --extract, which keeps the rest of the file out of logs and shell history.

    line 16
  6. Very specific:

    Keep .sops.yaml tracked with public recipients and path rules, and supply age identities through the caller environment, ignored local …

    line 18

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SOPS Age Guardrails

Edit SOPS-managed files with age recipients so that only secret keys are encrypted and no private identity reaches tracked files.

Workflow

  1. Read the nearest .sops.yaml before editing encrypted files, and confirm the path matches a creation_rules.path_regex entry.
  2. Before sops -e -i, confirm a narrow encrypted_regex, encrypted_suffix or unencrypted_regex rule limits encryption to secret keys such as secrets, data or stringData, and keep operational metadata plaintext.
  3. Write only through SOPS read, edit and encrypt commands.
  4. Verify the diff keeps non-secret metadata readable and shows no broad ciphertext churn outside the intended secret subtree.
  5. Read a single secret with sops -d --extract, which keeps the rest of the file out of logs and shell history.
  6. Fix a MAC mismatch by re-saving the final plaintext through SOPS.
  7. Keep .sops.yaml tracked with public recipients and path rules, and supply age identities through the caller environment, ignored local config, or CI secret surfaces. Age identity paths live only there.

Commands

sops -d --extract '["secrets"]["KEY"]' path/to/file.yml
sops path/to/file.yml
sops -e -i path/to/file.yml
sops updatekeys path/to/file.yml   # rotate recipients after a `.sops.yaml` recipient change

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.