From devops
Generates production-ready Helm charts for Kubernetes apps. Scaffolds charts for Deployments, StatefulSets, Jobs, CronJobs, converts manifests to templates, and creates multi-environment configs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops:helm-scaffoldThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Automate production-ready Helm chart generation using template assets, Python scaffolding scripts, and Kubernetes best practices through conversational interaction.
README.mdassets/templates/Chart.yamlassets/templates/NOTES.txtassets/templates/_helpers.tplassets/templates/configmap/configmap.yamlassets/templates/cronjob/cronjob.yamlassets/templates/deployment/deployment.yamlassets/templates/hpa/hpa.yamlassets/templates/ingress/ingress.yamlassets/templates/job/job.yamlassets/templates/rbac/serviceaccount.yamlassets/templates/service/service.yamlassets/templates/statefulset/statefulset.yamlassets/templates/values.yamlreferences/best-practices.mdreferences/examples.mdreferences/templates.mdreferences/testing-guide.mdreferences/workload-types.mdscripts/scaffold_chart.pyAutomate production-ready Helm chart generation using template assets, Python scaffolding scripts, and Kubernetes best practices through conversational interaction.
scripts/scaffold_chart.py)assets/templates/ directoryFor simple chart generation, use the Python scaffolding script directly:
python3 scripts/scaffold_chart.py <chart-name> \
--workload-type deployment \
--output /mnt/user-data/outputs \
--ingress \
--hpa
User Request
├─ Simple chart (name + type provided)
│ └─ Use scaffold_chart.py directly
├─ Complex chart (many options)
│ └─ Ask clarifying questions, then use scaffold_chart.py
├─ Manifest conversion
│ └─ Manual templatization process
└─ Custom requirements
└─ Manual generation with template references
Identify the scenario:
scaffold_chart.py with user-provided paramsMinimum required:
Optional (ask if not provided):
For straightforward charts, execute the Python script:
import subprocess
cmd = [
'python3', 'scripts/scaffold_chart.py',
chart_name,
'--workload-type', workload_type,
'--output', '/mnt/user-data/outputs'
]
if include_ingress:
cmd.append('--ingress')
if include_hpa:
cmd.append('--hpa')
if include_configmap:
cmd.append('--configmap')
subprocess.run(cmd, check=True)
The script automatically:
assets/templates/CHARTNAME placeholder with actual chart nameFor custom requirements, manually copy and modify templates:
assets/templates/<workload>/<file>.yamlCHARTNAME with actual chart name/home/claude/<chart-name>/templates/If user requests dev/staging/prod configs, create additional values files:
values-dev.yaml:
replicaCount: 1
resources:
limits: {cpu: 200m, memory: 128Mi}
requests: {cpu: 25m, memory: 32Mi}
env:
- name: LOG_LEVEL
value: "debug"
values-prod.yaml:
replicaCount: 3
resources:
limits: {cpu: 1000m, memory: 512Mi}
requests: {cpu: 100m, memory: 128Mi}
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 10
Always provide comprehensive testing workflow:
# Navigate to chart directory
cd <chart-name>
# 1. Validate chart structure
helm lint .
# 2. Render templates locally
helm template <chart-name> .
# 3. Dry run installation
helm install <chart-name> . --dry-run --debug
# 4. Test with specific values
helm template <chart-name> . -f values-dev.yaml
# 5. Deploy to test namespace
kubectl create namespace test
helm install <chart-name> . -n test
# 6. Verify deployment
kubectl get all -n test
helm status <chart-name> -n test
# 7. Cleanup
helm uninstall <chart-name> -n test
kubectl delete namespace test
/mnt/user-data/outputs/<chart-name>/Load references/workload-types.md for detailed decision tree and characteristics.
Quick reference:
Template locations:
assets/templates/deployment/deployment.yamlassets/templates/statefulset/statefulset.yamlassets/templates/job/job.yamlassets/templates/cronjob/cronjob.yamlWhen user provides raw Kubernetes YAML:
{{ .Values.* }}{{ include "CHARTNAME.fullname" . }} for names{{ include "CHARTNAME.labels" . }} for labelsassets/templates/_helpers.tpl and customizeassets/templates/
├── Chart.yaml # Base chart metadata
├── values.yaml # Complete values with all options
├── .helmignore # Files to ignore
├── _helpers.tpl # Helper functions (CHARTNAME placeholder)
├── NOTES.txt # Post-install instructions
├── deployment/
│ └── deployment.yaml # Deployment template
├── statefulset/
│ └── statefulset.yaml # StatefulSet template
├── job/
│ └── job.yaml # Job template
├── cronjob/
│ └── cronjob.yaml # CronJob template
├── service/
│ └── service.yaml # Service template
├── ingress/
│ └── ingress.yaml # Ingress template
├── hpa/
│ └── hpa.yaml # HPA template
├── configmap/
│ └── configmap.yaml # ConfigMap template
└── rbac/
└── serviceaccount.yaml # ServiceAccount template
All templates use CHARTNAME placeholder which is replaced by the script.
Purpose: Automated chart generation from templates
Usage:
python3 scripts/scaffold_chart.py CHART_NAME [OPTIONS]
Arguments:
CHART_NAME Name of the Helm chart
Options:
-w, --workload-type Type: deployment, statefulset, job, cronjob (default: deployment)
-o, --output Output directory (default: current directory)
--ingress Include Ingress resource
--hpa Include HorizontalPodAutoscaler
--configmap Include ConfigMap
What it does:
assets/templates/CHARTNAME placeholderThe templates in assets/templates/ already include:
app.kubernetes.io/*)For platform teams needing consistent charts:
assets/templates/_helpers.tpl with org labelsExample org-specific helper addition:
{{- define "CHARTNAME.orgLabels" -}}
org.example.com/cost-center: {{ .Values.org.costCenter | required "Cost center required" }}
org.example.com/team: {{ .Values.org.team | required "Team name required" }}
{{- end }}
Generated charts must:
helm lint without errors (95%+ target)Load as needed based on use case:
For workload selection:
references/workload-types.md - Decision tree, characteristics, when to use each typeFor testing:
references/testing-guide.md - Comprehensive dry-run workflows, mock values, validation commandsFor best practices:
references/best-practices.md - CNCF/Helm standards, security guidelinesFor examples:
references/examples.md - Real-world chart scenariosFor template reference:
references/templates.md - Inline template documentationUser: "Create a Helm chart for my Node.js API"
Claude: I'll create a chart for your Node.js API. A few quick questions:
1. What's the chart name? (e.g., "user-api")
2. What's your container image? (e.g., "myorg/user-api:1.0.0")
3. Do you need an Ingress? (yes/no)
User: Name is user-api, image is myorg/user-api:1.0.0, yes to ingress
Claude: [Executes]
python3 scripts/scaffold_chart.py user-api \
--workload-type deployment \
--output /mnt/user-data/outputs \
--ingress
[Chart generated successfully]
[Provides testing instructions]
User: "Create a Helm chart for PostgreSQL with persistent storage"
Claude: I'll create a StatefulSet chart for PostgreSQL.
What storage size do you need? (e.g., 10Gi, 20Gi)
User: 20Gi
Claude: [Executes]
python3 scripts/scaffold_chart.py postgresql \
--workload-type statefulset \
--output /mnt/user-data/outputs
[Then manually adds persistence config to values.yaml]
persistence:
enabled: true
size: 20Gi
storageClass: standard
User: "Create a CronJob chart for nightly backups"
Claude: [Executes]
python3 scripts/scaffold_chart.py db-backup \
--workload-type cronjob \
--output /mnt/user-data/outputs
[Then updates values.yaml with schedule]
cronjob:
schedule: "0 2 * * *"
Issue: Script fails to find templates Solution: Ensure running from skill directory or provide full path to script
Issue: CHARTNAME not replaced Solution: Script automatically handles this; if manual, use find/replace
Issue: Generated chart fails lint Solution: Check values.yaml for required fields, review templates
scaffold_chart.py when possible - it's faster and consistentCHARTNAME placeholder - script replaces automaticallyGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub p/vukhanhtruong-devops-plugins-devops