{
  "markdown": "# nushell-pro\n\nNushell best practices, security hardening, and code review skill for Agents.\n\nWrite idiomatic, performant, secure, and maintainable [Nushell](https://www.nushell.sh/) scripts — with built-in code review, anti-pattern detection, and Bash-to-Nushell conversion.\n\n## Features\n\n- **Best Practices** — Naming conventions, type annotations, I/O signatures, functional pipeline style, string format priority, and formatting rules\n- **Security Hardening** — Injection prevention, path traversal protection, credential scoping, safe file/temp operations, environment sanitization\n- **Stable CLI Tests** — PTY-width-independent assertions for nested Nushell diagnostics\n- **IDE Diagnostics** — JSONL-aware `nu --ide-check` validation that catches errors even when the process exits successfully\n- **Daemon & E2E Smoke Tests** — Deadline-based readiness checks, isolated state, tracked jobs/PIDs, and guaranteed cleanup\n- **Evidence-Driven Code Review** — Version-aware findings with concrete triggers, impact, reproduction evidence, precise locations, and severity\n- **Anti-Pattern Detection** — 35 common mistakes with idiomatic fixes\n- **Type System** — Type hierarchy, complex types, type guards, null safety patterns\n- **Nu 0.114 Support** — Stricter type checking, explicit submodule imports, `run`, POSIX `--`, SemVer, spreadsheet import changes, and updated diagnostics\n- **Nu 0.115 Support** — YAML 1.2 contracts, `external_arg`, row conditions, binary filesize slicing, SemVer comparisons, null grouping, test migrations, and reproduction-verified workarounds for known 0.115.0 defects\n- **Bash Conversion** — Side-by-side Bash-to-Nushell translation guide\n- **Performance** — Parallel processing with `par-each`, streaming patterns, memory-efficient techniques\n- **Data Processing** — Polars dataframes (lazy/eager), group-by, joins, window/sequence ops, nested list/struct data, reshaping, binning, time zones, SQL, column selectors, and large-data / columnar analytics\n\n## Install\n\n```bash\n# Install by npx skills\nnpx skills add hustcer/nushell-pro\n# OR Install for Claude by claude cli\nclaude skill add --name nushell-pro hustcer/nushell-pro\n```\n\nOr clone manually into a skills-compatible runtime directory:\n\n```bash\ngit clone https://github.com/hustcer/nushell-pro.git /path/to/skills/nushell-pro\n```\n\n## Structure\n\n```\nnushell-pro/\n├── SKILL.md                             # Main skill (core rules, always loaded)\n├── tests/\n│   ├── validation-and-daemon-smoke.nu   # Executable IDE/job lifecycle regression test\n│   └── nu-0.115-smoke.nu                # Executable 0.115 command/migration regression test\n└── references/\n    ├── nu-0.114-migration.md            # Version migration and compatibility checklist\n    ├── nu-0.115-migration.md            # YAML, CLI, command, and review changes\n    ├── security.md                      # Threat model, safe patterns, Windows risks\n    ├── script-review.md                 # Review method + 5-category checklist\n    ├── anti-patterns.md                 # 35 anti-patterns with fixes\n    ├── data-and-types.md                # Type system, collections, conversions\n    ├── dataframes.md                    # Polars dataframes: lazy/eager, group-by, joins, large data\n    ├── advanced-patterns.md             # Streaming, closures, parallel, debugging\n    ├── modules-and-scripts.md           # Modules, exports, testing, attributes\n    ├── daemon-and-e2e-smoke-tests.md    # Background jobs, readiness, isolation, cleanup\n    ├── string-formats.md                # String type priority and rules\n    └── bash-to-nushell.md               # Bash/POSIX conversion guide\n```\n\n`SKILL.md` is always loaded into context. Reference files are loaded on demand when the task requires deeper knowledge on a specific topic.\n\n## What It Covers\n\n### Core Principles\n\n1. Think in pipelines — data flows through functional transformations\n2. Immutability first — `let` by default, `mut` only when necessary\n3. Structured data — tables, records, and lists over string parsing\n4. Static parsing — `source`/`use` require parse-time constants\n5. Implicit return — last expression is the return value\n6. Scoped environment — `def --env` when caller-side changes are needed\n7. Type safety — annotate parameters and I/O signatures\n8. Prefer `match` for branching — avoid long `if`/`else if` chains when dispatching on one value\n9. Parallel ready — immutable code enables easy `par-each`\n\n### Security Model\n\nNushell is safer than Bash by design (no `eval`, arguments passed as arrays), but risks remain:\n\n| Risk Level | Threats                                                           |\n| ---------- | ----------------------------------------------------------------- |\n| Critical   | Code injection via `nu -c`, `^sh -c`, plugin injection            |\n| High       | Path traversal, credential leaks, PATH hijacking, glob injection  |\n| Medium     | TOCTOU races, temp file races, unhandled errors, config tampering |\n\n### Script Review\n\nThe skill includes a version-aware review method plus a 5-category checklist:\n\n1. **Security** (critical) — injection, paths, credentials, destructive ops\n2. **Correctness** — types, errors, null safety, logic\n3. **Style** — naming, strings, formatting, documentation\n4. **Performance** — parallelism, streaming, caching\n5. **Robustness** — input validation, file safety, process management\n\n## Validation\n\n```bash\nnu --no-config-file --ide-check 100 tests/validation-and-daemon-smoke.nu\nnu --no-config-file tests/validation-and-daemon-smoke.nu\nnu --no-config-file --ide-check 100 tests/nu-0.115-smoke.nu\nnu --no-config-file tests/nu-0.115-smoke.nu\n```\n\nThe executable smoke tests cover JSONL IDE diagnostics, controlled job/process\ncleanup, YAML 1.2 boundaries, high-frequency 0.115 commands, null grouping,\nSemVer edge cases, and raw script CLI arguments. They also lock two Nu 0.115.0\ndefects — `to yaml --non-roundtrip 'lossy'` being rejected, and a nested\n`finally` being skipped — so the guidance is retracted as soon as a patched Nu\nmakes those assertions fail.\n\n## License\n\nMIT\n",
  "bytes": 6072,
  "sha": "34829696a0ef0494d7caa3587894bd90d3639c623684094f1e79a7a87eedd783",
  "repo_slug": "hustcer/nushell-pro",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_hustcer_nushell_pro_nushell_pro_d957f4ae/readme"
}