Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ncaq/konoka --skill prefer-yqgit clone --depth 1 https://github.com/ncaq/konokaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ncaq/konoka/prefer-yq)<a href="https://agentmods.dev/skills/ncaq/konoka/prefer-yq"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/prefer-yq/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ncaq/konoka/prefer-yq"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/prefer-yq.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01586 |
| Opus 5.5 | $0.00026 | $0.00634 |
| Sonnet 5.5 | $0.00013 | $0.00317 |
| Haiku 4.5 | $0.00006 | $0.00159 |
Grade A, and why
prefer-yq scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
リモートから取得したデータは、`curl`からyqへ直接パイプせず、 How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
YAMLなどの処理にはyqを優先する
YAMLやXMLやTOMLやCSVといった構造化データを読み取ったり変換したりする用事には、yqを使ってください。
Pythonなどの汎用スクリプト言語や、sedによる場当たり的なテキスト置換は持ち出しません。
JSONにはyqではなくjqを使います。
yqでもJSONは扱えますが、形式ごとに道具を使い分けた方が読み手に意図が伝わるためです。
programming-tasuke:prefer-jqスキルを参照してください。
汎用スクリプト言語は何でも出来てしまうので、
コマンドの実行を承認する人間は、毎回スクリプトの中身を読んで安全性を判断することになります。
Bash(python:*)のような包括的な許可を出すのも危険です。
yqに出来ることはデータの変換にほぼ限られていて副作用が少ないので、
包括的な許可を出しやすく、承認の手間が発生しません。
インデントやアンカーの扱いを自前で組み立てるより、yqに任せた方が短く書けて読みやすいという利点もあります。
sedによる置換はYAMLの構造を理解しないので、
同じ名前のキーが別の階層にもある場合などに、意図しない箇所まで書き換えてしまいます。
yqはパスを指定して構造として扱うので、その危険がありません。
実装の区別
yqという名前のコマンドには、互換性のない2つの実装があります。
- mikefarah/yq: Go製の単体バイナリで、nixpkgsでは
yq-goです。このスキルはこちらを前提にします。 - kislyuk/yq: Python製のjqラッパーで、nixpkgsでは
yqです。フィルタの構文はjqと同一です。
書いたフィルタが構文エラーになったときは、実装の違いを疑ってyq --versionで判別してください。
mikefarah版はyq (https://github.com/mikefarah/yq/) version v4.53.2のように出力します。
入力形式と出力形式
入力形式の既定はautoで、ファイルの拡張子から判別されます。
判別できない入力は黙ってYAMLとして解釈されるので、気付かないまま誤った結果を得ることがあります。
標準入力や、.txtのように中身と一致しない拡張子のファイルを渡すときは、-pで入力形式を明示してください。
-pはauto, yaml, kyaml, json, props, csv, tsv, xml, base64, uri, toml, hcl, lua, iniをサポートします。
出力形式の既定もautoですが、入力形式ではなく入力ファイルの拡張子から決まり、
判別できなければYAMLになります。
JSONが欲しいときは-o=jsonを付けます。
-pを付けても出力形式は連動しないので、-pを付けるときは-oで出力形式も明示してください。
-oを省くと出力はYAMLになり、入力がファイルならYAMLへ倒した旨の警告も出ます。
yq -p=xml -o=yaml '.root.item' response.txt
リモートから取得したデータは、curlからyqへ直接パイプせず、
一度ファイルへ保存して中身を確認してから処理してください。
想定と違う形式や巨大なデータが返っていることに気付けるためです。
jqとの違いで戸惑いやすい点
- シェルの値は、フィルタへ文字列として連結せずに環境変数を経由して渡します。
jqの
--argの代わりに、env(NAME)かstrenv(NAME)で参照します。 - スカラーの展開は出力形式によって変わります。
YAML出力では既定でクォートなしに展開されますが、
-o=jsonでは"a"のようにクォートが付きます。 生の値が欲しいときは、--unwrapScalarの短縮形である-rを明示してください。 -sはjqのslurpではなく--split-expで、式の評価結果を名前にしたファイルを生成します。 入力をまとめたいときはeval-allや[...]を使います。- 複数のファイルやドキュメントを横断して処理するときは
eval-allを使います。
version=2 yq -i '.version = strenv(version)' compose.yaml
yq eval-all '. as $item ireduce ({}; . * $item)' base.yaml override.yaml
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago Changed · -41 lines f3cdba97e21d
- 2mo ago First seen · 135 lines · 65 tokens per session scan A 487d430c34cd
prefer-yq is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 65 tokens to every session and 1,586 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
prefer-yq compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| prefer-yqncaq/konoka | Skill | 3 | yesterday | Apache-2.0 | A | 65 | Claude Code |
| github-project-automationsecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 45 | Claude Code |
| hono-routingsecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 41 | Claude Code |
| api-testingsecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 39 | Claude Code |
| bun-http-serversecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 31 | Claude Code |
| bun-jest-migrationsecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 25 | Claude Code |
| cloudflare-workers-migrationsecondsky/claude-skills | Skill | 257 | 3d ago | MIT | A | 49 | Claude Code |