sops-encrypt

sops-encrypt is a skill for Claude Code from joaquimscosta/arkhe-claude-plugins. It costs 79 tokens per session (653 once invoked), scanned A, original, MIT.

A tool that encrypts .env files with SOPS and age after converting them to YAML. Environment files commonly contain application settings and secrets.

In plain words
What is it for?
Use it to find unencrypted .env files, choose which ones to encrypt, convert them, and create or replace their encrypted YAML files.
Why use it?
It protects secrets before they are shared or stored, while avoiding a documented SOPS dotenv-format problem that can corrupt backslashes and line breaks.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the devtools plugin — 9 skills shipped together

Good fit Use it to find unencrypted .env files, choose which ones to encrypt, convert them, and create or replace their encrypted YAML files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt
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.

Any agent
npx skills add joaquimscosta/arkhe-claude-plugins --skill sops-encrypt
Clone the repo
git clone --depth 1 https://github.com/joaquimscosta/arkhe-claude-plugins

Made for: Claude Code.

Or install devtools, the plugin that ships this one along with the rest of its 9 skills.

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-encrypt

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt/github.svg)](https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt)
Your own site
<a href="https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt"><img src="https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sops-encrypt

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt"><img src="https://agentmods.dev/badge/skills/joaquimscosta/arkhe-claude-plugins/sops-encrypt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 653 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 4
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 5
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 29
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 6
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 47
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 48
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00079 $0.00653
Opus 5 $0.00039 $0.00327
Sonnet 5 $0.00016 $0.00131
Haiku 4.5 $0.00008 $0.00065

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

Security

Grade A, and why

sops-encrypt 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 10d 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.

plugins/devtools/skills/sops-encrypt/SKILL.md · 59 lines

How it starts

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

SOPS Encrypt

Encrypt .env files by converting to YAML and encrypting with SOPS + age.

Why YAML? SOPS dotenv store has a known bug (#1435) that corrupts backslash and \n sequences. The helper script converts dotenv→YAML before encryption.

Workflow

  1. Detect current state:

    python3 ${CLAUDE_SKILL_DIR}/../sops-setup/scripts/detect_sops.py <project-root>
    
  2. Verify prerequisites:

    • tools.sops.installed must be true — if not, tell user to run /devtools:sops-setup
    • project.sops_yaml.exists must be true — if not, tell user to run /devtools:sops-setup
    • age_key.exists must be true — if not, tell user to run /devtools:sops-setup
  3. Show unencrypted .env files from project.env_files. If empty, report "No .env files found to encrypt" and exit.

  4. Use AskUserQuestion (multiSelect: true) — which files to encrypt. List each .env* file. If a corresponding .enc.yaml file already exists, note it will be overwritten.

  5. Encrypt each selected file (convert dotenv→YAML, then encrypt):

    python3 ${CLAUDE_SKILL_DIR}/../sops-setup/scripts/dotenv_yaml.py to-yaml <file> > <file>.enc.yaml.tmp
    sops --encrypt <file>.enc.yaml.tmp > <file>.enc.yaml
    rm <file>.enc.yaml.tmp
    

    Example: .env.local.env.local.enc.yaml

  6. Verify each encrypted file exists and is non-empty.

  7. Summary:

    | File | Encrypted To | Status |
    |------|-------------|--------|
    | .env.local | .env.local.enc.yaml | done |
    | .env.production | .env.production.enc.yaml | done |
    

    Remind user to commit the .enc.yaml files.

Key Rules

  • Always verify .sops.yaml exists before attempting encryption
  • Always convert dotenv→YAML before encrypting (use the helper script)
  • Warn if an .enc.yaml file will be overwritten
  • Never delete the original .env file — only create the .enc.yaml copy
  • Clean up .tmp files even if encryption fails

Read the full file on GitHub · 59 lines

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. 10d ago First seen · 59 lines · 79 tokens per session scan A 52854ec198e1

Subscribe to this mod's changes

sops-encrypt is a skill published in the GitHub repository joaquimscosta/arkhe-claude-plugins (21 stars, last pushed 26d ago), licensed MIT. It adds 79 tokens to every session and 653 once invoked, about $0.0004 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-30.