Use when working with Helm templates and template functions for generating Kubernetes manifests dynamically.
Assists with Helm template syntax and functions when creating or editing Kubernetes manifests. Activates when you're working with `{{ }}` expressions, template functions like `default` or `toYaml`, or need help with values.yaml references and control structures.
/plugin marketplace add TheBushidoCollective/han/plugin install jutsu-functional-programming@hanThis skill cannot use any tools. It operates in read-only mode without the ability to modify files or execute commands.
Working with Helm templates and template functions.
apiVersion: v1
kind: Pod
metadata:
name: {{ .Values.name }}
namespace: {{ .Release.Namespace }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
.Values: Values from values.yaml and overrides.Release: Release information (Name, Namespace, IsUpgrade, IsInstall).Chart: Chart metadata from Chart.yaml.Files: Access non-template files in chart.Capabilities: Kubernetes cluster capabilities.Template: Current template information# upper, lower, title
name: {{ .Values.name | upper }}
# quote
value: {{ .Values.password | quote }}
# trimSuffix, trimPrefix
image: {{ .Values.image | trimSuffix ":latest" }}
# replace
url: {{ .Values.url | replace "http" "https" }}
# default function
port: {{ .Values.port | default 8080 }}
tag: {{ .Values.image.tag | default .Chart.AppVersion }}
# required function
database: {{ required "database.host is required" .Values.database.host }}
# toString, toJson, toYaml
replicas: {{ .Values.replicas | toString }}
annotations:
{{ toYaml .Values.annotations | indent 2 }}
config: |
{{ toJson .Values.config | indent 2 }}
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}
spec:
# ...
{{- end }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
# Use existing claim
{{- else if .Values.persistence.enabled }}
# Create new claim
{{- end }}
{{- range .Values.environments }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range $key, $value := .Values.config }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "mychart.labels" -}}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "mychart.selectorLabels" -}}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
metadata:
labels:
{{- include "mychart.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "mychart.selectorLabels" . | nindent 6 }}
{{- with .Values.service }}
apiVersion: v1
kind: Service
metadata:
name: {{ .name }}
spec:
type: {{ .type }}
ports:
- port: {{ .port }}
{{- end }}
{{- range $index, $value := .Values.items }}
item-{{ $index }}: {{ $value }}
{{- end }}
# Remove leading whitespace
{{- .Values.name }}
# Remove trailing whitespace
{{ .Values.name -}}
# Remove both
{{- .Values.name -}}
config: |
{{ .Files.Get "config/app.conf" | indent 2 }}
{{- range $path, $content := .Files.Glob "config/*.yaml" }}
{{ $path }}: |
{{ $content | indent 2 }}
{{- end }}
environment: {{ ternary "production" "development" .Values.production }}
# Returns first non-empty value
port: {{ coalesce .Values.service.port .Values.port 8080 }}
# list, append, prepend, concat
args:
{{- range list "arg1" "arg2" "arg3" }}
- {{ . }}
{{- end }}
# dict, set, unset, hasKey
{{- $config := dict "key1" "value1" "key2" "value2" }}
{{- if hasKey $config "key1" }}
found: true
{{- end }}
# Print debug info
{{ printf "%#v" .Values | indent 2 }}
# Fail on purpose to see values
{{ fail (printf "Debug: %#v" .Values) }}
{{- define "mychart.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- if not (has .Values.service.type (list "ClusterIP" "NodePort" "LoadBalancer")) }}
{{- fail "service.type must be ClusterIP, NodePort, or LoadBalancer" }}
{{- end }}
# Always quote strings
value: {{ .Values.string | quote }}
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.