|
Nushell Pro — Best Practices & Security Skill Write idiomatic, performant, secure, and maintainable Nushell scripts. This skill enforces Nushell conventions, catches security issues, and helps avoid common pitfalls. Core Principles Think in pipelines — Data flows through pipelines; prefer functional transformations over imperative loops Immutability first — Use let by default; only use mut when functional alternatives don't apply Structured data — Nushell works with tables, records, and lists natively; leverage structured data over string parsing Static parsing — All code is parsed before execution; source/use require parse-time constants Implicit return — The last expression's value is the return value; no need for echo or return Scoped environment — Environment changes are local to their block; use def --env when caller-side changes are needed Type safety — Annotate parameter types and input/output signatures for better error detection and documentation Parallel ready — Immutable code enables easy par-each parallelization Critical: Pipeline Input vs Parameters Pipeline input ($in) is NOT interchangeable with function parameters!
don't have the plugin yet? install it then click "run inline in claude" again.