Claude Code and Nushell | Workarounds for Launch Errors and Using Skills

AI Chat Article Summarypowered by Claude

Nushell, a next-generation shell written in Rust, has been gaining traction among engineers for its unique approach of handling structured data rather than plain text. However, attempts to run Claude Code in a Nushell environment have been reported to cause launch errors. This article covers the compatibility issues between Claude Code and Nushell, how to work around them, and how to use Claude Code Skills to streamline Nushell script development.

結論powered by Claude
Nushell, a next-generation shell written in Rust, has been gaining traction among engineers for its unique approach of handling structured data rather than plain text. However, attempts to run Claude Code in a Nushell environment have been reported to cause launch errors. This article covers the compatibility issues between Claude Code and Nushell, how to work around them, and how to use Claude Code Skills to streamline Nushell script development.
目次 (8)

What Is Nushell — A Rust-Based Structured Shell

Nushell (nu) is a cross-platform modern shell written in Rust. While traditional shells (Bash/Zsh/Fish) treat command output as plain text, Nushell's defining feature is that it handles data as structured types — tables, lists, and records.

# Sort the process list by CPU usage in Nushell
ps | sort-by cpu | last 5

As shown above, data passed through pipes becomes a typed table, and commands like sort-by, where, and select allow filtering and transformation intuitively. Nushell supports Windows, macOS, and Linux, and can be installed from the official site (https://www.nushell.sh/).

Compatibility Issues Between Claude Code and Nushell

In 2026, reports emerged of crashes when trying to launch Claude Code on top of Nushell. The GitHub repository anthropics/claude-code documents this as Issue #2732, "Can't launch when using nushell," with reproduction confirmed on macOS 15.5 + Claude Code v1.0.35.

(https://github.com/anthropics/claude-code/issues/2732)

The root cause is that Claude Code's internal processing assumes Bash/Zsh syntax and is incompatible with Nushell's custom command system. Because Nushell's command parsing approach differs significantly from traditional shells, errors occur when Claude Code tries to execute its startup scripts.

Workarounds for the Launch Error

Even if you use Nushell as your default shell, you can still use Claude Code via one of the following approaches.

  1. Launch from Bash — Run bash in your terminal to start a Bash session, then call the claude command from there. This is the simplest method.

  2. Override SHELL with an environment variable — Add the following to your Nushell config file (~/.config/nushell/env.nu) so that Bash is used only when Claude Code launches.

    $env.SHELL = "/bin/bash"
    
  3. Wrap with an alias — Define an alias like the one below in your Nushell config to invoke Claude Code via Bash internally.

    alias claude = bash -c "claude $in"
    
  4. Use tmux / screen — Launch a Bash session inside tmux and keep Claude Code running there. Using a terminal multiplexer lets you switch between environments seamlessly.

All of these approaches let you retain Nushell's interactive environment while still accessing the full feature set of Claude Code. Anthropic is aware of the issue, and official support in a future version is anticipated.

What Are Claude Code Skills for Nushell?

Claude Code has an extension system called "Skills" that lets you grant Claude Code knowledge about specific domains. Several Nushell-focused Skills are publicly available, and they can significantly boost the efficiency of Nushell script development.

MCP Market (https://mcpmarket.com/tools/skills/nushell-master) offers the following Skills:

  • Nushell for Claude Code (nushell-master) — Makes Claude Code behave as a Nushell expert. It can provide completions and generate code with deep familiarity with Nushell-specific syntax, including pipeline design, the type system, and custom command definitions.
  • Nushell Fundamentals (https://mcpmarket.com/tools/skills/nushell-fundamentals) — Focused on foundational Nushell scripting. Covers everything from beginner topics like environment variable handling, file operations, and data transformation in a systematic way.

Claude Marketplaces (https://claudemarketplaces.com/skills/hustcer/nushell-pro/nushell-pro) also lists the Nushell Pro Skill, which boasts 571 installs and a 5-star rating.

Installing and Enabling a Nushell Skill

The steps to install a Claude Code Skill are as follows:

  1. Open your Claude Code settings file (.claude/settings.json).
  2. Add the target Skill's path or identifier to the skills section.
  3. Restart Claude Code and confirm the Skill is active.

Once a Skill is enabled, Claude Code generates code with awareness of Nushell's syntax, idioms, and best practices. It can accurately handle Nushell-specific constructs such as for i in 0..10 loop syntax (different from Bash) and |> table pipelines.

Practical Example: Writing Nushell Scripts with Claude

Even without a Skill, you can ask Claude (claude.ai) to generate Nushell code. Simply specifying "write this in Nushell" in your prompt will return Nu syntax instead of Bash.

For example, if you ask "Write a Nushell script that sorts .log files in a directory by date and deletes them in order from oldest to newest," you might get output like this:

# Sort .log files by modified date and delete from oldest
ls *.log
| sort-by modified
| each { |f| rm $f.name; print $"Deleted: ($f.name)" }

Compared to Bash's find ... -exec rm, the pipeline is intuitive and easy to read. Claude understands this flow of structured data and can generate type-safe code.

Use Case Scenarios for Nushell + Claude

Here are some situations where combining Claude with Nushell proves effective:

  • Log analysis — Combining Nushell's open, where, and group-by with Claude's analytical capabilities lets you quickly generate aggregation scripts for structured logs.
  • CI/CD script migration — When rewriting existing Bash scripts in Nushell, simply asking Claude to "convert this script to Nushell" automates the bulk of the work.
  • Data transformation pipelines — Write CSV/JSON/YAML transformation logic using Nushell's native type system, with Claude assisting in pipeline design.
  • Development environment automation — Implement project setup and dependency checks as Nu scripts, with Claude handling bug fixes and feature additions.

Summary

While Claude Code and Nushell currently have launch compatibility issues, the workaround of launching via Bash makes it practically usable. Using Nushell-focused Claude Code Skills packages significantly improves the accuracy of Nu script generation. Even without a Skill, explicitly stating "in Nushell" on claude.ai lets you get Nu syntax code that leverages structured data. As Nushell adoption grows, official support from Anthropic is also anticipated.

参考になったら ♡
Clauder Navi 編集部
@clauder_navi

Anthropic の Claude / Claude Code を中心に、日本のエンジニア向けに最新動向と実務 を毎日発信。 運営方針 は メディアについて をご覧ください。