dot_claude/skills/nu-data/SKILL.md
Use when about to reach for jq, awk, or a Python one-liner to query, filter, or transform structured data (JSON, CSV, TOML, NDJSON, Parquet).
npx skillsauth add nijaru/dotfiles nu-dataInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Nu treats structured data as native tables. Reach for it over jq when exploring unknown shapes, doing multi-step transforms, or working with multiple formats.
| Situation | Tool |
| -------------------------------- | ----------- |
| Exploring unknown JSON structure | nu |
| Multi-step filter + reshape | nu |
| Multi-format (JSON + CSV + TOML) | nu |
| One-liner in a bash/fish script | jq |
| CI/CD pipeline (portability) | jq |
| Pure regex text matching | grep/rg |
open data.json # auto-parsed table
open data.json | explore # interactive TUI browser
open data.json | describe # show schema
open users.json | where age > 30
open users.json | get users | select name email
open users.json | get users.0.name # dot-path indexing
open data.csv | where status == "active" | to json
open config.toml | get database.host
ls *.json | each { |f| open $f.name | get id } | flatten
open logs.ndjson | lines | each { |line| $line | from json } | where level == "error"
# Install once: plugin add ~/.cargo/bin/nu_plugin_polars
polars open large.parquet | polars filter col("age") > lit(30) | polars collect
open data.json | get items | select name value | to csv
open data.json | update price { $in * 1.1 } | to json --indent 2
| Task | Command |
| ----------------- | ------------------------------------ |
| Pretty print JSON | open f.json |
| Count records | open f.json \| length |
| Unique values | open f.json \| get field \| uniq |
| Sort | open f.json \| sort-by field |
| Group by | open f.json \| group-by field |
| Flatten nested | open f.json \| flatten |
| Convert format | open f.csv \| to json |
| Filter nulls | open f.json \| where field != null |
nu -c "open data.json | where active == true | to json"
Or pipe into nu:
cat data.json | nu -c "from json | where active == true"
open auto-detects format by extension — for ambiguous files use open f.txt | from json. not [] for array index: get users.0 not get users[0]$"...": $"Hello ($name)"each blocks need explicit params: { |row| ... } not { ... }development
Use after completing a bug fix, feature, refactor, or tk task when the first implementation taught enough context to replace it with a simpler, cleaner, or more coherent version before finalizing.
development
Use when writing, migrating, or reviewing Zig code across recent stable versions (0.14-0.16), especially to correct stale syntax or stdlib, build.zig, allocator, formatting, or runtime API knowledge.
documentation
Use when reviewing or revising text (prose, docs, commits) to remove AI patterns and improve voice/clarity.
content-media
Use when fetching X/Twitter post content by URL, or searching for recent X posts.