k8s-yaml-validator

Validate Kubernetes YAML manifests for syntax, schema, and dry-run errors.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/ToanPV90/dotfiles --skill k8s-yaml-validator-toanpv90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-yaml-validator
Source: https://github.com/ToanPV90/dotfiles/tree/main/claude/.claude/skills/k8s-yaml-validator
Command: npx skills add https://github.com/ToanPV90/dotfiles --skill k8s-yaml-validator-toanpv90

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you catch Kubernetes YAML issues early by validating manifests for syntax problems, schema/CRD correctness, and cluster-time admission or policy errors—without changing anything.

Core Features & Use Cases

  • Report-only manifest validation: Produces a staged, consolidated report and never edits files or suggests applying changes automatically.
  • Multi-stage checking: Runs document counting, tool availability checks, YAML linting, CRD detection/document lookup, strict schema validation, and dry-run testing when possible.
  • CRD-aware insights: Detects CRD kinds and pulls version-relevant documentation (Context7 first, then web search) to explain required fields and constraints.
  • Use case: Validate a Helm-rendered manifest containing multiple resources (e.g., Deployment + Service + CRDs) to identify typos, missing fields, wrong types, and schema mismatches before you apply it.

Quick Start

Use k8s-yaml-validator to validate your Kubernetes YAML manifest (for example, attached file.yaml) and get a report of all detected issues with exact file line numbers.

Frequently Asked Questions about k8s-yaml-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Kubernetes YAML manifests for schema compliance before deploying?

To validate Kubernetes YAML manifests for schema compliance, run a multi-stage check covering syntax errors, CRD document correctness, and strict kubeconform validation. This process produces a report-only output with line-number-accurate errors, ensuring your manifests are safe to apply.

What is the best way to check multi-document YAML files for CRD correctness?

Checking multi-document YAML files for CRD correctness involves detecting custom resource kinds and pulling version-relevant documentation via Context7. This lookup explains required fields and constraints, generating a consolidated validation report without modifying your files.

Can I use kubectl dry-run to test Helm-rendered manifests without applying changes?

Yes, you can use controlled kubectl dry-run logic to test Helm-rendered manifests without applying changes. The validation workflow evaluates cluster-time admission or policy errors and outputs a safe, report-only summary of detected issues.

Does kubeconform validation work with custom resource definitions?

Yes, kubeconform validation works with custom resource definitions by applying strict schema checks. The validator detects CRD kinds and retrieves version-relevant documentation using Context7 with a web search fallback to explain required fields and constraints.

Why does my Kubernetes YAML validation not catch missing fields in custom resources?

Kubernetes YAML validation might miss fields in custom resources if strict schema compliance is not enforced. Applying strict kubeconform validation alongside CRD detection and Context7 documentation lookup ensures required fields and constraints are reported accurately.