mcpField
D
data-tools

data-tools

github.com/netresearchData & databases193 installsUpdated 2d ago
Repository

About data-tools

A skill for developers working with structured data, guiding tool selection and command patterns for JSON, YAML, TOML, XML, CSV, and JSONL. It emphasizes format-aware utilities instead of general text tools for structured files.

Key features

  1. 01Format-based data tool selection
  2. 02Query and conversion command examples
  3. 03Coverage of JSON, YAML, TOML, XML
  4. 04CSV and JSONL operation patterns
  5. 05Anti-patterns and command cautions

Use cases

  1. 01Extracting a version from package.json
  2. 02Updating a service image in YAML
  3. 03Filtering and joining CSV data
  4. 04Filtering JSONL log records

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/netresearch/data-tools-skill --skill data-tools

After installing, type/data-toolsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
evals.json
references/
csv-processing.md
dasel-cookbook.md
enforcement-hook.md
jq-cookbook.md
mlr-cookbook.md
yq-cookbook.md

Details

From the project README

Data Tools Skill

Critical Rule

NEVER use grep, sed, awk, or inline interpreters (python3 -c, node -e) on JSON, JSONL, YAML, TOML, XML, or CSV. Refuse and use the correct tool — text tools break on structure; inline scripts are verbose and fragile.


Key Patterns

For the general legacy-tool → modern-tool comparison (grep→rg, find→fd, cat→bat, ...), see the cli-tools skill's table.

Convert: dasel -w FORMAT or yq -o FORMAT.

jq -- JSON (no in-place)
jq -r '.version' package.json
jq '.users[] | select(.role == "admin") | .name' users.json
jq '.version = "2.0.0"' pkg.json > pkg.json.tmp && mv pkg.json.tmp pkg.json
jq -s '.[0] * .[1]' base.json override.json

Or gh --jq when the source is the GitHub CLI (see below) — no separate jq process needed.

yq -- YAML (in-place -i)
yq '.services.web.image' docker-compose.yml
yq -i '.services.app.image = "node:20"' docker-compose.yml
yq -o json config.yml
dasel -- TOML (only native tool) / XML (or xmlstarlet for XPath) / Universal auto-detect
dasel -f Cargo.toml '.package.version'
dasel put -f config.toml -t string -v "2.0" '.project.version'
dasel -f input.json -w yaml
qsv -- CSV / TSV
qsv headers data.csv && qsv stats data.csv --everything | qsv table
qsv search -s status "active" users.csv | qsv select name,email
qsv join user_id orders.csv id users.csv

qsv index, stats and frequency write files next to the input (x.csv.idx, x.stats.csv*). In a repository or a package directory, run them on a copy (details).

mlr -- JSONL / multi-format / DSL (in-place -I)
mlr --c2j cat data.csv
mlr --jsonl filter '$level == "error"' logs.jsonl
mlr -I --csv put '$total = $qty * $price' orders.csv
GitHub CLI -- always --jq
gh api repos/owner/repo/releases/latest --jq '.tag_name'
gh pr list --json number,title --jq '.[] | [.number, .title] | @tsv'

Anti-Patterns

# BAD → GOOD: jq -r '.version' package.json
grep '"version"' package.json | sed 's/.*"\(.*\)".*/\1/'
# BAD → GOOD: yq -i '.services.app.image = "node:20"' compose.yml
sed -i 's/image: node:.*/image: node:20/' docker-compose.yml
# BAD → GOOD: qsv select 2 data.csv
awk -F',' '{print $2}' data.csv
# BAD → GOOD: jq -r '.version' plugin.json
python3 -c 'import json;print(json.load(open("plugin.json"))["version"])'

References

CookbookContent
jq CookbookFiltering, transforms, GitHub CLI, large inputs ("Argument list too long", Windows)
yq CookbookActions, Compose, K8s
dasel CookbookTOML/XML, conversion
CSV Processingqsv workflows, joins
mlr CookbookJSONL, DSL, stats, joins
Enforcement HookPreToolUse gate shipped with this plugin: denies field extraction, warns once otherwise

Docs: jq, yq, dasel, qsv, mlr.

Comments

Markdown supported