Write idiomatic, performant, secure, and maintainable Nushell scripts. This skill enforces Nushell conventions, catches security issues, and helps avoid common pitfalls.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionnushell-proExecute the skills CLI command in your project's root directory to begin installation:
Fetches nushell-pro from hustcer/nushell-pro and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate nushell-pro. Access via /nushell-pro in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
3
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
3
stars
Write idiomatic, performant, secure, and maintainable Nushell scripts. This skill enforces Nushell conventions, catches security issues, and helps avoid common pitfalls.
let by default; only use mut when functional alternatives don't applysource/use require parse-time constantsecho or returndef --env when caller-side changes are neededpar-each parallelizationPipeline input ($in) is NOT interchangeable with function parameters!
# WRONG — treats pipeline data as first parameter
def my-func [items: list, value: any] {
$items | append $value
}
# CORRECT — declares pipeline signature
def my-func [value: any]: list -> list {
$in | append $value
}
# Usage
[1 2 3] | my-func 4 # Works correctly
Why this matters:
$list | func arg vs func $list argdef func [x: int] { ... } # params only
def func []: string -> int { ... } # pipeline only
def func [x: int]: string -> int { ... } # both pipeline and params
def func []: [list -> list, string -> list] { ... } # multiple I/O types
| Entity | Convention | Example |
|---|---|---|
| Commands | kebab-case |
fetch-user, build-all |
| Subcommands | kebab-case |
"str my-cmd", date list-timezone |
| Flags | kebab-case |
--all-caps, --output-dir |
| Variables/Params | snake_case |
$user_id, $file_path |
| Environment vars | SCREAMING_SNAKE_CASE |
$env.APP_VERSION |
| Constants | snake_case |
const max_retries = 3 |
url ok, usr not ok)--all-caps -> $all_caps[1 2 3] | each {|x| $x * 2 }
{name: 'Alice', age: 30}
[1 2 3 4] | each {|x|
$x * 2
}
[
{name: 'Alice', age: 30}
{name: 'Bob', age: 25}
]
||params| in closures: {|x| ...} not { |x| ...}: in records: {x: 1} not {x:1}[1 2 3] not [1, 2, 3], when used (closure params, etc.)# Fully typed with I/O signature
def add-prefix [text: string, --prefix (-p): string = 'INFO']: nothing -> string {
$'($prefix): ($text)'
}
# Multiple I/O signatures
def to-list []: [
list -> list
string -> list
] {
# implementation
}
# Fetch user data from the API
#
# Retrieves user information by ID and returns
# a structured record with all available fields.
@example 'Fetch user by ID' { fetch-user 42 }
@category 'network'
def fetch-user [
id: int # The user's unique identifier
--verbose (-v) # Show detailed request info
]: nothing -> record {
# implementation
}
--output (-o): stringdef greet [name: string = 'World']? for optional positional params: def greet [name?: string]def multi-greet [...names: string]def --wrapped to wrap external commands and forward unknown flagsdef --env setup-project [] {
cd project-dir
$env.PROJECT_ROOT = (pwd)
}
{name: 'Alice', age: 30} # Create record
$rec1 | merge $rec2 # Merge (right-biased)
[$r1 $r2 $r3] | into record # Merge many records
$rec | update name {|r| $'Dr. ($r.name)' } # Update field
$rec | insert active true # Insert field
$rec | upsert count {|r| ($r.count? | default 0) + 1 } # Update or insert
$rec | reject password secret_key # Remove fields
$rec | select name age email # Keep only these fields
$rec | items {|k, v| $'($k): ($v)' } # Iterate key-value pairs
$rec | transpose key val # Convert to table
$table | where age > 25 # Filter rows
$table | insert retired {|row| $row.age > 65 } # Add column
$table | rename -c {age: years} # Rename column
$table | group-by status --to-table # Group by field
$table | transpose name data # Transpose rows/columns
$table | join $other_table user_id # Inner join
$table | join --left $other user_id # Left join
$list | enumerate | where {|e| $e.index > 5 } # Filter with index
$list | reduce --fold 0 {|it, acc| $acc + $it } # Accumulate
$list | window 3 # Sliding window
$list | chunks 100 # Process in batches
$list | flatten # Flatten nested lists
$record.field? # Returns null if missing (no error)
$record.field? | default 'N/A' # Provide fallback
if ($record.field? != null) { } # Check existence
$list | default -e $fallback # Default for empty collections
# Bad — imperative with mutable variable
mut total = 0
for item in $items { $total += $item.price }
# Good — functional pipeline
$items | get price | math sum
# Bad — mutable counter
mut i = 0
for file in (ls) { print $'($i): ($file.name)'; $i += 1 }
# Good — enumerate
ls | enumerate | each {|it| $'($it.index): ($it.item.name)' }
# each: transform each element
$list | each {|item| $item * 2 }
# each --flatten: stream outputs (turns list<list<T>> into list<T>)
ls *.txt | each --flatten {|f| open $f.name | lines } | find 'TODO'
# each --keep-empty: preserve null results
[1 2 3] | each --keep-empty {|e| if $e == 2 { 'found' } }
# par-each: parallel processing (I/O or CPU-bound)
$urls | par-each {|url| http get $url }
$urls | par-each --threads 4 {|url| http get $url }
# reduce: accumulate (first element is initial acc if no --fold)
[1 2 3 4] | reduce {|it, acc| $acc + $it }
# generate: create values from arbitrary sources without mut
generate {|state| { out: ($state * 2), next: ($state + 1) } } 1 | first 5
# Row conditions — short-hand syntax, auto-expands $it
ls | where type == file # Simple and readable
$table | where size > 100 # Expands to: $it.size > 100
# Closures — full flexibility, can be stored and reused
let big_files = {|row| $row.size > 1mb }
ls | where $big_files
$list | where {$in > 10} # Use $in or parameter
Use row conditions for simple field comparisons; use closures for complex logic or reusable conditions.
def double-all []: list<int> -> list<int> {
$in | each {|x| $x * 2 }
}
# Capture $in early when needed later (it's consumed on first use)
def process []: table -> table {
let input = $in
let count = $input | length
$input | first ($count // 2)
}
let config = (open config.toml)
let names = $config.users | get name
# Acceptable — mut when no functional alternative
mut retries = 0
loop {
if (try-connect) { break }
$retries += 1
if $retries >= 3 { error make {msg: 'Connection failed'} }
sleep 1sec
}
const lib_path = 'src/lib.nu'
source $lib_path # Works: const is resolved at parse time
let lib_path = 'src/lib.nu'
source $lib_path # Error: let is runtime only
mut count = 0
ls | each {|f| $count += 1 } # Error! Closures can't capture mut
# Solutions:
ls | length # Use built-in commands
[1 2 3] | reduce {|x, acc| $acc + $x } # Use reduce
for f in (ls) { $count += 1 } # Use a loop if mutation truly needed
Refer to String Formats Reference for the full priority and rules.
Quick summary (high to low priority):
[foo bar baz]r#'(?:pattern)'#'simple string'$'Hello, ($name)!'"line1\nline2"$"tab:\t($value)\n" (only with escapes)my-module/
├── mod.nu # Module entry point
├── utils.nu # Submodule
└── tests/
└── mod.nu # Test module
export definitions are public; non-exported are privateexport def main when command name matches module nameexport use submodule.nu * to re-export submodule commandsexport-env for environment setup blocks#!/usr/bin/env nu
# Build the project
def "main build" [--release (-r)] {
print 'Building...'
}
# Run tests
def "main test" [--verbose (-v)] {
print 'Testing...'
}
def main [] {
print 'Usage: script.nu <build|test>'
}
For stdin access in shebang scripts: #!/usr/bin/env -S nu --stdin
def validate-age [age: int] {
if $age < 0 or $age > 150 {
error make {
msg: 'Invalid age value'
label: {
text: $'Age must be between 0 and 150, got ($age)'
span: (metadata $age).span
}
}
}
$age
}
let result = try {
http get $url
} catch {|err|
print -e $'Request failed: ($err.msg)'
null
}
# Use complete for detailed external command error info
let result = (^some-external-cmd | complete)
if $result.exit_code != 0 {
print -e $'Error: ($result.stderr)'
}
do -ido -i (ignore errors) runs a closure and suppresses any errors, returning null on failure. do -c (capture errors) catches errors and returns them as values.
# Ignore errors — returns null if the closure fails
do -i { rm non_existent_file }
# Use as a concise fallback
let val = (do -i { open config.toml | get setting } | default 'fallback')
# Capture errors as values (instead of aborting the pipeline)
let result = (do -c { ^some-cmd })
When to use each approach:
do -i — Fire-and-forget, or when you only need a default on failuredo -c — Catch errors as values to abort downstream pipeline on failuretry/catch — When you need to inspect or log the errorcomplete — When you need exit code + stdout + stderr from external commandsuse std/assert
for t in [[input expected]; [0 0] [1 1] [2 1] [5 5]] {
assert equal (fib $t.input) $t.expected
}
def "assert even" [number: int] {
assert ($number mod 2 == 0) --error-label {
text: $'($number) is not an even number'
span: (metadata $number).span
}
}
$value | describe # Inspect type
$data | each {|x| print $x; $x } # Print intermediate values (pass-through)
timeit { expensive-command } # Measure execution time
metadata $value # Inspect span and other metadata
Refer to Security Reference for the full guide.
Nushell is safer than Bash by design (no eval, arguments passed as arrays not through shell), but security risks remain.
# DANGEROUS — arbitrary code execution
^nu -c $user_input
source $user_provided_file
# DANGEROUS — shell interprets the string
^sh -c $'echo ($user_input)'
^bash -c $user_input
# Bad — constructing command strings
let cmd = $'ls ($user_path)'
^sh -c $cmd
# Good — pass arguments directly (no shell interpretation)
^ls $user_path
✓Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
✓Save 3-5 hours/week on communication overhead
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
- 1Install product management skill
- 2Start with user story generation for known feature
- 3Progress to competitive analysis: research 2-3 competitors
- 4Use for roadmap prioritization: apply RICE/ICE scoring
- 5Draft stakeholder communications and refine based on feedback
- 6Build template library for recurring PM tasks
- 7Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Related Skills
grill-me
704mattpocock/skills
Productivitysame categorypremortem
218parcadei/continuous-claude-v3
Productivitysame categorydeslop
164cursor/plugins
Productivitysame categorytravel-planner
145ailabs-393/ai-labs-claude-skills
Productivitysame categorynutritional-specialist
141ailabs-393/ai-labs-claude-skills
Productivitysame categoryframer-motion
140pproenca/dot-skills
Productivitysame categoryReviews
4.6★★★★★66 reviews- GGanesh Mohane★★★★★Dec 28, 2024
nushell-pro fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- SSoo Sanchez★★★★★Dec 28, 2024
nushell-pro is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- NNoor Bhatia★★★★★Dec 20, 2024
nushell-pro fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- SSofia Smith★★★★★Dec 16, 2024
I recommend nushell-pro for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- NNoor Desai★★★★★Dec 12, 2024
Useful defaults in nushell-pro — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- YYash Thakker★★★★★Nov 27, 2024
nushell-pro has been reliable in day-to-day use. Documentation quality is above average for community skills.
- SSakshi Patil★★★★★Nov 19, 2024
Registry listing for nushell-pro matched our evaluation — installs cleanly and behaves as described in the markdown.
- SSoo Ndlovu★★★★★Nov 19, 2024
Useful defaults in nushell-pro — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- NNoor Khan★★★★★Nov 11, 2024
Registry listing for nushell-pro matched our evaluation — installs cleanly and behaves as described in the markdown.
- AAanya Perez★★★★★Nov 7, 2024
Keeps context tight: nushell-pro is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 66
1 / 7Discussion
Comments — not star reviews- No comments yet — start the thread.