Agent skill

Niubash

by unixwin in unixwin/niubash

Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell.

MITAuto-check passedDevelopment

Install Niubash

skills CLI
$ npx skills add unixwin/niubash --skill niubash -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install unixwin/niubash niubash --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/unixwin/niubash.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/niubash .claude/skills/niubash && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
niubash
GitHub stars
163
Token cost
~2.1k tokens
SKILL.md length
1,001 words
Files
6 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell.

  • The active shell is Niubash (the niu prompt)
  • SKILL.md covers Identity — a bash dialect, not…, Core rules, Capability surface and Common pitfalls, plus 3 more sections
  • Calls ssh and rg
  • Editing ~/.niubashrc

What it does

Niubash is an agent skill from unixwin/niubash. Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell. Use when the active shell is Niubash (the niu prompt), when editing ~/.niubashrc or oh-my-niu plugins, when installing Unix commands with wpm, or for any Windows task where bash syntax should run natively — no PowerShell, WSL, Git Bash, or MSYS involved, and no path-conversion environment variables required.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `agents/openai.yaml`, `references/paths.md` and `references/prompt-plugins.md`).

It sits in Development, covering Secrets management. It works with Bash, PowerShell, Git and Rust. The repository describes itself as: AI-native bash for humans and AI agents: real bash syntax, Unix commands, native Windows/Linux/macOS builds, direct execution of Windows binaries. No WSL, no emulation. The licence is MIT.

When your agent uses it

  • The active shell is Niubash (the niu prompt)
  • Editing ~/.niubashrc
  • Oh-my-niu plugins
  • Installing Unix commands with wpm

Example prompts

  • “/niubash”

What it can do on your machine

Read from SKILL.md and the folder at commit 66ff6ab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ssh
    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Niubash loads about 2.1k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 1,001 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from unixwin/niubash at commit 66ff6ab, republished under its MIT licence (© unixwin). 1,001 words, ~2,120 tokens.

Download SKILL.mdSave it as .claude/skills/niubash/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
niubash
description
Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell. Use when the active shell is Niubash (the `niu` prompt), when editing ~/.niubashrc or oh-my-niu plugins, when installing Unix commands with wpm, or for any Windows task where bash syntax should run natively — no PowerShell, WSL, Git Bash, or MSYS involved, and no path-conversion environment variables required.

Niubash

Identity — a bash dialect, not a POSIX machine

Niubash is bash implemented natively in Rust for Windows: the language engine (rubash) is a from-scratch Bash interpreter gated on GNU Bash's own upstream test suite — 83/83 full suites byte-identical to GNU output (measured 2026-09-21, ledger in rubash's docs/COMPATIBILITY-STATUS.md). What it is not matters as much:

  • No POSIX emulation layer. No cygwin1.dll/msys-2.0.dll, no fork, no POSIX signal delivery, no PTY emulation — job control and terminal handling ride on Win32/ConPTY. Interactive fullscreen TUI programs built for a POSIX pty (and pty-only tools like script/ssh -t) are the known rough edge, not path or quoting behavior.
  • No MSYS path rules. The Windows-native path is the first-class internal representation; /c/..., /mnt/c/..., /usr/bin, /tmp are input dialects that resolve to real Windows locations. There is no conversion heuristic to misfire, so MSYS_NO_PATHCONV-style variables do not exist here and are never needed. Full contract: references/paths.md.
  • Verbatim argv at the boundary ("Option B"): the bundled bash.exe / sh.exe forwarders pass the command line through to niu.exe untouched — no re-quoting, no path rewriting at the shim. What a child process receives is always a native Windows path when the argument is a shell path; literal data arguments (printf '%s\n' /tmp/x) are never rewritten (GNU bash behavior).
  • No bundler downloads. Plugin sources arrive by git clone only; fonts and CLI tools are package-manager recommendations. wpm/WinuxCmd is the separate command-layer package manager.

Core rules

  • The current session already is Niubash. Run commands directly; do not nest niu -c, and do not route work through pwsh, powershell, cmd /c, wsl, or bash wrappers.
  • Write bash syntax normally: functions, arrays, $(...), pipes, heredocs, globs. For deep bash-isms (coproc, exotic redirects, mapfile edge cases, compgen/complete), test the exact form in-session before relying on it — then trust the measured floor.
  • Discover, don't assume. Before using a tool: command -v <tool>. For the installation as a whole: niu doctor. For the command runtime: winuxcmd --version. For installed packages: wpm installed.
  • A Unix command is missing? Install it with wpm install <name> — see references/wpm.md.

Capability surface

<!-- BEGIN GENERATED:capability-snapshot -->
  • 77 shell built-ins & reserved words — the GNU bash 5.3 shell_builtins[] table (alias, cd, declare, printf, set, trap, if/while/case, ...); every one documents itself via help <name>.
  • 180 winuxcmd applets on PATH (ls, grep, sed, awk, find, tar, top, xxd, ...) — real Windows binaries, not emulated inside the shell; full inventory in references/quickref.md.
  • Launcher verbs — setup, font, doctor, plugin, skill, --self-update; table in references/quickref.md.
  • Plugin system — git-clone-only external sources (oh-my-bash, bash-it, bpkg) behind an explicit trust gate, driven by a declarative spec (~/.niubash/plugins.toml) with lockfile verbs (add/list/enable/disable/trust/sync/update/restore/rollback/clean/source/recipe/distro/mirror/ui).
  • TUI surfaces — niu setup wizard (theme/prompt/tools), niu plugin ui menu, theme gallery, niu font picker; all non-interactive-friendly and safe to skip (-c loads none of them).
  • Bundle version: niubash 1.3.4 (generated; see scripts/generate-skill.py).
<!-- END GENERATED:capability-snapshot -->

Shell built-ins (the generated list below is the engine's own GNU bash 5.3 shell_builtins[] table — reserved words included):

<!-- BEGIN GENERATED:builtin-names -->

! % (( ... )) . : [ [[ ... ]] alias bg bind break builtin caller case cd command compgen complete compopt continue coproc declare dirs disown echo enable eval exec exit export false fc fg for for (( function getopts hash help history if jobs kill let local logout mapfile popd printf pushd pwd read readarray readonly return select set shift shopt source suspend test time times trap true type typeset ulimit umask unalias unset until variables wait while { ... }

<!-- END GENERATED:builtin-names -->

Every built-in documents itself: help <name> (help -s '*' for the one line per command). Launcher verbs and the plugin verb table: references/quickref.md.

Show full SKILL.md (437 more words)Show less

Common pitfalls

  • Path forms. Native C:/Users/me (or C:\Users\me) is always safe and is what Windows executables should receive. /tmp is the real Windows temp directory, never the install tree; /usr/bin is the WinuxCmd install root, not a POSIX root; ~ = USERPROFILE. Details and the MSYS contrast table: references/paths.md.
  • Theme system. The interactive prompt is configured by ~/.niubashrc (NIU_THEME, NIU_PLUGINS=(...) packs) and niu setup; icon themes need a Nerd Font (niu font). Don't invent theme or pack names — check references/prompt-plugins.md, and never edit files inside the installed bundle directory (user plugins live in ~/.niubash/custom).
  • Startup flow. Interactive start sources ~/.niubashrc, which loads the oh-my-niu bundle and ends in a guarded plugin sync --bootstrap block (idempotent, keyed on "${NIU_SHELL:-niu}"). niu -c and script runs load no rc and no plugins by design — quiet and deterministic. Non-interactive init: NIU_ENV=<file> (or bash-compatible BASH_ENV, lower precedence) is sourced once before the command.
  • When NIU_SHELL matters. Niubash exports it (its own executable path) in every process it starts; the bash/sh forwarder shims and the rc bootstrap resolve the shell through it. When sourcing ~/.niubashrc from a foreign shell, the guarded block is safe only because of that fallback chain — don't "simplify" it to a bare niu.

Decision guidance — niu vs cmd vs powershell

TaskUse
Anything with bash syntax (loops, pipes, substitution, globs, scripts)niu — directly in-session
Running Windows-native programs (git.exe, node.exe, cargo.exe)niu — your PATH is your PATH, no conversion step
cmd-specific quirks (batch files needing cmd semantics, reg legacy forms)cmd /c ... from niu, but prefer native equivalents
.NET/COM, Windows management, registry scripting, remotingpowershell — call it from niu when needed
Linux-only tooling, systemd, Linux binariesWSL — niubash does not emulate Linux
POSIX-pty interactive programs (expect/tmux-style)Windows-native equivalents; no pty emulation here

Rule of thumb: if the task is "run a Unix command or a bash script on Windows", that is exactly this shell. Reach for another shell only for its own native APIs, never as a compatibility detour.

Validation

  • Verify in-session: run the snippet directly (or source a temporary file) before editing rc files; then confirm with command -v, alias, or test -f C:/path.
  • Validate installs with direct calls: rg --version, wpm links list.
  • On a bash-semantics divergence: fall back to a simpler POSIX form, then report the gap upstream to unixwin/rubash. Do not carry host-side workarounds.
  • Reserve niu -c "..." for when an external host must launch Niubash non-interactively: quiet, deterministic, exit codes propagate exactly.

References

  • references/quickref.md — generated command tables: launcher verbs, plugin verbs, full built-in table, winuxcmd applet inventory.
  • references/paths.md — the path contract and the MSYS contrast.
  • references/prompt-plugins.md — rc contract, themes, oh-my-niu packs.
  • references/wpm.md — package discovery, links repair, index flows.

© unixwin, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/niubash of unixwin/niubash.

  • SKILL.md
  • agents/openai.yaml
  • references/paths.md
  • references/prompt-plugins.md
  • references/quickref.md
  • references/wpm.md

Open the folder on GitHubat commit 66ff6ab

Compare with similar skills

Niubash next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Niubash compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Niubash this skillunixwin/niubash163—~2.1kAutomated safety check: PassMIT
Gridbash Panesjasonsuhari/gridbash134—~1.5kAutomated safety check: PassMIT
Lade Releasezifeo/lade134—~749Automated safety check: PassMPL-2.0
Oh My PoshJanDeDobbeleer/oh-my-posh24k—~319Automated safety check: PassMIT
Speckit Git Initializekunstmusik/blue1546 repos~438Automated safety check: PassGPL-3.0
Tapd Iteration InitTencentBlueKing/bk-bcs840—~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Gridbash Panes

    jasonsuhari/gridbash

    Coordinate with sibling agent panes from inside a GridBash grid — list panes and their roles, read what a pane is currently doing, prompt one pane or every other pane, and rename pane titles so the…

    134 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Lade Release

    zifeo/lade

    Prepare a Lade release: update CHANGELOG.md and bump crate versions with cargo set-version.

    134 GitHub stars~749 tokensUpdated today
    DevelopmentAuto-check passed
  • Oh My Posh

    JanDeDobbeleer/oh-my-posh

    Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.

    24k GitHub stars~319 tokensUpdated today
    DevelopmentAuto-check passed
  • Speckit Git Initialize

    kunstmusik/blue

    Initialize a Git repository with an initial commit. An agent skill from kunstmusik/blue.

    154 GitHub starsUsed in 6 repos~438 tokens
    DevelopmentAuto-check passed
  • Tapd Iteration Init

    TencentBlueKing/bk-bcs

    迭代执行流水线启动器。分三个阶段执行:信息检查(验证 git 环境、获取迭代信息、 解析迭代分支)→ 恢复检测(已有状态文件时判定恢复策略)→ 新流程初始化(创建分支、 迭代目录和 iteration-state.json)。

    840 GitHub stars~1.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Rtk Skill

    sopaco/deepwiki-rs

    A skill your agent uses when running shell commands that produce verbose output (git, test, build, lint, package managers, docker).

    3.1k GitHub stars~1.4k tokensUpdated 26 days ago
    DevOps & CloudAuto-check passed

Categories

Questions about Niubash

What does Niubash do?

Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell. Niubash is an agent skill from unixwin/niubash. Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell.

When should I use Niubash?

Niubash fits situations like: the active shell is Niubash (the niu prompt); editing ~/.niubashrc; oh-my-niu plugins; installing Unix commands with wpm.

How do I install Niubash in Claude Code?

Run `npx skills add unixwin/niubash --skill niubash -a claude-code`. Or copy the skill folder (skills/niubash in unixwin/niubash) into .claude/skills/niubash in your project. Claude Code loads it when a task matches its description.

How do I install Niubash in Codex?

Run `npx skills add unixwin/niubash --skill niubash -a codex`. Or copy the skill folder (skills/niubash in unixwin/niubash) into .agents/skills/niubash in your project. Codex loads it when a task matches its description.

Can I use Niubash in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add unixwin/niubash --skill niubash -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/niubash, .gemini/skills/niubash, .github/skills/niubash and .opencode/skills/niubash in your project.

What does Niubash need to run?

Going by SKILL.md and its folder, Niubash needs the command-line tools its instructions call (ssh and rg).

Does Niubash access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Niubash safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Niubash use?

Niubash is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Niubash use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.3k tokens, read only when the agent opens those files.

What are the alternatives to Niubash?

Skills that share tags, products or a category with Niubash: Gridbash Panes (jasonsuhari/gridbash, 134 stars), Lade Release (zifeo/lade, 134 stars), Oh My Posh (JanDeDobbeleer/oh-my-posh, 24k stars) and Speckit Git Initialize (kunstmusik/blue, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Niubash?

unixwin (a GitHub organization) maintains it in unixwin/niubash, which has 163 GitHub stars. The repository was last updated on October 11, 2026.

Source: unixwin/niubash on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.