yq-yaml-processing_skill

This skill helps you process YAML efficiently with yq, including querying, filtering, and transforming manifests and configurations.
  • Shell

7

GitHub Stars

2

Bundled Files

3 weeks ago

Catalog Refreshed

2 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstart where the catalogue uses aiagentskills.

npx veilstart add skill laurigates/claude-plugins --skill yq-yaml-processing

  • REFERENCE.md9.1 KB
  • SKILL.md5.1 KB

Overview

This skill provides practical commands and patterns for querying, filtering, and transforming YAML using the yq v4+ command-line tool. It focuses on common tasks like reading fields, editing files in-place, handling multi-document YAML, merging configurations, and converting formats. Use it to speed up YAML edits in CI/CD, Kubernetes manifests, GitHub Actions workflows, and config automation.

How this skill works

The skill uses yq expressions (jq-like syntax) to navigate YAML paths, select and filter documents, and apply transformations. It demonstrates reading values, in-place updates with -i, multi-document operations, object merges (shallow and deep), and format conversion with -o/-p flags. Examples show array indexing, select() filters, del(), and string functions for practical automation tasks.

When to use it

  • Quickly inspect or pretty-print YAML files and multi-document manifests
  • Modify Kubernetes manifests, Helm values, or GitHub Actions workflows without opening an editor
  • Merge configuration files or deep-merge overrides during CI/CD
  • Convert YAML to JSON, XML, CSV, or compact JSON for downstream tools
  • Filter or extract specific documents from multi-document YAML bundles

Best practices

  • Keep destructive changes behind version control and run yq -i only when changes are committed
  • Test complex expressions with non-destructive queries (omit -i) before modifying files
  • Prefer eval-all for combining files and *+ for deep merges when merging nested structures
  • Use select(document_index == N) to target specific documents in multi-doc files
  • Use -o and -p to control formats explicitly when piping between tools or scripts

Example use cases

  • Update replica counts across multiple Kubernetes Deployment YAMLs with a single command
  • Extract container images from manifests for inventory or security scanning
  • Merge environment-specific override files into a base config during CI pipeline
  • Split or filter a multi-document manifest to isolate resources of a given kind
  • Convert YAML workflow definitions to compact JSON for API consumption or diffing

FAQ

Run the same yq expression without -i to preview output. Pipe to a diff tool against the original file if needed.

What flag converts YAML to JSON?

Use -o=json or -o=json -I=0 for compact JSON output.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational