$npx -y skills add mjunaidca/mjs-agent-skills --skill helmProduction-grade Helm 4 chart development, release management, and debugging. This skill should be used when users ask to create Helm charts, deploy with Helm, manage releases (install/upgrade/rollback), push charts to OCI registries, debug failed deployments, configure chart dep
| 1 | # Helm |
| 2 | |
| 3 | Helm 4 chart development and operations with security-first defaults. |
| 4 | |
| 5 | ## What This Skill Does |
| 6 | |
| 7 | **Chart Development:** |
| 8 | - Creates production charts with library pattern (reusable base + thin apps) |
| 9 | - Generates templates, helpers, hooks, and dependencies |
| 10 | - Auto-detects from Dockerfile: ports, health endpoints, resources |
| 11 | - Supports umbrella charts for multi-service deployments |
| 12 | - Adds values schema validation (JSON Schema) |
| 13 | |
| 14 | **Release Management:** |
| 15 | - Install, upgrade, rollback with atomic operations |
| 16 | - Release history and status inspection |
| 17 | - Values precedence management across environments |
| 18 | - Hook lifecycle (pre-install, pre-upgrade, post-upgrade, test) |
| 19 | |
| 20 | **Registry & Distribution:** |
| 21 | - OCI registry workflows (push, pull, digest pinning) |
| 22 | - Chart versioning and artifact management |
| 23 | - GitOps integration (ArgoCD, Flux) |
| 24 | |
| 25 | **Debugging:** |
| 26 | - Template rendering and debugging workflow |
| 27 | - Failed release recovery (stuck states, hook failures) |
| 28 | - Values resolution tracing |
| 29 | - Policy validation (OPA/Kyverno, security scanning) |
| 30 | |
| 31 | ## What This Skill Does NOT Do |
| 32 | |
| 33 | - Generate raw Kubernetes manifests (use kubernetes skill) |
| 34 | - Create Kustomize-only overlays without Helm |
| 35 | - Deploy Operators/CRDs (chart can include, but not operator setup) |
| 36 | - Manage cluster infrastructure (use kubernetes skill) |
| 37 | - Handle non-Helm deployments |
| 38 | |
| 39 | --- |
| 40 | |
| 41 | ## Before Implementation |
| 42 | |
| 43 | | Source | Gather | |
| 44 | |--------|--------| |
| 45 | | **Codebase** | Dockerfile, existing charts, values patterns | |
| 46 | | **Conversation** | Target environment, chart name, special requirements | |
| 47 | | **Skill References** | Chart patterns, Helm 4 features, hooks, security | |
| 48 | | **kubernetes skill** | Manifest patterns for templates (complementary) | |
| 49 | |
| 50 | --- |
| 51 | |
| 52 | ## Required Clarifications |
| 53 | |
| 54 | After auto-detection, confirm if ambiguous: |
| 55 | |
| 56 | | Question | When to Ask | |
| 57 | |----------|-------------| |
| 58 | | Chart type | "Creating new chart, library chart, or umbrella chart?" | |
| 59 | | Target registry | "OCI registry (GHCR, ECR, Harbor) or Git repo for GitOps?" | |
| 60 | | Environment strategy | "Single values file or per-environment overlays (dev/staging/prod)?" | |
| 61 | | Release namespace | "Deploy to specific namespace or chart-managed?" | |
| 62 | |
| 63 | --- |
| 64 | |
| 65 | ## Helm 4 Defaults (CRITICAL) |
| 66 | |
| 67 | Helm 4 introduces breaking changes from v3: |
| 68 | |
| 69 | | Feature | Helm 4 Behavior | Notes | |
| 70 | |---------|-----------------|-------| |
| 71 | | **Server-Side Apply** | Default ON | Better conflict detection, GitOps alignment | |
| 72 | | **kstatus watching** | Accurate health | Replaces old `--wait` behavior | |
| 73 | | **OCI-first** | Native support | `oci://` protocol, digest pinning | |
| 74 | | **Wasm plugins** | Sandboxed | Post-renderers require plugin format | |
| 75 | |
| 76 | See `references/helm4-features.md` for migration guidance. |
| 77 | |
| 78 | --- |
| 79 | |
| 80 | ## Auto-Detection Matrix |
| 81 | |
| 82 | ### From Dockerfile |
| 83 | |
| 84 | | Detect | How | Chart Generation | |
| 85 | |--------|-----|------------------| |
| 86 | | Port | EXPOSE | `containerPort` in deployment template | |
| 87 | | Health | CMD pattern | Liveness/readiness probe paths | |
| 88 | | User | USER instruction | `securityContext.runAsUser` | |
| 89 | | Base image | FROM | Resource hints (alpine=small, python=medium) | |
| 90 | |
| 91 | ### From Code |
| 92 | |
| 93 | | Detect | How | Chart Generation | |
| 94 | |--------|-----|------------------| |
| 95 | | Framework | imports/deps | Health endpoint patterns | |
| 96 | | GPU deps | torch, tensorflow | tolerations, nodeSelector, GPU resources | |
| 97 | | Sidecar needs | dapr.io, istio | Annotations for injection | |
| 98 | |
| 99 | --- |
| 100 | |
| 101 | ## Workflow |
| 102 | |
| 103 | ``` |
| 104 | 1. PRE-FLIGHT |
| 105 | - Verify helm version (v4.x required) |
| 106 | - Check target registry/cluster access |
| 107 | - Identify existing charts |
| 108 | ↓ |
| 109 | 2. ANALYZE PROJECT |
| 110 | - Read Dockerfile for detection |
| 111 | - Scan code for patterns |
| 112 | - Check existing values patterns |
| 113 | ↓ |
| 114 | 3. DETERMINE CHART TYPE |
| 115 | - Application chart (default) |
| 116 | - Library chart (reusable templates) |
| 117 | - Umbrella chart (multi-service) |
| 118 | ↓ |
| 119 | 4. GENERATE CHART |
| 120 | - Chart.yaml with dependencies |
| 121 | - values.yaml with schema |
| 122 | - Templates with helpers |
| 123 | - Hooks if lifecycle needs |
| 124 | ↓ |
| 125 | 5. VALIDATE |
| 126 | - helm lint |
| 127 | - helm template --debug |
| 128 | - helm install --dry-run |
| 129 | - Policy validation (optional) |
| 130 | ↓ |
| 131 | 6. DELIVER |
| 132 | - Chart in charts/ directory |
| 133 | - Summary of what was created |
| 134 | - Next steps (push to registry, GitOps setup) |
| 135 | ``` |
| 136 | |
| 137 | --- |
| 138 | |
| 139 | ## Chart Structure (Library Pattern) |
| 140 | |
| 141 | ``` |
| 142 | charts/ |
| 143 | ├── myapp-lib/ # Library chart (reusable) |
| 144 | │ ├── Chart.yaml |