From devops-skills
Generates Helm charts with Chart.yaml, values.yaml, templates, and helpers for Kubernetes workloads like Deployments, StatefulSets, and DaemonSets.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops-skills:helm-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate production-ready Helm charts with deterministic scaffolding, standard helpers, reusable templates, and validation loops.
assets/_helpers-template.tplassets/values-schema-template.jsonexamples/webapp/Chart.yamlexamples/webapp/templates/NOTES.txtexamples/webapp/templates/_helpers.tplexamples/webapp/templates/deployment.yamlexamples/webapp/templates/hpa.yamlexamples/webapp/templates/ingress.yamlexamples/webapp/templates/service.yamlexamples/webapp/templates/serviceaccount.yamlexamples/webapp/values.yamlreferences/crd_patterns.mdreferences/helm_template_functions.mdreferences/resource_templates.mdscripts/generate_chart_structure.shscripts/generate_standard_helpers.shtests/test_generate_chart_structure.shGenerate production-ready Helm charts with deterministic scaffolding, standard helpers, reusable templates, and validation loops.
Official Documentation:
| Use helm-generator | Use OTHER skill |
|---|---|
| Create new Helm charts | helm-validator: Validate/lint existing charts |
| Generate Helm templates | k8s-yaml-generator: Raw K8s YAML (no Helm) |
| Convert K8s manifests to Helm | k8s-debug: Debug deployed resources |
| Implement CRDs in Helm | k8s-yaml-validator: Validate K8s manifests |
Use this skill when prompts include phrases like:
Follow these stages in order. Do not skip required stages.
Collect:
deployment, statefulset, or daemonsetUse request_user_input when critical fields are missing.
If request_user_input is unavailable, ask in normal chat and continue with explicit assumptions.
| Missing Information | Question to Ask |
|---|---|
| Image repository/tag | "What container image should be used? (e.g., nginx:1.25)" |
| Service port | "What service port should be exposed?" |
| Container target port | "What container port should traffic be forwarded to?" |
| Resource limits | "What CPU/memory limits should be set? (e.g., 500m CPU, 512Mi memory)" |
| Probe endpoints | "What health check endpoints does the app expose? (e.g., /health, /ready)" |
| Scaling requirements | "Should autoscaling be enabled? If yes, min/max replicas and target CPU%?" |
| Workload type | "What workload type: Deployment, StatefulSet, or DaemonSet?" |
| Storage requirements | "Does the application need persistent storage? Size and access mode?" |
Do not silently assume critical settings.
mcp__context7__resolve-library-idmcp__context7__query-docsAlso consult references/crd_patterns.md for example patterns.
Run:
bash scripts/generate_chart_structure.sh <chart-name> <output-directory> [options]
Options:
--image <repo> - Supports repo-only, tagged image, registry ports, and digest refs--port <number> - Service port (default: 80)--target-port <number> - Container target port (default: 8080)--type <type> - Workload type: deployment, statefulset, daemonset (default: deployment)--with-templates - Generate resource templates (deployment.yaml, service.yaml, etc.)--with-ingress - Include ingress template--with-hpa - Include HPA template--force - Overwrite existing chart without promptingImage parsing behavior:
--image nginx:1.27 -> repository nginx, tag 1.27--image registry.local:5000/team/app -> repository kept intact--image ghcr.io/org/app@sha256:... -> digest mode (no tag concatenation)--tag cannot be combined with digest image referencesIdempotency and overwrite behavior:
generate_chart_structure.sh: prompts before overwrite; --force overwrites non-interactively.generate_standard_helpers.sh: prompts before replacing templates/_helpers.tpl; --force bypasses prompt.Expected scaffold shape:
mychart/
Chart.yaml
values.yaml
templates/
_helpers.tpl
NOTES.txt
serviceaccount.yaml
service.yaml
configmap.yaml
secret.yaml
deployment.yaml|statefulset.yaml|daemonset.yaml
ingress.yaml (optional)
hpa.yaml (optional)
.helmignore
Run:
bash scripts/generate_standard_helpers.sh <chart-name> <chart-directory>
Required helpers: name, fullname, chart, labels, selectorLabels, serviceAccountName.
Fallback:
assets/_helpers-template.tpl and replace CHARTNAME with the chart name.Consult relevant references once at this stage:
references/resource_templates.md for the resource patterns being generatedreferences/helm_template_functions.md for templating function usagereferences/crd_patterns.md only when CRDs are in scopeExample file-open commands:
sed -n '1,220p' references/resource_templates.md
sed -n '1,220p' references/helm_template_functions.md
Resource coverage from references/resource_templates.md:
Required template patterns:
metadata:
name: {{ include "mychart.fullname" . }}
labels: {{- include "mychart.labels" . | nindent 4 }}
{{- with .Values.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 2 }}
{{- end }}
annotations:
{{- if and .Values.configMap .Values.configMap.enabled }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
Checksum annotations are required for workloads, but must be conditional and only reference generated templates (configmap.yaml, secret.yaml).
Structure guidelines:
# -- commentsservice.port and service.targetPort separate and explicitconfigMap.enabled / secret.enabled aligned with generated templatesSee assets/values-schema-template.json for JSON Schema validation.
Preferred path: run the helm-validator skill.
If skill invocation is unavailable, run local commands directly:
helm lint <chart-dir>
helm template test <chart-dir>
If helm is unavailable, report the block clearly and perform partial checks:
bash -n scripts/generate_chart_structure.shbash -n scripts/generate_standard_helpers.shRe-run validation after any fixes.
See references/helm_template_functions.md for complete guide.
| Function | Purpose | Example |
|---|---|---|
required | Enforce required values | {{ required "msg" .Values.x }} |
default | Fallback value | {{ .Values.x | default 1 }} |
quote | Quote strings | {{ .Values.x | quote }} |
include | Use helpers | {{ include "name" . | nindent 4 }} |
toYaml | Convert to YAML | {{ toYaml .Values.x | nindent 2 }} |
tpl | Render as template | {{ tpl .Values.config . }} |
nindent | Newline + indent | {{- include "x" . | nindent 4 }} |
See references/crd_patterns.md for complete examples.
Key points:
crds/ directory (not templated, not deleted on uninstall)templates/ directory (fully templated)values.yamltoYaml for complex objects_helpers.tpl with standard helpershelm-validator (or local lint/template fallback), then test with different values| Issue | Solution |
|---|---|
| Template syntax errors | helm template test <chart-dir> --debug --show-only templates/<file>.yaml |
| Undefined values | helm lint <chart-dir> --strict and add default/required |
| Checksum include errors | Ensure templates/configmap.yaml and templates/secret.yaml exist and configMap.enabled / secret.enabled are set correctly |
| Port mismatch (Service vs container) | Set both service.port and service.targetPort, then re-run helm template test <chart-dir> |
| CRD validation fails | Verify apiVersion/spec fields with Context7 or operator docs, then re-render |
| Script argument failures | Run bash scripts/generate_chart_structure.sh --help and pass required values for option flags |
Full scaffold with templates, ingress, HPA, and explicit port mapping:
bash scripts/generate_chart_structure.sh webapp ./charts \
--image ghcr.io/acme/webapp:2.3.1 \
--port 80 \
--target-port 8080 \
--type deployment \
--with-templates \
--with-ingress \
--with-hpa
Digest-based image scaffold:
bash scripts/generate_chart_structure.sh api ./charts \
--image ghcr.io/acme/api@sha256:0123456789abcdef \
--with-templates
Minimal scaffold without templates:
bash scripts/generate_chart_structure.sh starter ./charts
Mark complete only when all checks pass:
Chart.yaml, values.yaml, .helmignore, templates/NOTES.txt, and templates/_helpers.tpl existvalues.yaml contains explicit service.port and service.targetPort--with-templates was used, serviceaccount.yaml, service.yaml, configmap.yaml, secret.yaml, and one workload template existhelm-validator skill or local fallback commands) and outcomes reported| Script | Usage |
|---|---|
scripts/generate_chart_structure.sh | bash scripts/generate_chart_structure.sh <chart-name> <output-dir> [options] |
scripts/generate_standard_helpers.sh | bash scripts/generate_standard_helpers.sh <chart-name> <chart-dir> [--force] |
| File | Content |
|---|---|
references/helm_template_functions.md | Complete template function guide |
references/resource_templates.md | All K8s resource templates |
references/crd_patterns.md | CRD patterns (cert-manager, Prometheus, Istio, ArgoCD) |
| File | Purpose |
|---|---|
assets/_helpers-template.tpl | Standard helpers template |
assets/values-schema-template.json | JSON Schema for values validation |
After generating charts, invoke helm-validator and close the loop:
helm-validator (or local fallback commands)npx claudepluginhub akin-ozer/cc-devops-skills --plugin devops-skillsGenerates production-ready Helm 3 charts for Kubernetes apps with Chart.yaml, values.yaml, Go templates, helpers, health probes, security contexts, and multi-environment values overrides.
Guides creation, organization, and management of Helm charts for packaging and deploying Kubernetes applications. Useful for scaffolding charts, templating manifests, multi-environment deployments, and repositories.
Creates, tests, validates, and packages Helm charts for Kubernetes using helm create, lint, template, package commands on Chart.yaml, values.yaml, templates, and dependencies.