From devops
Manages Helm chart version upgrades across Terraform+Helm platforms. Handles atomic 3-file updates with version discovery from ArtifactHub. Use when upgrading Helm charts, checking for outdated versions, or performing version consistency checks.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops:helm-version-upgradeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manages Helm chart version upgrades across Terraform+Helm platforms. Handles an **atomic multi-file update** pattern: the Terraform file containing Helm module blocks + each module's variable file + any version-tracking documentation.
Manages Helm chart version upgrades across Terraform+Helm platforms. Handles an atomic multi-file update pattern: the Terraform file containing Helm module blocks + each module's variable file + any version-tracking documentation.
This skill activates when the user requests:
Do NOT assume any hardcoded file names or paths. Discover the repo structure at runtime:
Search for Terraform files containing Helm module blocks:
grep -rl 'source\s*=.*modules.*helm\|module.*helm\|helm_release' --include="*.tf" . | grep -v '.terraform/'
This identifies the orchestrator file(s) (e.g., 3-gke-package.tf, main.tf, helm.tf, etc.).
Parse the orchestrator file(s) for module blocks. Extract source paths to find module directories:
source = "./modules/helm/<name>" or source = "../modules/<name>" or any relative pathFor each module directory, find the variable file:
variable.tf (singular), variables.tf (plural), or any .tf file containing variable "install_version" blocksgrep -l 'variable.*install_version\|variable.*chart_version\|variable.*version' <module-dir>/*.tfSearch for any Markdown file containing version references:
find . -name "*.md" -not -path "./.terraform/*" | xargs grep -l '\-\-version\|helm.*upgrade\|helm.*install' 2>/dev/null
This may find version-tracking docs, install guides, or project readmes. If none found, skip the documentation update step.
For each module, read its main.tf (or any .tf file containing helm_release) and extract:
repository + chart fields from the helm_release resourcerepository field), extract chart = "oci://..." URL#)Ask the user which modules to check:
Parse the discovered orchestrator file(s) to extract current install_version (or chart_version/version) for each module block. Use the module list from Step 0.
For each module in scope, verify the version matches across all discovered locations:
| Location | How to find version |
|---|---|
| Orchestrator file (from Step 0a) | install_version = "X.Y.Z" in the module block |
| Module variable file (from Step 0c) | default = "X.Y.Z" in the version variable |
| Version doc (from Step 0d, if found) | --version X.Y.Z in the helm command |
CRITICAL: Variable files vary across repos (variable.tf, variables.tf, or others). Always use the file discovered in Step 0c. If no version-tracking doc was found in Step 0d, skip that check.
If any mismatch is found:
For each module, derive the ArtifactHub slug from the module's main.tf:
repository URL and chart name from the helm_release resourcehttps://grafana.github.io/helm-charts → owner grafana)GET https://artifacthub.io/api/v1/packages/helm/{owner}/{chart}
Response parsing:
version field from the response (this is the latest version)app_version for informational displaydeprecated flagsFor OCI-only charts where ArtifactHub may not have data:
chart field in main.tfDisplay results in a table:
| Module | Current | Latest | Change Type | Notes |
|---------------------|-----------|-----------|-------------|----------------|
| argocd | 9.2.4 | 9.3.0 | Minor | |
| grafana | 10.5.4 | 10.5.4 | Up to date | |
| litellm | 1.81.8... | ??? | OCI-manual | Check manually |
Change Type classification:
Up to date — same versionPatch — only Z changed (X.Y.Z)Minor — Y changedMajor — X changed (highlight with warning)OCI-manual — cannot auto-checkPresent the list of available upgrades and ask user to confirm:
For each confirmed module, update all discovered files atomically:
File 1: Orchestrator file (from Step 0a)
source path for this moduleinstall_version = "<new_version>" (or chart_version/version as used)File 2: Module variable file (from Step 0c)
install_version, chart_version, or version)default = "<new_version>"File 3: Version-tracking doc (from Step 0d, if found)
--version <new_version> in the helm commandSee UPGRADE_PATTERNS.md for exact regex patterns and edge cases per module.
After all updates:
terraform validate and terraform planWhen invoked with check-only (e.g., from *health pipeline):
source. Update ALL instances in the orchestrator file and the one shared variables file.chart field contains full OCI URL instead of repository + chart.1.81.8-nightly-latest).install_version value.When invoked with --dry-run or when the user asks to "preview" or "check only":
--- a/3-gke-package.tf
+++ b/3-gke-package.tf
@@ module "grafana" @@
- install_version = "10.5.4"
+ install_version = "10.6.0"
If an update needs to be reverted:
git checkout -- <file> as a last resort if working in a clean Git statenpx claudepluginhub qwedsazxc78/devops-ai-skill --plugin devopsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.