agentleFS
sammasaksammasak/claude-code-skills/skills/secrets-management/SKILL.md

secrets-management

Skill1 starsChanged 28 days agoMITView on GitHub

Use when creating, encrypting, editing, or rotating a SOPS secret in homelab-gitops or nixos-config, changing age recipients, or wiring secret delivery (Flux decryption, sops-nix). Not for loading already-provisioned credentials at build or deploy time — route that to credentials. Not for application code that reads env vars or tokens at runtime.

33 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use background-jobs, input-validation and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 3 projects that use this

  • hereshecodesSkill

    input-validation

    Use when processing user input, form data, file uploads, or query parameters

    Also in 3 projects that use this

  • mattpartidaSkill

    agent-security

    Review and harden OpenClaw/Hermes agent security, including tool permissions, elevated access, exec approvals, allowlists, sandboxing, browser and web exposure, prompt-injection risk, model risk, persistence, and personal-vs-shared trust boundaries. Use when the task is primarily about agent or runtime security rather than host firewall or OS hardening.

    Also in 3 projects that use this

  • harperaaSkill

    rate-limiting

    Implement rate limiting to prevent brute force attacks, spam, and resource abuse. Use this skill when you need to protect endpoints from automated attacks, prevent API abuse, limit request frequency, or control infrastructure costs. Triggers include "rate limiting", "rate limit", "brute force", "prevent spam", "API abuse", "resource exhaustion", "DoS", "withRateLimit", "too many requests", "429 error".

    Also in 3 projects that use this

  • jefflesterSkill

    api-security

    API security best practices and common vulnerability prevention. Enforces security checks for authentication, input validation, SQL injection, XSS, and OWASP Top 10 vulnerabilities. Use when building or modifying APIs.

    Also in 4 projects that use this

  • MicrosoftSkill

    supply-chain-security

    Activate when reviewing or modifying dependency resolution, lockfile schema, package downloaders, signature/integrity checks, file integration cleanup, or anything that could expose APM to dependency confusion, typosquatting, malicious packages, or token leakage.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 30 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Never write plaintext to /tmp.

    line 30

“Common” is measured: kept by at least 6 in 10 of the 30 edited versions of this file we could read. “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

Secrets Management (homelab)

SOPS + age everywhere; no Sealed Secrets, no Vault.

Where things live

RepoRules fileSecret pathsDelivery
~/homelab-gitops.sops.yaml at root (encrypted_regex: ^(data|stringData)$)clusters/homelab/infra/secrets/, apps/<app>/secrets/*.secret.yamlFlux Kustomization spec.decryption with secretRef: sops-age (per Kustomization, not a global controller flag)
~/nixos-configsecrets/.sops.yamlsecrets/{homelab,core,claude}/*.yamlsops-nix at activation; never in the Nix store

Personal age key: ~/.config/sops/age/keys.txt. Host age keys are generated per node by nixos-config. Every gitops rule has two recipients (personal + Flux sops-age); a file encrypted for only one breaks either local edit or in-cluster apply.

Workflow

# new secret: generate, encrypt straight to the repo path
kubectl create secret generic <name> -n <ns> --from-literal=key=value --dry-run=client -o yaml \
  | sops -e --filename-override apps/<app>/secrets/<name>.secret.yaml /dev/stdin > apps/<app>/secrets/<name>.secret.yaml
sops apps/<app>/secrets/<name>.secret.yaml        # edit in place
sops updatekeys <file> && sops rotate -i <file>    # after changing recipients
  • Never write plaintext to /tmp; write to the real repo path and sops -e --in-place so .sops.yaml path rules match.
  • The filename must end .secret.yaml under apps/, or no creation rule matches.
  • A plaintext secret that reached a commit must be rotated; rewriting history is not enough.

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.