No slash command · from tools-plugin
Processes, queries, and transforms YAML using yq v4+. Useful for parsing configs, modifying Kubernetes manifests or GitHub Actions workflows, and converting between YAML/JSON.
Ships in tools-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert knowledge for processing, querying, and transforming YAML data using yq v4+, the lightweight command-line YAML processor with jq-like syntax.
| Use this skill when... | Use another skill instead when... |
|---|---|
| Querying or modifying YAML files | The input is JSON only — use jq-json-processing |
| Editing YAML in place while preserving comments and key order | Multi-step transforms spanning YAML, JSON, CSV, TOML — use nushell-data-processing |
| Targeted updates to a Kubernetes manifest or Actions workflow | Full Kubernetes management (use kubectl); XML (use xmlstarlet) |
| Merging YAML configurations | Aggregating or grouping across many files — use nushell-data-processing |
YAML Operations
Configuration Management
# Pretty-print YAML
yq '.' file.yaml
# Extract specific field
yq '.fieldName' file.yaml
# Extract nested field
yq '.spec.containers[0].name' pod.yaml
# Access array element
yq '.[0]' array.yaml
yq '.items[2]' data.yaml
# Read specific field
yq '.metadata.name' deployment.yaml
# Read nested structure
yq '.spec.template.spec.containers[].image' deployment.yaml
# Read with default value
yq '.optional // "default"' file.yaml
# Check if field exists
yq 'has("fieldName")' file.yaml
# Update field value
yq -i '.metadata.name = "new-name"' file.yaml
# Update nested field
yq -i '.spec.replicas = 3' deployment.yaml
# Add new field
yq -i '.metadata.labels.app = "myapp"' file.yaml
# Delete field
yq -i 'del(.spec.nodeSelector)' file.yaml
# Append to array
yq -i '.items += {"name": "new-item"}' file.yaml
# Update all matching elements
yq -i '(.items[] | select(.name == "foo")).status = "active"' file.yaml
# Split multi-document YAML
yq -s '.metadata.name' multi-doc.yaml
# Select specific document (0-indexed)
yq 'select(document_index == 0)' multi-doc.yaml
# Process all documents
yq eval-all '.' multi-doc.yaml
# Filter documents
yq 'select(.kind == "Deployment")' k8s-resources.yaml
# Combine YAML files
yq eval-all '. as $item ireduce ({}; . * $item)' file1.yaml file2.yaml
# Get all keys
yq 'keys' file.yaml
# Select specific fields
yq '{name, version}' file.yaml
# Merge objects
yq '. * {"updated": true}' file.yaml
yq eval-all 'select(fileIndex == 0) * select(fileIndex == 1)' base.yaml override.yaml
# Deep merge
yq eval-all '. as $item ireduce ({}; . *+ $item)' base.yaml override.yaml
# YAML to JSON
yq -o=json '.' file.yaml
# Compact single-line JSON — the form to pipe into jq or a tool that reads stdin
yq -o=json -I=0 '.' file.yaml
.field - Access field.[] - Iterate array/object| - Pipe (chain operations), - Multiple outputs// - Alternative operator (default value)* - Merge objects (shallow)*+ - Deep merge objectskeys, values - Object keys/valueslength - Array/object/string lengthselect() - Filtersort_by() - Sortgroup_by() - Groupunique - Remove duplicateshas() - Check field existencetype - Get value typeadd - Sum or concatenatedel() - Delete field| Flag | Description |
|---|---|
-i | In-place edit |
-o | Output format (json, yaml, xml, csv, tsv, props) |
-p | Input format (json, yaml, xml) |
-I | Indent (default: 2) |
-r | Raw output (no quotes) |
-n | Null input (create from scratch) |
-s | Split multi-document YAML |
split(), join() - String/array conversioncontains() - String/array containstest() - Regex matchsub(), gsub() - String substitutionupcase, downcase - Case conversionFor detailed examples, advanced patterns, and best practices, see REFERENCE.md.
docker run --rm -i mikefarah/yq '.key' <<< 'key: value'What SKILL.md sets; muted values are Claude Code's defaults
sonnetThree short reads, in order
18 skills in this plugin
/apptainerApptainer: run OCI images as rootless batch jobs with --nv GPU passthrough and digest-pinned SIFs. Use when running a CUDA tool without Docker, podman lacks GPU support, or a pull fills root./binary-analysisBinary analysis: strings, binwalk, hexdump, xxd, file, objdump. Use when identifying unknown files, extracting strings, hunting credentials, or entropy analysis./cli-smoke-recipesCLI smoke recipes: expose pure-function modules via subcommands with a bulk-smoke justfile recipe. Use when designing data-transform modules or authoring smoke tests./d2-diagramsGenerate diagrams from text using D2 with automatic layouts and themes. Use when creating architecture diagrams, flowcharts, decision trees, sequence flows, or ERDs./deps-installDeps install: auto-detect package manager (uv, bun, npm, yarn, pnpm, cargo, go) and run the right install. Use when installing deps or syncing lockfiles./fd-file-findingfd fast file finding: smart defaults, gitignore-aware, parallel. Use when searching for files by name, extension, or pattern across directories.npx claudepluginhub laurigates/claude-plugins --plugin tools-pluginOther plugins' skills for the same job