yq

Parse and transform YAML data using yq in shell scripts.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/led8/.codex --skill yq-led8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yq
Source: https://github.com/led8/.codex/tree/main/skills/yq
Command: npx skills add https://github.com/led8/.codex --skill yq-led8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

YAML data is verbose to read and modify in scripts; this skill enables fast parsing and manipulation with yq, reducing boilerplate and error-prone grep/awk pipelines.

Core Features & Use Cases

  • Read and query values from YAML
  • Update, merge, and convert YAML between YAML and JSON
  • Work with Kubernetes manifests, Docker Compose files, and general configuration

Quick Start

Ask your AI to extract the value at .services.web.image from docker-compose.yaml using yq.

Frequently Asked Questions about yq

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

FAQPage Schema
How do I parse and extract values from YAML files in shell scripts?

You can parse YAML data and extract values in shell scripts using yq to query specific fields, replacing error-prone grep and awk pipelines with reliable dot-notation path access for fast reading.

What is the best way to update or merge Kubernetes manifests without destroying the original file?

Updating and merging Kubernetes manifests is best done with yq, which enforces safe, non-destructive in-place edits to modify your YAML configuration while preserving the original file structure and formatting.

Can I convert YAML to JSON for Kubernetes manifests and Docker Compose files?

Yes, you can convert YAML to JSON for Kubernetes manifests and Docker Compose files using yq, which provides consistent JSON output to integrate your configuration data with JSON-based processing tools.

Does yq support environment variable substitution when updating YAML configurations?

Yes, yq supports environment variable substitution when updating YAML configurations, allowing you to dynamically inject values into your shell scripts for Docker Compose or general configuration scenarios.

Why should I use a dedicated YAML processor instead of grep and awk for configuration parsing?

Using a dedicated YAML processor like yq avoids the boilerplate and parsing errors of grep and awk, correctly handling YAML's hierarchical structure and indentation for reliable data extraction and modification.