一键导入
helm-types-gen
Use when asking about generating Helm types, HelmValuesForChart, TypeScript interfaces from Helm charts, or the helm-types CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when asking about generating Helm types, HelmValuesForChart, TypeScript interfaces from Helm charts, or the helm-types CLI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
BuildKite CI/CD pipeline configuration, YAML syntax, dynamic pipelines, and agent management When user works with BuildKite, mentions CI pipelines, .buildkite/ directory, buildkite-agent commands, pipeline YAML, build steps, BuildKite API, or asks about CI configuration, pipeline generation, step dependencies, retry configuration, agent queues, or Kubernetes CI agents
Check PR health status (conflicts, CI, approval) and get actionable next steps
Monitor a PR through reviews and merge conflicts until ready for human review. Use when user says "monitor PR", "watch PR", or wants automated PR workflow. Creates PR if needed, then monitors review comments and merge conflicts. Note: this monorepo's CI runs on Buildkite (`buildkite/monorepo/pr` + `ci/merge-conflict`) per PR — watch it via `bk build view` or the Buildkite web UI, not `gh run`.
Talos Linux cluster administration using talosctl When user mentions Talos, talosctl, or Talos cluster operations
Use when asking about version management, Renovate annotations, versions.ts patterns, or pinning image/chart versions.
Git version control best practices, advanced operations, and modern features When user works with git, mentions git commands, branching, rebasing, merging, or git troubleshooting
| name | helm-types-gen |
| description | Use when asking about generating Helm types, HelmValuesForChart, TypeScript interfaces from Helm charts, or the helm-types CLI. |
The @homelab/helm-types package generates TypeScript interfaces from Helm chart JSON schemas, enabling compile-time type safety for Helm values configuration.
bunx @homelab/helm-types \
--name argo-cd \
--repo https://argoproj.github.io/argo-helm \
--version 8.3.1 \
--output src/cdk8s/generated/helm/argo-cd.types.ts
| Option | Alias | Required | Description |
|---|---|---|---|
--name | -n | Yes | Unique identifier for the chart |
--repo | -r | Yes | Helm repository URL |
--version | -v | Yes | Chart version |
--chart | -c | No | Chart name in repo (defaults to --name) |
--output | -o | No | Output file path (stdout if omitted) |
--interface | -i | No | Interface name (auto-generated from chart name) |
bunx @homelab/helm-types \
--name cert-manager \
--repo https://charts.jetstack.io \
--version 1.14.0 \
--output src/cdk8s/generated/helm/cert-manager.types.ts
Edit src/cdk8s/src/misc/typed-helm-parameters.ts:
import type { CertmanagerHelmValues } from "../../generated/helm/cert-manager.types.ts";
type HelmChartValuesMap = {
"argo-cd": ArgocdHelmValues;
"cert-manager": CertmanagerHelmValues; // Add new chart
// ... other charts
};
export type HelmValuesForChart<TChart extends keyof HelmChartValuesMap> =
HelmChartValuesMap[TChart];
import type { HelmValuesForChart } from "../misc/typed-helm-parameters.ts";
const certManagerValues: HelmValuesForChart<"cert-manager"> = {
installCRDs: true, // Type-safe with autocomplete
prometheus: {
enabled: true,
servicemonitor: {
enabled: true,
},
},
};
The tool performs these steps:
values.yaml and values.schema.jsonThe committed src/cdk8s/generated/helm/*.types.ts are the source of truth (git-committed,
refreshed weekly by the helm-types-weekly-refresh Temporal schedule, which opens a PR on
drift). bun run generate-helm-types (src/cdk8s/scripts/generate-helm-types.ts) helm pulls
every chart in versions.ts. Behavior (post-PR #1150):
rm -rf generated/helm then regenerate,
so a single flaky fetch could silently delete a committed type file. Now it writes in place,
retries fetches 3×, prunes only charts removed from versions.ts, and throws if any chart
can't be generated (two runs ⇒ 0 diff)..prettierrc), with a scoped
helm repo update <repoName> and fail-fast prettier — a full generate leaves the tree
byte-clean, no manual prettier --write needed afterward.git restore packages/homelab/src/cdk8s/generated/helm/
(the whole dir) — never re-run the generator to "fix" them.datasource=docker in versions.ts
(renovate models OCI as docker); they're pulled via helm pull oci://… and tracked by the
OCI_CHART_KEYS allowlist in parse-helm-charts.ts.config.{queue,…})
need EXTENSIBLE_TYPE_PATTERNS entries in helm-types/src/config.ts, since the generator only
infers from active values.yaml defaults; those blocks become [key: string]: unknown.@default annotationsexport type CertmanagerHelmValues = {
/**
* Install CRDs as part of the Helm release
* @default true
*/
installCRDs?: boolean;
/**
* Prometheus monitoring configuration
*/
prometheus?: CertmanagerHelmValuesPrometheus;
};
export type CertmanagerHelmValuesPrometheus = {
enabled?: boolean;
servicemonitor?: CertmanagerHelmValuesPrometheusServicemonitor;
};
src/helm-types/src/cli.ts - CLI entry pointsrc/helm-types/src/type-converter.ts - JSON Schema → TypeScript conversionsrc/helm-types/src/yaml-comments.ts - Comment extraction and preservationsrc/helm-types/src/interface-generator.ts - Code generationsrc/cdk8s/src/misc/typed-helm-parameters.ts - Type registrysrc/cdk8s/generated/helm/*.types.ts - Generated type files