一键导入
data-transform
jq-style select, filter, and reshape over JSON and YAML — extract paths, map arrays, and filter records without writing throwaway code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
jq-style select, filter, and reshape over JSON and YAML — extract paths, map arrays, and filter records without writing throwaway code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Read, filter, select, aggregate, and join CSV / tabular data without spinning up a full data stack.
Write a dataset (array of records) to CSV, JSON, XLSX, or PDF through one interface — format chosen by the output extension.
Read, write, search, and edit files in the workspace safely — atomic writes, exact-match edits, and recursive content search.
Everyday git — clone, branch, stage, diff, commit, and push, with a safe, predictable workflow.
Make HTTP/REST requests with auth, custom headers, query/body, pagination, retries with backoff, and structured error handling.
Connect to a Model Context Protocol (MCP) server, perform the handshake, discover its tools, and invoke them over JSON-RPC.
| name | data-transform |
| description | jq-style select, filter, and reshape over JSON and YAML — extract paths, map arrays, and filter records without writing throwaway code. |
| version | 0.1.0 |
Pull values out of JSON/YAML and reshape them without writing a one-off script each time. Use this when you have a structured blob and need a field, a filtered subset, or a remapped shape.
The helper at scripts/transform.py (stdlib json) gives you a small
path-and-filter language. YAML input/output works if pyyaml is installed
(pip install pyyaml); JSON needs nothing.
Paths address into a document with dots and brackets:
user.name — nested key access.items[0] — list index.items[] — map over every element of a list (returns a list of results).items[].id — pluck id from every element.. — the whole document.Examples:
# Extract a nested value
python scripts/transform.py 'data.total' < response.json
# Pluck a field from every element of a list
python scripts/transform.py 'results[].email' < users.json
# Filter a list of objects, then project two fields each
python scripts/transform.py 'items[]' --where 'status=active' \
--pick id,name < orders.json
--where key=value — keep only list elements where key equals value
(string compare). Repeatable; all conditions must match (AND).--pick a,b,c — for objects (or a list of objects), keep only those keys.--input / --output — json (default) or yaml. Reads stdin, writes
stdout.python transform.py '.')
or the keys before assuming a path exists.data), then narrow
(data.items[]) — that's how you discover the real structure of an unfamiliar
payload.--where, then reduce each
record with --pick. Order matters: filtering first keeps the output small.--input/--output (e.g. read YAML config,
emit JSON for an API).null rather than crashing — check for null before
using the result.--where compares as strings; status=active matches the string "active".json module instead of
forcing it through this path language.