yq

Extract specific fields from large YAML files using yq syntax.

20|2|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/xdg/xdg-claude --skill yq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yq
Source: https://github.com/xdg/xdg-claude/tree/main/context-efficient-tools/skills/yq
Command: npx skills add https://github.com/xdg/xdg-claude --skill yq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Extract specific fields from YAML files without loading the entire document, saving time and tokens during data extraction and validation.

Core Features & Use Cases

  • Selective field extraction: retrieve nested values from docker-compose.yml, GitHub Actions workflows, Kubernetes manifests, and other YAML configurations with minimal data read.
  • Flexible output options: return raw strings, YAML, or JSON to suit downstream tooling and scripting needs.
  • Real-world workflows: validate configurations, snapshot key values, or progressively extract data from large YAML files for reporting or automation.

Quick Start

Run a quick example to extract a field, such as retrieving the version from config.yml.

Frequently Asked Questions about yq

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

FAQPage Schema
How do I extract specific fields from a large YAML file without reading the whole document?

Extract specific fields from a large YAML file by querying only the required nested values instead of loading the entire document. This approach saves significant time and tokens during data extraction and validation workflows.

Can I query nested data in Kubernetes manifests and GitHub Actions workflows?

Query nested data in Kubernetes manifests and GitHub Actions workflows by applying specific syntax to retrieve required fields. This handles nested fields and arrays effectively, returning partial data from large configurations.

Does this YAML extraction method support JSON output for downstream automation?

YAML extraction supports JSON output for downstream automation. You can return raw strings, YAML, or JSON formats to suit downstream tooling and scripting needs during configuration validation or reporting.

What is the best way to validate partial configuration values in docker-compose files?

The best way to validate partial configuration values in docker-compose files is selective field extraction. Retrieve nested keys progressively to snapshot specific values or validate configurations without parsing the full document.

Do I need to understand yq syntax to extract data from YAML configurations?

Understanding yq syntax is required to extract data from YAML configurations. You must know the querying commands to selectively retrieve nested fields, handle arrays, and format outputs as raw strings, YAML, or JSON.