Comprehensive toolkit for generating best practice Helm charts and resources following current standards and conventions. Use this skill when creating new Helm charts, implementing Helm templates, scaffolding Chart.yaml and values.yaml, defining deployment templates, service definitions, ingress configurations, .tpl helpers, or building Helm projects from scratch. Trigger phrases include "create", "generate", "build", "scaffold" alongside terms like "kubernetes helm", "k8s charts", "helm package", "chart dependencies", "values.yaml", or "helm install".
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Generate production-ready Helm charts with best practices built-in. Create complete charts or individual resources with standard helpers, proper templating, and automatic validation.
Official Documentation:
_helpers.tpl, never from repeated literals.values.yaml, environment overrides outside the chart.Chart.yaml, values.yaml and templates..tpl helpers.REQUIRED: Use AskUserQuestion if any of these are missing or ambiguous:
| Missing Information | Question to Ask |
|---|---|
| Image repository/tag | "What container image should be used? (e.g., nginx:1.25)" |
| Service port | "What port does the application listen on?" |
| 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 assume values for critical settings. Ask first, then proceed.
If custom resources are needed:
Try context7 MCP first:
mcp__context7__resolve-library-id with operator name
mcp__context7__get-library-docs with topic for CRD kindFallback to WebSearch:
"<operator>" "<CRD-kind>" "<version>" kubernetes documentation specSee references/crd_patterns.md for common CRD examples.
Use the scaffolding script:
bash scripts/generate_chart_structure.sh <chart-name> <output-directory> [options]Script options:
--image <repo> - Image repository (default: nginx). Note: Pass only the repository name without tag (e.g., redis not redis:7-alpine)--port <number> - Service port (default: 80)--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 promptingImportant customization notes:
http as the default port name in templates. Customize port names for non-HTTP services (e.g., redis, mysql, grpc).Values.configMap.enabled and .Values.secret.enabled)Use the helpers script or assets/_helpers-template.tpl:
bash scripts/generate_standard_helpers.sh <chart-name> <chart-directory>⚠️ CRITICAL REQUIREMENT: Read Reference Files NOW
You MUST use the
Readtool to load these reference files at this stage, even if you read them earlier in the conversation:1. Read references/resource_templates.md - for the specific resource type patterns 2. Read references/helm_template_functions.md - for template function usage 3. Read references/crd_patterns.md - if generating CRD resources (ServiceMonitor, Certificate, etc.)Why: Prior context may be incomplete or summarized. Reading reference files at generation time guarantees all patterns, functions, and examples are available for accurate template creation.
Do NOT skip this step. Template quality depends on having current reference patterns loaded.
Reference templates for all resource types in references/resource_templates.md:
Key patterns (MUST include in all templates):
# Use helpers for names and labels
metadata:
name: {{ include "mychart.fullname" . }}
labels: {{- include "mychart.labels" . | nindent 4 }}
# Conditional sections with 'with'
{{- with .Values.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 2 }}
{{- end }}
# Checksum annotation (REQUIRED for Deployments/StatefulSets/DaemonSets to trigger restarts on config changes)
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}Structure guidelines:
# -- commentsSee assets/values-schema-template.json for JSON Schema validation.
Run validation using devops-skills:helm-validator skill (helm lint, template render, schema checks, dry-run).
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. Ship CRDs in crds/ directory (not templated); template CR instances in templates/.
toYaml for complex objects_helpers.tpl with standard helpers| Issue | Solution |
|---|---|
| Template syntax errors | Check {{- / -}} matching, use helm template --debug |
| Undefined values | Use default or required functions |
| Indentation issues | Use nindent consistently |
| CRD validation fails | Verify apiVersion, check docs for required fields |
After generating charts, invoke devops-skills:helm-validator to ensure quality.
values.yamlWHY: Pinning to :latest or a hard-coded version in the chart prevents version overrides at deploy time.
BAD: image: repository: myapp tag: latest
GOOD: image: repository: myapp tag: "" with appVersion as the default, overridden via --set image.tag=v1.2.3.
resources: limits and requests on containersWHY: Containers without resource constraints are evicted unpredictably under node pressure and cannot be scheduled by the Kubernetes cluster autoscaler.
BAD: No resources: block in the container spec template.
GOOD: Set both requests and limits for CPU and memory, with documented tuning guidance in values.yaml.
helm upgrade --install without --atomic in CI/CDWHY: Without --atomic, a failed upgrade leaves the release in a broken state that blocks future upgrades and requires manual helm rollback.
BAD: helm upgrade --install myapp ./chart
GOOD: helm upgrade --install --atomic --timeout 5m myapp ./chart
values.yamlWHY: Mixing production values into the chart couples the chart to one environment.
BAD: Production database URLs in values.yaml.
GOOD: Use a layered values approach: values.yaml for defaults, values-prod.yaml for overrides, -f values-prod.yaml at deploy time.
helm template + kubeval/kubeconform validationWHY: A chart that renders without error can still produce invalid Kubernetes manifests.
BAD: Only run helm lint before deploying.
GOOD: helm template . | kubeval --strict --ignore-missing-schemas to validate rendered manifests against the Kubernetes API schema.
WHY: guessed images, ports, limits or probe paths produce a chart that installs but does not work.
BAD: silently choosing nginx and port 80 when the user did not say.
GOOD: ask for the missing image, port, limits, probes, scaling, workload type and storage before generating.
WHY: earlier context may be incomplete or summarised, so patterns and function usage drift from the references.
BAD: writing templates from memory because the references were read earlier.
GOOD: read the resource templates, template functions and (for CRDs) CRD patterns at generation time.
WHY: literal names and duplicated labels drift between resources and break release naming.
BAD: name: myapp and hand-written app: myapp labels.
GOOD: {{ include "mychart.fullname" . }} and {{- include "mychart.labels" . | nindent 4 }}.
WHY: without it, Deployments, StatefulSets and DaemonSets do not restart when a ConfigMap or Secret changes.
BAD: a Deployment that mounts a ConfigMap with no checksum/config annotation.
GOOD: add the checksum annotation, gated by .Values.configMap.enabled and .Values.secret.enabled.
templates/WHY: CRDs must exist before their instances and should not be templated or re-rendered per release.
BAD: a CRD manifest under templates/.
GOOD: ship CRDs in the crds/ directory and template only the custom resource instances.
http port name on a non-HTTP serviceWHY: the scaffolding script names the port http, which misleads probes, services and operators for other protocols.
BAD: a Redis service port named http.
GOOD: rename the port after the protocol, for example redis, mysql or grpc.
| Topic | Reference | When to Use |
|---|---|---|
| Template functions | references/helm_template_functions.md | Using required, default, toYaml, tpl and friends |
| Resource templates | references/resource_templates.md | Writing any Kubernetes resource template |
| CRD patterns | references/crd_patterns.md | cert-manager, Prometheus, Istio and ArgoCD resources |
| Chart scaffolding script | scripts/generate_chart_structure.sh | bash scripts/generate_chart_structure.sh <chart-name> <output-dir> |
| Helpers script | scripts/generate_standard_helpers.sh | bash scripts/generate_standard_helpers.sh <chart-name> <chart-dir> |
| Values schema | assets/values-schema-template.json | JSON Schema validation of values.yaml |
pantheon-org/tekhne
c8416e9
Also appears in
last in sync Aug 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.