kustomize-resource-validationlisted
Install: claude install-skill qwedsazxc78/devops-ai-skill
# Kustomize Resource Validation -- Auto-trigger Skill
Automatically activates when any `kustomization.yaml` file is edited.
## Activation
**Trigger:** Any file named `kustomization.yaml` inside a Kustomize module directory (any directory containing `base/` and `overlays/` structure) is created or edited.
**Scope:** This applies to both base and overlay `kustomization.yaml` files.
## Instructions
After the user edits a `kustomization.yaml`, perform these validations in order. Use the file system tools (Glob, Read) to verify references -- do not guess.
### 1. Resource Reference Validation
For every entry in the `resources:` list, verify the target exists:
- **Directory references** (e.g., `../../base`): Resolve the relative path from the `kustomization.yaml` location and confirm the directory exists and contains its own `kustomization.yaml`.
- **File references** (e.g., `gitlab-runner-secret.yaml`): Confirm the file exists in the same directory as the `kustomization.yaml`.
Report missing references as **FAIL**.
### 2. Patch Reference Validation
For every entry in the `patches:` list that uses a `path:` key, verify:
- The referenced YAML file exists relative to the `kustomization.yaml` directory.
- The file contains valid Kubernetes resource structure (must have `apiVersion`, `kind`, and `metadata` fields).
Report missing or malformed patches as **FAIL**.
### 3. Orphaned File Detection
List all `.yaml` files in the same directory as the `kustomization.yaml`, then