add-secret

Adds SOPS-encrypted secrets to Ansible secrets.yml and registers them for rotation tracking.

2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/DanielH2018/server --skill add-secret-danielh2018
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-secret
Source: https://github.com/DanielH2018/server/tree/main/.claude/skills/add-secret
Command: npx skills add https://github.com/DanielH2018/server --skill add-secret-danielh2018

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new credential to a SOPS/age-encrypted Ansible secrets file involves several error-prone steps: encrypting without leaking the value, classifying the secret's rotation tier, referencing it in templates, and registering it for rotation tracking. This Skill walks through that entire flow safely, ensuring secrets never appear in transcripts, shell history, or plaintext git diffs. ## Core Features & Use Cases - Safe secret insertion: Generates or accepts secret values without echoing them, using sops set piped from openssl rand so values never hit the transcript. - Tier classification: Distinguishes pinned (break-glass, do-not-rotate), auto (locally generated), and assisted/external secrets, routing each to the correct handling procedure. - Rotation registration: Runs secret_rotation.py sync and audit to reconcile the plaintext rotation registry with live secret names and assign staggered due dates. - Host onboarding: Documents the bootstrap flow for adding a new host's age public key to .sops.yaml so it can decrypt shared secrets. - Use Case: You need to add an Uptime Kuma push token for a new monitor. The Skill generates a 32-hex-character token (not base64, which AutoKuma rejects), writes it encrypted, registers it for rotation, and tells you which template to update. ## Quick Start Ask the assistant to add a new secret named my_api_token to the encrypted secrets file and register it for rotation tracking.

Frequently Asked Questions about add-secret

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a secret to a SOPS-encrypted Ansible file?▼

Use `sops set ansible/vars/secrets.yml` with the value piped from a generator so it never prints, or run `sops ansible/vars/secrets.yml` to edit interactively. The .sops.yaml config auto-encrypts anything under vars/ on save.

How to generate a random secret without printing it to the terminal?▼

Pipe openssl output through read into sops set: `openssl rand -base64 32 | { read v; sops set file.yml "[\"key\"]" "\"$v\""; }`. The value stays in the shell variable and never appears in the transcript or history.

Why does AutoKuma reject my Uptime Kuma push token?▼

AutoKuma requires push tokens to be exactly 32 hexadecimal characters. A base64 value is 44 characters with +, /, and = symbols, which fails validation. Generate the token with `openssl rand -hex 16` instead.

Can I rotate a pinned SOPS secret like an encryption key?▼

No. Pinned secrets such as storage encryption keys are break-glass values where rotation risks data loss. Follow the dedicated pinned runbook in the rotation documentation rather than standard sops set procedures.

How do I let a new host decrypt existing SOPS secrets?▼

Run the bootstrap playbook on the new host to generate its age key, add its public key to .sops.yaml, then run `sops updatekeys` on the secrets file from a host that already decrypts. Multi-recipient encryption means any listed key decrypts the whole file.