/gitops-argo-skills:argo-workflows-pipeline-designfrom gitops-argo-skills
Designs Kubernetes-native batch/ML pipelines using Argo Workflows CRDs (Workflow, WorkflowTemplate, CronWorkflow). Helps choose DAG vs. steps templates, pass artifacts/parameters between steps, and distinguish Argo pipelines from CI systems.
Ships in gitops-argo-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.
Argo Workflows is a Kubernetes-native workflow engine where each step of a
pipeline runs as its own Pod, orchestrated by a Workflow CRD rather than
by an external CI server's job runner. It exists for workloads that are
naturally graphs of containerized steps with data dependencies between
them — data/ML pipelines, batch ETL, multi-stage image builds, infra
provisioning fan-out — rather than the "checkout, build, test, deploy"
linear shape a CI system optimizes for. Getting the template type (DAG vs.
steps), artifact passing, and reuse pattern (WorkflowTemplate) right
determines whether a pipeline is maintainable and debuggable at scale, or
a tangle of shell scripts strung together in one giant Pod. This matters
operationally because Argo Workflows pipelines commonly run unattended,
at high fan-out (hundreds of parallel Pods), and outside a human's
real-time attention — failures need to be attributable to a specific
step and step output, not a single opaque job log.
WorkflowTemplate or ClusterWorkflowTemplate.CronWorkflow instead of a bespoke CronJob + shell script.argo namespace by
convention), with the argo CLI matching the server's major version.workflow-controller-configmap or per-Workflow.ServiceAccount a Workflow runs as needs only the
permissions its steps require (e.g., permission to read a specific
Secret, not cluster-admin) — Argo Workflows executes each step as a real
Pod under a real ServiceAccount, so ordinary Kubernetes RBAC applies.Choose Steps for sequential-with-simple-parallelism pipelines,
where each list entry is a stage and items within a stage run in
parallel:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: etl-report-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: extract
template: extract
- - name: transform-a
template: transform
arguments: { parameters: [{ name: shard, value: "a" }] }
- name: transform-b
template: transform
arguments: { parameters: [{ name: shard, value: "b" }] }
- - name: load
template: load
Double-dashed (- -) entries in the same outer list item run in
parallel; a new outer list item waits for all of the previous one to
finish. This reads naturally for pipelines that are genuinely a
sequence of stages, each possibly fanned out.
Choose DAG for anything with real dependency structure — steps
that don't form a clean stage sequence, or where you want to express
"C depends on A and B, but D only depends on A":
templates:
- name: main
dag:
tasks:
- name: extract
template: extract
- name: validate
template: validate
dependencies: [extract]
- name: transform
template: transform
dependencies: [validate]
- name: enrich
template: enrich
dependencies: [extract] # runs in parallel with validate/transform
- name: load
template: load
dependencies: [transform, enrich] # waits on both branches
Prefer DAG over Steps whenever the dependency graph isn't a
straight line — it's more verbose per-task but far more legible than
simulating a DAG's shape by nesting Steps awkwardly.
Pass small values with parameters, larger data with artifacts.
Parameters are strings passed via templated {{steps.X.outputs. parameters.Y}} / {{tasks.X.outputs.parameters.Y}}; artifacts are
files staged to the configured artifact repository between steps:
templates:
- name: extract
container:
image: ghcr.io/example/etl-extract:1.2.0
command: ["./extract.sh", "/tmp/out/raw.parquet"]
outputs:
artifacts:
- name: raw-data
path: /tmp/out/raw.parquet
- name: transform
inputs:
artifacts:
- name: raw-data
path: /tmp/in/raw.parquet
from: "{{tasks.extract.outputs.artifacts.raw-data}}"
container:
image: ghcr.io/example/etl-transform:1.2.0
command: ["./transform.sh", "/tmp/in/raw.parquet", "/tmp/out/clean.parquet"]
outputs:
artifacts:
- name: clean-data
path: /tmp/out/clean.parquet
Never pass large files as outputs.parameters (they're stored as
plain strings in the Workflow status object, with a hard size limit)
— that's what outputs.artifacts and the artifact repository exist
for.
Extract reusable pipeline shape into a WorkflowTemplate (or
ClusterWorkflowTemplate for cross-namespace reuse) once more than one
Workflow shares structure:
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: build-scan-push
namespace: ci
spec:
entrypoint: main
arguments:
parameters:
- name: image-name
- name: image-tag
templates:
- name: main
dag:
tasks:
- { name: build, template: build }
- { name: scan, template: scan, dependencies: [build] }
- { name: push, template: push, dependencies: [scan] }
- name: build
container: { image: gcr.io/kaniko-project/executor:latest, args: ["--destination={{workflow.parameters.image-name}}:{{workflow.parameters.image-tag}}"] }
- name: scan
container: { image: aquasec/trivy:latest, args: ["image", "{{workflow.parameters.image-name}}:{{workflow.parameters.image-tag}}"] }
- name: push
container: { image: ghcr.io/example/registry-push:1.0.0 }
Individual teams then submit a thin Workflow referencing it:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: payments-api-build-
spec:
workflowTemplateRef:
name: build-scan-push
arguments:
parameters:
- { name: image-name, value: ghcr.io/example/payments-api }
- { name: image-tag, value: "1.4.2" }
Schedule recurring runs with CronWorkflow rather than a plain
Kubernetes CronJob running a script, when the job is itself a
multi-step graph:
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: nightly-etl
spec:
schedule: "0 2 * * *"
timezone: "UTC"
concurrencyPolicy: Replace # or Forbid / Allow
startingDeadlineSeconds: 300
workflowSpec:
workflowTemplateRef: { name: build-scan-push }
concurrencyPolicy: Replace terminates a still-running previous
instance before starting the new one — appropriate for idempotent ETL;
Forbid skips the new run if the previous is still in-flight —
appropriate when overlapping runs would corrupt shared state.
Set resource requests/limits and retry/backoff per template, not just at the workflow level, since each step is a distinct Pod with potentially very different resource needs:
templates:
- name: transform
retryStrategy:
limit: 3
retryPolicy: OnFailure
backoff: { duration: "10s", factor: 2, maxDuration: "2m" }
container:
image: ghcr.io/example/etl-transform:1.2.0
resources:
requests: { cpu: "2", memory: 4Gi }
limits: { cpu: "4", memory: 8Gi }
Submit, monitor, and debug:
argo submit workflow.yaml
argo list -n argo
argo get <workflow-name> -n argo
argo logs <workflow-name> -n argo --follow
argo logs <workflow-name> -n argo -c transform # logs for one step's container
For a failed multi-step run, argo get renders the DAG/steps tree with
per-node status, which is the fastest way to identify exactly which
node failed before diving into that node's logs specifically.
DAG for anything beyond a strictly linear pipeline — it
costs a little verbosity but avoids the common failure mode of forcing
a real dependency graph into Steps' stage-shaped model and getting
the parallelism/ordering subtly wrong.PersistentVolumeClaim mounted by every step, unless steps genuinely
need concurrent read/write access to the same files — a shared PVC
reintroduces implicit coupling and race conditions the DAG structure
was supposed to make explicit.WorkflowTemplate/
ClusterWorkflowTemplate early, parameterized by inputs — don't let
five teams maintain five near-identical Workflow YAMLs that drift.activeDeadlineSeconds at the workflow level and per-template
retryStrategy with bounded backoff.maxDuration — an unattended,
scheduled CronWorkflow with no deadline can run (and retry) forever
against a persistently failing dependency, burning cluster resources.ServiceAccount/RBAC to exactly what that step's
container needs; don't run every step under one workflow-wide
cluster-admin-ish account for convenience.Symptom: A Steps-based pipeline meant to run two independent
branches in parallel actually runs them sequentially, doubling total
runtime.
Fix: Parallel steps must be additional list entries within the
same outer - - group; a common mistake is putting each step as its
own top-level list item (which forces sequential ordering). Restructure
as a DAG if the sequential-vs-parallel intent is getting hard to read
in Steps form.
Symptom: A workflow step fails intermittently with an artifact
"not found" error even though the producing step completed
successfully.
Fix: Usually a misconfigured or missing artifact repository (no
artifactRepositoryRef / no default configured in
workflow-controller-configmap, or wrong bucket credentials) — the
producing step silently failed to upload the artifact, or the consuming
step's from: reference doesn't match the exact artifact name declared
in the producer's outputs.artifacts. Check
argo get <workflow> -o yaml for the actual artifact repository
location recorded in status, not just the template YAML.
Symptom: A CronWorkflow scheduled hourly has multiple overlapping
runs stacking up, each partially mutating shared external state (e.g.,
the same downstream table), causing inconsistent results.
Fix: Set concurrencyPolicy: Forbid (skip a new run if one is
still active) or Replace (kill the old one first) instead of the
default Allow, matched to whether overlapping runs are safe for that
specific pipeline's side effects.
Symptom: A workflow with dozens of fanned-out parallel pods
(e.g., a withItems/withParam loop over 500 elements) overwhelms
the cluster's scheduler/API server or hits pod quota, and most nodes
fail with generic scheduling errors rather than the pipeline's own
logic.
Fix: Set parallelism at the workflow or template level to cap
concurrent Pods (spec.parallelism: 20), and confirm the target
namespace's ResourceQuota accommodates the intended fan-out before
scaling it up.
Symptom: A WorkflowTemplate shared across teams changes (a step's
image is bumped) and every team's already-running or newly submitted
Workflows referencing it via workflowTemplateRef pick up the change
immediately and unexpectedly, with no version pin.
Fix: workflowTemplateRef resolves the template at submission
time from the current WorkflowTemplate object, not a pinned
version — for teams needing stability guarantees, version the template
name itself (build-scan-push-v2) on breaking changes, or embed the
full template inline in critical workflows instead of referencing a
shared mutable object.
Scenario: A nightly ETL pipeline: extract raw data, validate it,
transform it in two parallel shards, then load — reusable as a
WorkflowTemplate, scheduled nightly, with bounded retries and fan-out.
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: nightly-etl
namespace: data-pipelines
spec:
entrypoint: main
activeDeadlineSeconds: 3600
templates:
- name: main
dag:
tasks:
- { name: extract, template: extract }
- { name: validate, template: validate, dependencies: [extract] }
- name: transform-a
template: transform
dependencies: [validate]
arguments: { parameters: [{ name: shard, value: "a" }] }
- name: transform-b
template: transform
dependencies: [validate]
arguments: { parameters: [{ name: shard, value: "b" }] }
- name: load
template: load
dependencies: [transform-a, transform-b]
- name: extract
retryStrategy: { limit: 3, retryPolicy: OnFailure }
container: { image: ghcr.io/example/etl-extract:1.2.0 }
outputs:
artifacts:
- { name: raw-data, path: /tmp/out/raw.parquet }
- name: validate
inputs:
artifacts:
- { name: raw-data, path: /tmp/in/raw.parquet, from: "{{tasks.extract.outputs.artifacts.raw-data}}" }
container: { image: ghcr.io/example/etl-validate:1.0.0 }
- name: transform
inputs:
parameters: [{ name: shard }]
artifacts:
- { name: raw-data, path: /tmp/in/raw.parquet, from: "{{tasks.extract.outputs.artifacts.raw-data}}" }
container:
image: ghcr.io/example/etl-transform:1.2.0
args: ["--shard", "{{inputs.parameters.shard}}"]
outputs:
artifacts:
- { name: "clean-{{inputs.parameters.shard}}", path: /tmp/out/clean.parquet }
- name: load
inputs:
artifacts:
- { name: clean-a, path: /tmp/in/clean-a.parquet, from: "{{tasks.transform-a.outputs.artifacts.clean-a}}" }
- { name: clean-b, path: /tmp/in/clean-b.parquet, from: "{{tasks.transform-b.outputs.artifacts.clean-b}}" }
container: { image: ghcr.io/example/etl-load:1.0.0 }
---
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: nightly-etl-schedule
namespace: data-pipelines
spec:
schedule: "0 2 * * *"
timezone: "UTC"
concurrencyPolicy: Forbid
workflowSpec:
workflowTemplateRef: { name: nightly-etl }
argo get nightly-etl-schedule-<run-id> -n data-pipelines renders the DAG
tree, immediately showing whether transform-a or transform-b (rather
than the whole run) is the one that failed, and argo logs ... -c transform scoped to the failing node avoids trawling combined logs from
five steps.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/argocd-application-configurationConfigures Argo CD `Application` custom resources — sync policies (automated vs. manual, prune, self-heal), sync waves and hooks for ordered/multi-phase rollouts, and health checks for custom resource types. Use when the user asks to "write an Argo CD Application manifest," "enable auto-sync / self-heal / prune," "order resources with sync waves," "add a PreSync/PostSync hook," "fix an Application stuck OutOfSync or Progressing," or "define a custom health check for a CRD Argo CD doesn't understand natively."
/argocd-applicationset-patternsDesigns Argo CD `ApplicationSet` resources that template many `Application` objects from a single source using generators — List, Cluster, Git directory/file, and Matrix (combined generators). Use when the user asks to "generate an Application per cluster/environment/ directory," "avoid copy-pasting Argo CD Applications," "roll out a service to a fleet of clusters," "combine a cluster generator with a Git generator," or "debug an ApplicationSet producing unexpected or missing Applications."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin gitops-argo-skillsOther plugins' skills for the same job