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-jqgit 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-jq)<a href="https://agentmods.dev/skills/ncaq/konoka/prefer-jq"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/prefer-jq/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-jq"><img src="https://agentmods.dev/badge/skills/ncaq/konoka/prefer-jq.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.00058 | $0.01172 |
| Opus 5.5 | $0.00023 | $0.00469 |
| Sonnet 5.5 | $0.00012 | $0.00234 |
| Haiku 4.5 | $0.00006 | $0.00117 |
Grade A, and why
prefer-jq scanned grade A with 0 findings 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
JSONの処理にはjqを優先する
JSONを読み取ったり、
絞り込んだり、
変換したりするだけの用事に、
Pythonなどの汎用スクリプト言語を持ち出さないでください。
jqを使ってください。
理由
汎用スクリプト言語は何でも出来てしまいます。
コマンドの実行を承認する人間は毎回スクリプトの中身を読んで安全性を判断しなければならず、
Bash(python:*)のような包括的な許可を出すことも危険です。
jqの出来ることはデータの変換にほぼ限られていて副作用が少ないため、
包括的な許可を出しやすく、
承認の手間が発生しません。
単にJSONを取り出したり整形したりするだけなら、 jqの方が短く書けて読みやすいという利点もあります。
汎用スクリプト言語のワンライナーは、 シェルのクォートとスクリプト側のクォートが干渉して壊れやすく、 リトライを繰り返す原因にもなります。
対比
値の取り出し。
# 避ける
python3 -c 'import json,sys; print(json.load(sys.stdin)["items"][0]["name"])'
# 使う
jq -r '.items[0].name'
絞り込み。
# 避ける
python3 -c 'import json,sys; d=json.load(sys.stdin); print("\n".join(x["name"] for x in d["items"] if x["active"]))'
# 使う
jq -r '.items[] | select(.active) | .name'
集計。
# 避ける
python3 -c 'import json,sys; print(sum(x["size"] for x in json.load(sys.stdin)["items"]))'
# 使う
jq '[.items[].size] | add'
Pythonに限った話ではありません。
node -eやruby -eやperl -eのような他の汎用言語のワンライナーも同様に避けてください。
よく使うオプション
-r: 文字列をクォートなしの生の値として出力します。シェル変数へ代入する時に使います。-e: 出力に応じて終了ステータスを変えます。最後の出力がfalseかnullなら1、出力が一つも無ければ4になります。条件判定に使えます。-n: 入力を読まずにJSONを組み立てます。-s: 複数の入力をひとつの配列にまとめます。--arg name valueと--argjson name json: シェルの値をフィルタへ安全に渡します。
シェルの値をフィルタの文字列へ連結してJSONを組み立てるのは避けてください。 クォートやエスケープが壊れます。
# 避ける
jq ".name = \"$name\"" data.json
# 使う
jq --arg name "$name" '.name = $name' data.json
ファイルの書き換え
リポジトリ内のファイルを書き換える時はEditツールを優先してください。
差分が読みやすく、
意図しない整形の変化も起きません。
jqは読み取りと抽出とパイプでの加工に使ってください。 jqは入力ファイルを直接書き換えないため、 別のファイルへ書き出してから置き換える必要があり、 その手間に見合うのは機械が生成した巨大なJSONを一括変換するような場合だけです。
例外
以下の場合はPythonなどを使って構いません。
- HTTP通信やファイルシステムの操作など、JSONの変換以外の副作用が処理の本体である場合。
- 統計処理や複雑な日時計算など、jqの標準機能では表現が極端に複雑になる場合。
- 既存のPythonプロジェクトの一部としてコードを書く場合。
- 実行環境にjqが入っていない場合。
例外に当たる場合でも、 JSONを抽出する部分だけをjqへ切り出せるなら切り出してください。
YAMLやXMLやTOMLやCSVについてはprogramming-tasuke:prefer-yqスキルを参照してください。
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.
- 1mo ago First seen · 105 lines · 58 tokens per session scan A 5cd6595b2dac
prefer-jq is a skill published in the GitHub repository ncaq/konoka (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 58 tokens to every session and 1,172 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other skills, from other repositories
cloudflare-email-routing
Cloudflare Email Routing for receiving/sending emails via Workers. Use for email workers, forwarding, allowlists, or encountering Email Trigger errors, worker call failures, SPF issues.
bun-sqlite
Use for bun:sqlite, SQLite operations, prepared statements, transactions, and queries.
api-testing
HTTP API testing for TypeScript (Supertest) and Python (httpx, pytest). Test REST APIs, GraphQL, request/response validation, authentication, and error handling.
bun-http-server
Use when building HTTP servers with Bun.serve, handling requests/responses, implementing routing, creating REST APIs, or configuring fetch handlers.
bun-jest-migration
Use when migrating from Jest to Bun's test runner, import compatibility, mocks, and config.
cloudflare-workers-migration
Migrate to Cloudflare Workers from AWS Lambda, Vercel, Express, and Node.js. Use when porting existing applications to the edge, adapting serverless functions, or resolving Node.js API compatibility issues.