Skip to main content
skill CX Codex

sops-encryption — Claude Code skill: SOPS secret encryption

A skill that walks your agent through encrypting configs and Kubernetes secrets with Mozilla SOPS, using AWS KMS, GCP KMS or PGP keys. Useful when secrets live in Git.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill sops-encryption -a claude-code
Open on GitHub

What sops-encryption does

The skill covers Mozilla SOPS: encrypting values inside config files while the structure stays readable. Your agent gets the commands — encrypt a file, decrypt it, edit an encrypted file, encrypt in place.

It ships a .sops.yaml template with path-based rules: one key for prod files, another for dev, PGP as a fallback. A separate section handles Kubernetes secrets — a Secret manifest with a sops block and values like ENC[AES256_GCM,...] — plus installing the ksops plugin so ArgoCD decrypts them on its own.

You need SOPS installed and access to KMS (AWS, GCP or Azure) or a PGP key. Without a key-management backend the encrypt commands simply fail. The skill also advises keeping .sops.yaml in the repo and never committing plaintext secrets, which is a good reason to check your Git history today.

What it helps with

  • encrypt secrets in a config without hiding the file structure
  • keep Kubernetes secrets in Git as code
  • use separate encryption keys for prod and dev
  • wire ArgoCD to decrypt secrets via the ksops plugin
  • edit an encrypted file without dumping plaintext to disk

Example prompts for the agent

  • encrypt secrets.yaml with SOPS using my AWS KMS key
  • set up .sops.yaml so .prod.yaml uses a separate KMS key
  • encrypt this Kubernetes secret and show how ArgoCD will pick it up

How to install sops-encryption

1Skills CLI (Vercel)

npx skills add BagelHole/DevOps-Security-Agent-Skills --skill sops-encryption -a claude-code

2Manually: put the files in place

~/.claude/skills/sops-encryption/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sops-encryption/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about sops-encryption

How do I install sops-encryption in Claude?

Run npx skills add BagelHole/DevOps-Security-Agent-Skills --skill sops-encryption -a claude-code. The skill then sits at ~/.claude/skills/sops-encryption/SKILL.md.

What does sops-encryption do?

It gives the agent instructions for encrypting configs and secrets with Mozilla SOPS using AWS KMS, GCP KMS or PGP keys, including a .sops.yaml template and a Kubernetes Secret manifest.

What do I need before using it?

SOPS installed and access to KMS (AWS, GCP or Azure) or a PGP key. Without a key backend the encryption commands will not run.

Source text

SKILL.md · MIT
---
name: sops-encryption
description: Encrypt files and configs with Mozilla SOPS. Integrate with AWS KMS, GCP KMS, or PGP for key management. Use when encrypting configuration files, Kubernetes secrets, or implementing GitOps with encrypted secrets.
license: MIT
metadata:
  author: devops-skills
  version: "1.0"
---

# SOPS Encryption

Encrypt secrets in configuration files while keeping structure visible.

## When to Use This Skill

Use this skill when:
- Encrypting secrets in Git
- Implementing GitOps with secrets
- Managing Kubernetes secrets as code
- Encrypting configuration files

## Prerequisites

- SOPS installed
- KMS access (AWS, GCP, Azure) or PGP key

## Installation

```bash
# macOS
brew install sops

# Linux
wget https://github.com/getsops/sops/releases/download/v3.8.0/sops-v3.8.0.linux.amd64
chmod +x sops-v3.8.0.linux.amd64
mv sops-v3.8.0.linux.amd64 /usr/local/bin/sops
```

## Basic Usage

```bash
# Encrypt with AWS KMS
sops --encrypt --kms arn:aws:kms:region:account:key/key-id secrets.yaml > secrets.enc.yaml

# Decrypt
sops --decrypt secrets.enc.yaml

# Edit encrypted file
sops secrets.enc.yaml

# Encrypt in place
sops --encrypt --in-place secrets.yaml
```

## Configuration

```yaml
# .sops.yaml
creation_rules:
  - path_regex: .*\.prod\.yaml$
    kms: arn:aws:kms:us-east-1:account:key/prod-key
  - path_regex: .*\.dev\.yaml$
    kms: arn:aws:kms:us-east-1:account:key/dev-key
  - path_regex: .*
    pgp: fingerprint
```

## Kubernetes Integration

```yaml
# encrypted secret
apiVersion: v1
kind: Secret
metadata:
  name: myapp-secrets
type: Opaque
stringData:
  password: ENC[AES256_GCM,data:encrypted...]
sops:
  kms:
    - arn: arn:aws:kms:region:account:key/key-id
```

```bash
# With ArgoCD
# Install ksops plugin for ArgoCD to decrypt secrets
```

## Best Practices

- Store .sops.yaml in repository
- Use different keys per environment
- Rotate encryption keys regularly
- Never commit unencrypted secrets
- Use key aliases for readability

## Related Skills

- [hashicorp-vault](../hashicorp-vault/) - Centralized secrets
- [argocd-gitops](../../../devops/orchestration/argocd-gitops/) - GitOps integration

© devops-skills · MIT · BagelHole/DevOps-Security-Agent-Skills

Similar skills

Everything for Security →

From the same set127

ssl-tls-management A skill for SSL/TLS work: issuing Let's Encrypt certificates, automating renewal, running cert-manager in Kubernetes and checking cipher suites. Useful when you set up HTTPS or fix an expired cert. CX Codex +1 420installs hashicorp-vault A skill that walks your agent through HashiCorp Vault: secret engines, auth methods, policies and certificate issuance, without guessing CLI syntax. CX Codex +1 413installs backup-recovery Configures backup and disaster recovery strategies using rsync and Restic. Useful for protecting data locally or in AWS S3 and Backblaze B2 following the 3-2-1 rule. CX Codex +1 406installs database-backups A skill that helps your AI agent set up automated backups for PostgreSQL, MySQL and MongoDB, then verify that restores actually work. CX Codex +1 405installs performance-tuning A skill for Linux performance work: kernel parameter tuning, bottleneck hunting, I/O scheduler and memory settings. Useful when a server lags or needs to survive a traffic spike. CX Codex +1 403installs podman Guides the agent to run daemonless and rootless containers with Podman. Handy for managing pods and generating systemd unit files. CX Codex +1 400installs incident-response Handles security breaches and system compromises using structured six-phase incident response playbooks and Linux forensic collection scripts. CX Codex +1 394installs kubernetes-ops A skill that gives your agent ready YAML for Kubernetes workloads plus the kubectl commands to debug and scale them. CX Codex +1 391installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor