agentleFS
juninmdjuninmd/skills/.agents/skills/cloud-devops/SKILL.md

cloud-devops

Skill2 starsChanged 4 days agoMITView on GitHub

Design and automate CI/CD, Kubernetes, containers, IaC, deployment verification, and shell scripts. Use for GitHub Actions, Dockerfiles, Terraform, Helm, canary and feature flag rollouts, manual GHCR rollout, deployment sync drift, and safe bash/PowerShell. Trigger on 'the pipeline fails', 'write a Dockerfile', 'deploy this to Kubernetes', 'the cluster drifted from Git'.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write down the failure domain, the rollback path, the secret flow, and the one signal that says it worked.

    line 34
  2. Distinctive:

    Every one of these is read-only.

    line 46
  3. Distinctive:

    No rollback path exists for this change.

    line 100
  4. Distinctive:

    Use short-lived identity/OIDC.

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Cloud DevOps

Not this skill: application code that happens to run in a container (its domain skill), or reading production signals during an incident (observability).

Preflight

Establish infrastructure context and active cluster/workspace across Linux/macOS (bash) or Windows (PowerShell):

# Linux / macOS
ls .github/workflows/ Dockerfile* helm/ chart/ *.tf 2>/dev/null || true
kubectl config current-context          # which cluster are you actually pointed at?
terraform workspace show 2>/dev/null || true
# Windows (PowerShell)
Get-ChildItem -Path .github/workflows, Dockerfile*, helm, chart, *.tf -ErrorAction SilentlyContinue
kubectl config current-context          # which cluster are you actually pointed at?
terraform workspace show 2>$null

The wrong kube context is the single most expensive mistake available here. Read it before every session, not once.

Workflow

  1. Inspect what already exists — pipeline, image, chart, IaC, deployment ownership — before proposing a change. Who applies this, and from where?
  2. Write down the failure domain, the rollback path, the secret flow, and the one signal that says it worked. A change without a stated rollback is not ready to plan.
  3. Make the smallest declarative change. Pin external actions by SHA, images by digest, providers by version — a floating tag is a supply-chain hole and a reproducibility hole at once.
  4. Validate locally without mutating anything live (see the dry-run table).
  5. Prove runtime health with rollout status, events, and a workload smoke. The pipeline going green is not the signal.

For implementation work, produce the concrete infrastructure artifact requested (workflow, image definition, manifests, chart, or IaC), keep the diff smallest, and report validation evidence plus the remaining runtime boundary. A delivery checkpoint states what changed, what passed locally, and what still requires an authorized apply or live rollout.

Dry Run Before Apply

Every one of these is read-only. There is no reason to skip them.

ChangeValidate with
GitHub Actions workflowactionlint · gh workflow view <file>
Dockerfilehadolint Dockerfile · docker build --no-cache -t tmp .
Kubernetes manifestkubectl apply --dry-run=server -f <file>
Helm charthelm lint ./chart · helm template ./chart -f values.yaml
Helm upgradehelm diff upgrade <rel> ./chart (needs helm-diff)
Terraformterraform validate · terraform plan -out=tf.plan
Pulumipulumi preview --diff

Verify the Rollout, Not the Pipeline

# Linux / macOS
kubectl rollout status deploy/<name> --timeout=180s
kubectl get events --sort-by=.lastTimestamp | tail -20
kubectl get pod -l app=<name> -o jsonpath='{.items[*].status.containerStatuses[*].imageID}'
# Windows (PowerShell)
kubectl rollout status deploy/<name> --timeout=180s
kubectl get events --sort-by=.lastTimestamp | Select-Object -Last 20
kubectl get pod -l app=<name> -o jsonpath='{.items[*].status.containerStatuses[*].imageID}'

The last one is the one people skip. With a mutable tag (:latest), a failed build leaves the old image serving while the sync reports healthy — Argo CD says Synced, the pipeline is green, and the running digest is yesterday's. Compare that digest against the artifact you just built; if they differ, the deploy did not happen.

SymptomLikely cause
ImagePullBackOfftag or digest does not exist, or registry auth missing in that namespace
CrashLoopBackOffapp exits on start — read kubectl logs --previous
Pod Pending foreverno node satisfies requests, taints, or the PVC's zone
Rollout hangs at N-1 replicasreadiness never passes, or a PodDisruptionBudget blocks eviction
OOMKilledlimit below real usage; raise the limit or fix the leak
Restart loop only under loadliveness probe checks a slow dependency instead of process health — see helm-standards.md

Reference Routing

Open a file only when its trigger fires.

  • Symptom matches a known outage: real-world-cases.md
  • Pipeline or runner edit: ci-cd-best-practices.md
  • Authoring an image: dockerfile-standards.md; debugging a running container: docker-operations.md
  • Chart templates, values, or probe misconfiguration: helm-standards.md; install, upgrade, rollback: helm-workflow.md
  • Terraform or Pulumi structure: iac-principles.md; plan, state locking, or drift: iac-operations.md
  • Choosing canary, blue-green, or feature-flag-gated rollout and its rollback trigger: progressive-rollout.md
  • Live-editing an ArgoCD-managed resource, or verifying a :latest/CI-blocked homelab deploy: gitops-homelab-deploy.md
  • Picking managed services: cloud-patterns.md; functions or cold starts: serverless-patterns.md

See Reference Map for specialized references and sub-domain guides.

Stop

  • The kube context or Terraform workspace is not the one you intended. Stop before any command that mutates.
  • No rollback path exists for this change. Define it first; a deploy without a reversal is a cutover.
  • The running digest does not match the artifact just built. The deploy did not happen — do not report success.

Rules

  • Hand off security scans to security-ops, telemetry and incident response to observability, and git delivery to git-workflow.
  • No apply, deploy, deletion, or production mutation without explicit confirmation.
  • Use short-lived identity/OIDC; never place credentials in manifests or workflow logs. A secret echoed by a debug step is a leaked secret.
  • Build once and promote the same immutable artifact by digest across environments.
  • Kubernetes workloads need resource requests and limits, liveness and readiness probes, and a PodDisruptionBudget so a node drain cannot evict the last replica. Liveness that duplicates readiness restarts a healthy pod under load.
  • Under a GitOps controller (Argo CD, Flux): inspect the desired-versus-live diff, fix desired state in the repository instead of forcing a sync by hand, and treat pruning as dangerous for shared objects.
  • Terraform state is production data: remote backend, locking, versioned, never edited by hand. terraform apply without a saved plan applies something nobody reviewed.
  • Logs, metrics, traces, SLOs, and alerting and live outage response belong to observability. Keep rollout mechanics here.

Checklist

  • Blast radius, secret flow, and rollback path stated before the change.
  • Configuration lints, renders, or plans cleanly with no live mutation.
  • External actions, images, and providers pinned.
  • Rollout status green and the running digest matches the artifact just built.

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.