smithery/xdg

yq

Extract a known field from a YAML file by running yq instead of reading the whole file.

Installation

$ npx skills add smithery/xdg --skill yq

Also in this package

Other skills from smithery/xdg.

npx skills add smithery/xdg

Browse all from smithery/xdg

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 697 B
  • docs SUMMARY.md 126 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

yq

When you need a specific field from a YAML file, reach for yq rather than Read. Syntax mirrors jq.

yq '.field' file.yml

Assumes mikefarah/yq (Go-based). The Python kislyuk/yq fork has different syntax; if jq-style queries don't work, check which yq is on PATH.

Three things easy to forget:

  • -r -- raw string output (no surrounding quotes)
  • select(document_index == N) -- pick the Nth doc in a multi-document file (--- separators)
  • yq -o json file.yml | jq '...' -- escape hatch when yq syntax gets ugly

For anything else, yq --help.