npx skills add ...
npx skills add darkmatter/skills --skill darkmatter-gitops-conventions
Safe-change playbook for the darkmatter/gitops repo — validation before commit (kubeconform with CI-identical flags, yq for YAML manifests, jq for SOPS JSON, git diff --check), sha-pinned images, KSOPS/SOPS secret editing rules, rollback via revert, and how ArgoCD reconciles. Use for ANY change to darkmatter/gitops (manifests, Helm values, apps/*.yaml, secrets), when asked to bump an image tag, wire a secret, or roll back a deploy. Also use when tempted to kubectl apply/edit/patch anything — the answer is no.
npx skills add darkmatter/skills --skill darkmatter-gitops-conventions
darkmatter/gitops is the single source of truth for the k3s cluster: ArgoCD
app-of-apps, Helm values, KSOPS secrets, network policies, cloudflared routes.
A change is real only when it's committed here — everything else is drift.
Never mutate the cluster imperatively. No kubectl apply/edit/patch, no
helm upgrade, no imperative restarts. If a live object disagrees with the
repo, the repo wins and the object is the bug.
kubectl rollout restart.arc.darkmatter.io/reconcile-at: "<current UTC timestamp>" annotation in
the manifest.git revert the offending commit and push. ArgoCD converges.
Never "fix forward" live.Run all three; CI runs them and a red main is worse than a slow commit:
For ArgoCD apps/*.yaml whose Helm values live in a block scalar, validate
the embedded YAML too:
Assertion scripts must not paper over failures: no || true; use set +e
plus explicit PIPESTATUS[0] capture when a pipeline's exit code matters.
Pin by full-commit tag (sha-<40-hex>) or digest — never latest, never a
branch tag. Bumping an image = a one-line diff that names the commit it ships
in the message. ArgoCD picks it up on sync (~3 min); a changed sandbox/pod
spec hash churns dependent warm pools automatically.
*.sops.json), rendered by KSOPS.
See ADR-0011. Do not add new
*.sops.yaml / .env.sops. Convert existing YAML SOPS files when touched.
Kubernetes Secret JSON is valid for the API.0600 temp file, edit, re-encrypt, then verify
structurally (jq empty on the decrypted form) and by diffing key NAMES
only — never print values. Clean up the temp file. Plain non-secret
manifests stay YAML; keep using yq for those./operation field from the Application and
hard-refresh.IgnoreExtraneous /
Prune=false annotations — respect existing ones when editing nearby.Track follow-ups in beads (bd create), not TODO comments. Reproducibility
is the bar: the cluster must be rebuildable from this repo alone.
yq eval '.spec.sources[0].helm.values | from_yaml' apps/<app>.yaml > /dev/null