Skip to content
Skills Library
Data & analytics · Automation

nushell

/nushell

Process structured data in pipelines, filter tables, transform JSON/CSV/YAML, and define custom commands. Use when scripting with typed parameters or working with tabular data.

Repository
nix-config ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Process structured data in pipelines, filter tables, transform JSON/CSV/YAML, and define custom commands. Use when scripting with typed parameters or working with tabular data.

Original author description

Process structured data in pipelines, filter tables, transform JSON/CSV/YAML, and define custom commands. Use when scripting with typed parameters or working with tabular data.

How it works

  1. Core Concepts
  2. Running Scripts
  3. Data Manipulation
  4. Scripting
  5. File Operations
  6. Tips
Original SKILL.md headings · 144 lines, 484 words
SKILL.md preview
---
name: nushell
description: Process structured data in pipelines, filter tables, transform JSON/CSV/YAML, and define custom commands. Use when scripting with typed parameters or working with tabular data.
---

# nu-shell

Structured-data shell. Pipelines work on tables, lists, and records, not only text.

## Core Concepts

### Data Types

- **Record**: `{ name: "John", age: 30 }`
- **List**: `[1, 2, 3]`
- **Table**: list of records with same fields

### Pipelines

```nu
ls | where size > 10mb | sort-by size
```

## Running Scripts

```bash
nu myscript.nu           # Run script file
nu -c 'ls | length'      # Run inline command
source myscript.nu       # Run in current session
```

## Data Manipulation

### Loading and Saving

```nu
let config = (open config.json)
let data = (open data.csv)

$data | save output.yaml
$data | to json | save output.json
```

### Filtering and Selecting

```nu
ls | where name =~ "test"        # Filter rows
ls | select name size            # Select columns
(open package.json).version      # Access fields
```

### Processing Tables

```nu
ls | where size > 10mb           # Filter by condition
ls | select name size            # Select columns
ls | sort-by size                # Sort
ls | group-by name               # Group
ls | length                      # Count rows
```

### Processing Records

```nu
let user = { name: "John", age: 30 }
echo $user.name                  # Access field

let updated = { ...$user, age: 31 }  # Update field
let merged = { ...$config, debug: true }  # Merge
```

### Processing Lists

```nu
[1, 2, 3, 4, 5] | where $it > 2           # Filter
[1, 2, 3] | each { |x| $x * 2 }           # Map
[1, 2, 3, 4, 5] | reduce { |acc, x| $acc + $x }  # Reduce
```

## Scripting

### Basic Script Structure

```nu
#!/usr/bin/env nu

def "my command" [param: string] {
    echo $"Hello, ($param)"
}

my command "world"
```

### Control Flow

```nu
# If statement
if true { echo "Hello" }

# If-else
if true { echo "Yes" } else { echo "No" }

# For loop
for i in 1..10 { echo $i }

# While loop
mut i = 1
while $i <= 10 {
    echo $i
    $i = $i + 1
}
```

### Custom Commands

```nu
# With typed parameters
def "create project" [name: string, type: string = "typescript"] {
    echo $"Creating ($name) with ($type)"
}

# With flags
def "deploy" [--env: string = "production"] {
    echo $"Deploying to ($env)"
}
```

## File Operations

```nu
let content = (open "file.txt")       # Read
$content | save "output.txt"          # Write
$content | save --append "file.txt"   # Append
```

## Tips

- Use `nu -c 'command'` for inline runs
- Use `open` to load many data formats
- Use `save` to write many data formats
- Use `where` to filter tables
- Use `select` to pick columns
- Use `sort-by` to sort tables
- Use `each` to map lists
- Use `reduce` to combine list items
- Use `def` for custom commands with typed params
- Use `...` to merge records

Versions

RepositoryScoreLicence
This page · DaRacci/nix-config100MIT
hakula139/plugins100MIT
ryoppippi/dotfiles100MIT
vinnie357/claude-skills100MIT

Database snapshot: 13.11.2026 · package version d0d3055ec67a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100nushell-data-processing
    Structured data processing with nushell — native tables, multi-format parsing (JSON/YAML/TOML/CSV/XML), pipelines, group-by. Use when running multi-step cross-format transforms awkward in jq.
  • 100nushell-plugin-builder
    Guide for creating Nushell plugins in Rust using nu_plugin and nu_protocol crates. Use when users want to build custom Nushell commands, extend Nushell with new functionality, create data transformations, or integrate external tools/APIs into Nushell. Covers project setup,…
  • 100nushell-usage
    Essential patterns, idioms, and gotchas for writing Nushell code. Use when writing Nushell scripts, functions, or working with Nushell's type system, pipelines, and data structures. Complements plugin development knowledge with practical usage patterns.
  • 100csv-pipeline
    Process, transform, analyze, and report on CSV and JSON data files. Use when the user needs to filter rows, join datasets, compute aggregates, convert formats, deduplicate, or generate summary reports from tabular data. Works with any CSV, TSV, or JSON Lines file.
  • 100data-processing
    Process JSON with jq and YAML/TOML with yq. Filter, transform, query structured data efficiently. Triggers on: parse JSON, extract from YAML, query config, Docker Compose, K8s manifests, GitHub Actions workflows, package.json, filter data.
  • 100celq
    Query, filter, transform, and inspect JSON5, YAML, TOML, XML, JSON, and NDJSON with celq and readable Common Expression Language (CEL) expressions. Use for multi-format configuration data, shell pipelines, typed external input, or when jq syntax would be harder for people to maintain.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.