/devops-skills:gitops-workflowfrom devops-skills
Designs GitOps deployment workflows where Git is the single source of truth, reconciled by Argo CD or Flux on Kubernetes.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
GitOps replaces "push-based" deployment (a pipeline runs kubectl apply or
helm upgrade against a cluster) with a "pull-based" model where a
reconciliation operator running inside the cluster continuously compares
live state against the desired state declared in a Git repository, and
converges toward it. This makes Git history the audit log and rollback
mechanism for infrastructure and application state, eliminates
credential sprawl (CI no longer needs cluster-admin), and detects/corrects
configuration drift automatically. It matters operationally because it
turns "what's actually running in prod" from a question you answer by
ssh-ing in or querying the cluster into a question you answer by reading
Git.
kubectl apply / helm upgrade pipelines.kubectl edit'd a resource
directly and it keeps getting reverted, or vice versa it silently stuck).Secret objects
must never be committed.Choose repo topology. For most teams: one app repo per service (source + Dockerfile + CI) and one (or a few, per business unit) environments/config repo containing Kubernetes manifests organized by environment. Example layout:
gitops-config/
├── apps/
│ └── payments-api/
│ ├── base/
│ │ ├── deployment.yaml
│ │ ├── service.yaml
│ │ └── kustomization.yaml
│ └── overlays/
│ ├── dev/kustomization.yaml
│ ├── staging/kustomization.yaml
│ └── prod/kustomization.yaml
└── clusters/
├── dev/apps.yaml # Argo CD Application / Flux Kustomization pointers
├── staging/apps.yaml
└── prod/apps.yaml
Define the desired state declaratively with an overlay per environment (Kustomize example):
# apps/payments-api/overlays/prod/kustomization.yaml
resources:
- ../../base
images:
- name: payments-api
newName: ghcr.io/example/payments-api
newTag: "1.4.2"
patches:
- path: replica-count.yaml
Register the app with the operator. Argo CD Application example:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: payments-api-prod
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/example/gitops-config.git
targetRevision: main
path: apps/payments-api/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: payments-prod
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Flux equivalent uses a GitRepository + Kustomization CR pair
pointing at the same overlay path.
Decide sync policy per environment deliberately. automated +
selfHeal: true is appropriate for dev/staging (fast feedback, drift
auto-corrected). For production, many teams require manual sync
approval (automated disabled, or gated behind a promotion PR merge)
so a bad manifest doesn't roll out unattended — pair this with
environment-promotion-strategy.
Wire CI to update the config repo, not the cluster. The
application CI pipeline builds and pushes an image, then opens a PR (or
commits, depending on trust level) against the config repo bumping
newTag in the relevant overlay. The GitOps operator, not the CI
pipeline, performs the actual cluster apply. This is the core inversion
GitOps makes: CI produces artifacts and proposes state changes; the
in-cluster operator is the only thing with apply credentials.
Handle secrets out-of-band of plaintext Git. With Sealed Secrets, encrypt with the cluster's public key before committing:
kubeseal --format yaml < secret.yaml > sealed-secret.yaml
git add sealed-secret.yaml # safe to commit; only the controller can decrypt
With an External Secrets Operator, commit only a reference
(ExternalSecret CR pointing at a vault path), never the value.
Roll back by reverting Git, not by manual cluster surgery.
git revert <bad-commit-sha>
git push origin main
The operator reconciles the cluster back to the prior state
automatically. Verify with argocd app get payments-api-prod or
flux get kustomizations that the sync completed and health is green.
Monitor for drift and unhealthy sync state, not just "did the PR
merge." argocd app diff <app> / flux diff kustomization shows
whether live state matches desired state; alert on OutOfSync or
Degraded status persisting beyond a few reconciliation intervals.
Kustomization (Flux)
pattern so bootstrapping a new cluster is "apply one root manifest,"
not "manually register N applications."targetRevision to a branch or, for stricter environments, a tag,
so you know exactly what commit(s) the operator is watching.selfHeal/auto-prune as powerful but sharp: prune: true will
delete cluster resources whose manifest was removed from Git — make
sure that's intended before enabling it broadly.Symptom: Someone runs kubectl edit deployment directly against a
cluster with selfHeal: true, and their change is silently reverted a
minute later with no explanation.
Fix: This is GitOps working as designed — communicate the policy
clearly (no direct kubectl edit/apply in GitOps-managed namespaces)
and make emergency changes via a fast-tracked Git commit instead, so the
change survives reconciliation and is auditable.
Symptom: Application repo commits update manifests directly, and now two sources of truth (app repo and config repo) disagree about what version is deployed. Fix: Keep manifest ownership single-sourced in the config repo; application CI should only push images and open a version-bump PR/commit against the config repo, never apply manifests itself.
Symptom: A plaintext Secret YAML was committed to the GitOps repo
before a secrets strategy was in place, and it's now in Git history even
after deletion.
Fix: Treat it as a leaked credential — rotate the underlying secret
immediately; simply deleting the file does not remove it from history.
Then adopt Sealed Secrets/SOPS/external-secrets before committing
anything else sensitive, and consider history rewriting only as a
last-resort cleanup (it invalidates all clones/forks).
Symptom: Production sync is OutOfSync for days and nobody noticed
until an incident.
Fix: Alert on sync/health status directly from the operator
(Argo CD notifications, Flux alerts to Slack/PagerDuty) rather than
relying on someone periodically checking the UI.
Scenario: Promote payments-api version 1.4.2 from staging to
production using GitOps, with production requiring manual sync approval.
ghcr.io/example/payments-api:1.4.2, then opens a PR against
gitops-config changing apps/payments-api/overlays/staging/kustomization.yaml's
newTag to 1.4.2.automated: {prune: true, selfHeal: true} on
staging) reconciles staging to 1.4.2 within its poll interval.overlays/prod/kustomization.yaml's newTag to 1.4.2.Application has automated sync disabled, the change
sits OutOfSync until an operator runs
argocd app sync payments-api-prod (or CI triggers it via
argocd app sync in a manual-approval job) — giving a deliberate,
auditable go/no-go moment before production actually changes.1.4.2 misbehaves in prod, the fix is
git revert <prod-bump-commit> && git push, followed by an
(auto or manual) sync back to 1.4.1 — no bespoke rollback script
needed.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
16 skills in this plugin
/artifact-and-dependency-managementManages build artifacts and third-party dependencies through a private registry/proxy with lockfiles, version pinning, retention policies, and automated update workflows. Use when the user asks to "set up an artifact repository," "configure a package registry proxy/mirror," "pin/lock dependency versions," "clean up old artifacts," "handle a dependency update / Dependabot-Renovate PR," or "avoid a left-pad-style supply-chain incident."
/blue-green-canary-deploymentsDesigns and executes progressive delivery strategies — blue-green cutover, canary rollout, and traffic-shifted releases — with automated health checks and rollback triggers, typically on Kubernetes. Use when the user asks to "reduce deployment risk," "set up canary/blue-green deployments," "do a zero-downtime release," "gradually shift traffic to a new version," or "automatically roll back a bad deploy."
/ci-access-and-credential-lifecycle-managementManages the lifecycle of one-off/temporary repo and environment access grants and CI service-account credentials — granting time-boxed access for a specific task, revoking it reliably when the task ends, and rotating CI service-account tokens/keys before they expire or become stale. Use when the user asks to "give a contractor temporary repo access," "grant one-off access to the production environment," "rotate our CI service account token/API key," "find and revoke stale CI credentials," or "our CI token is about to expire, what do we do."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin devops-skillsOther plugins' skills for the same job