Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

nushell

/nushell

Pomaga pisać idiomatyczne, funkcyjne skrypty w Nushell, w tym pliki .nu i kroki CI z shell: nu, oraz przenosić skrypty z basha i POSIX.

Repozytorium
dotfiles ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
6
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga pisać idiomatyczne, funkcyjne skrypty w Nushell, w tym pliki .nu i kroki CI z shell: nu, oraz przenosić skrypty z basha i POSIX.

Oryginalny opis (EN)

Write idiomatic, functional Nushell — the default language for shell scripts here. Use when writing or reviewing any new script, .nu files, `shell: nu {0}` CI steps, or when porting bash/POSIX shell to Nushell.

Jak działa

  1. Why Nushell
  2. Steps
  3. Docs
  4. Rules
  5. In this repo
Sekcje z nagłówków SKILL.md, w oryginale · 65 linii, 539 słów
Podgląd SKILL.md
---
name: nushell
description: 'Write idiomatic, functional Nushell — the default language for shell scripts here. Use when writing or reviewing any new script, .nu files, `shell: nu {0}` CI steps, or when porting bash/POSIX shell to Nushell.'
---

# Nushell

Nushell is a functional, structured-data language that happens to be a shell. Write it that way: pipelines of transformations over records and tables, not bash with different syntax.

## Why Nushell

Functional over structured data: JSON, `ls`, and command output stay records through the whole pipeline instead of being re-parsed as text. So no `jq`/`sed`/`awk`/`date` to install, wrap, or write twice for macOS and Linux — and Nix pins the interpreter.

Which language to pick for a given script is in the repo's `AGENTS.md`.

## Steps

1. Read the docs for the topic at hand (see below) before writing any Nushell.
2. Write the code functionally — see Rules.
3. Verify every construct against the installed version before claiming it works. Nushell breaks and renames things between minor releases, so do not trust memory of a command's signature:
   ```sh
   nu --version
   nu -c '<snippet>'          # run a snippet
   nu --ide-check 10 <file>   # parse/typecheck a script
   nu -c 'help <command>'     # check a signature
   ```
4. Format before committing:
   ```sh
   nufmt <file>             # rewrites in place
   nufmt --dry-run <file>   # non-zero exit if it would change
   ```

## Docs

Read before writing:

- https://www.nushell.sh/book/thinking_in_nu.html
- https://www.nushell.sh/book/nushell_map_functional.html
- https://www.nushell.sh/book/nushell_map_imperative.html
- https://www.nushell.sh/book/coming_to_nu.html
- https://www.nushell.sh/book/style_guide.html

Every page of the book is in the sidebar of those, as are `/commands/`, `/cookbook/`, and `/lang-guide/`. Follow the sidebar to whatever the task needs instead of guessing.

## Rules

Functional style is the default. In review, treat each of these as a defect to fix:

- **`mut` + `for` as an accumulator.** Replace with `reduce`, `each`, `where`, `group-by`, `zip`, `flatten`, `insert`/`update`, `generate`. `mut` is legitimate only for genuinely sequential state that no filter expresses.
- **String plumbing between steps.** Pass records and tables. Serialise once at the boundary (`to json --raw`), parse once on the way in (`from json`).
- **Nested `if`/`else` chains on a value's shape.** Use `match`, including list patterns (`[]`, `[$first, ..$rest]`) and guards.
- **Reimplementing a builtin.** Check `https://www.nushell.sh/commands/categories/filters.html` first.
- **Shelling out for data.** Prefer native commands over `^jq`, `^sed`, `^awk`, `^date`. When an external command is genuinely needed, pipe its output through `from json` etc. immediately.
- **Bare `each` for effects.** If the result is unused, say so with `| ignore`; if it produces values, keep them in the pipeline.

Also:

- Give every script a `def main`.
- Type custom command signatures — parameter types, `--flag`, and the return type. They document intent and are checked at parse time. `nufmt` strips a redundant `: any`; leave it stripped.
- Timestamps are `datetime`, durations are `duration`. Compare and subtract them directly instead of formatting to strings. Convert explicitly to UTC (`| date to-timezone UTC`) when the value crosses a boundary that expects it.
- Fail loudly with `error make` rather than returning a sentinel value.

## In this repo

- CI workflow steps run Nushell via `shell: nu {0}` with `hustcer/setup-nu`. See `.github/workflows/_update-flake-reusable.yaml` for the established style.
- Pin the interpreter. Workflows pass an explicit `version:` to `setup-nu`; keep doing that, or a Nushell release will break a script that never changed.
- Standalone scripts live alongside their consumer, e.g. `nix/packages/git-wtpr/git-wtpr.nu`.
- Neither `nu` nor `nufmt` is on the interactive PATH; use the `missing-tools` skill to reach them.

Wersje

RepozytoriumWynikLicencja
Ta strona · ryoppippi/dotfiles100MIT
hakula139/plugins100MIT
DaRacci/nix-config100MIT
vinnie357/claude-skills100MIT

Migawka bazy z 13.11.2026 · wersja paczki c3a2cc41a673 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100nushell-usage
    Opisuje podstawowe wzorce, idiomy i pułapki pisania kodu w Nushell: skrypty, funkcje, system typów, potoki i struktury danych.
  • 100nushell-plugin-builder
    Prowadzi przez tworzenie wtyczek Nushell w Rust z crate'ami nu_plugin i nu_protocol: konfiguracja projektu, polecenia, strumieniowanie danych, własne wartości i testy.
  • 100koopa-nushell
    Opisuje pułapki Nushella, ograniczenia czasu parsowania i architekturę aktywacji koopa: pisanie i debugowanie plików .nu, narzędzia promptu (starship, zoxide) i przenoszenie logiki z bash, zsh lub fish.
  • 100shell-expert
    Wspiera skrypty powłoki w bash, zsh i POSIX, narzędzia CLI i automatyzację międzyplatformową, w tym potoki i przenośny kod powłoki.
  • 100gum-nushell
    Pomaga używać Gum w skryptach Nushell do budowy interaktywnych przepływów CLI i TUI, w tym obsługi potoków, list, wielokrotnego wyboru, kodów wyjścia i anulowania.
  • 100shell-portability
    Pomaga pisać skrypty powłoki działające w różnych systemach i powłokach, uwzględniając zgodność z POSIX i różnice między platformami.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.