gum-nushell
БесплатноБез исполняемых скриптовНе проверенUse Gum from Nushell scripts to build interactive CLI/TUI flows. Trigger when writing, reviewing, or debugging Nu scripts that call `gum` commands such as…
от Efterklang★ 39 звёзд на GitHubОб этом скилле
Gum in Nushell
Use this skill when implementing shell interaction with gum in .nu scripts. Prefer small, composable Gum calls and keep Nushell's structured pipeline model explicit.
Core Rules
- Prefix Gum calls with
^gumwhen writing reusable Nu scripts. This avoids collisions with Nushell commands, aliases, or custom definitions. - Treat Gum input and output as text. Convert Nushell lists/tables into delimited text before piping into Gum; parse Gum's text output back into Nu values after capture.
- Do not pipe structured Nushell lists directly into Gum. Nu will render a table, and Gum will receive box-drawing/table text instead of one option per line.
- Check
$env.LAST_EXIT_CODEafter commands where cancel/no/timeout matters.confirmcommunicates the user's answer primarily through the exit code. - Use
--before command arguments forgum spin, and before formatted content that could be parsed as flags. - Prefer Gum environment variables for global/default styling and command flags for call-site-specific behavior.
Useful helpers:
def to-gum-lines []: list<any> -> string {
$in | each { |item| $item | into string } | str join "\n"
}
def gum-success [] {
$env.LAST_EXIT_CODE == 0
}
def gum-confirm [prompt: string] {
^gum confirm $prompt
$env.LAST_EXIT_CODE == 0
}
Text And Pipeline Boundaries
Capture simple output directly:
let name = (^gum input --placeholder "Project name")
if not (gum-success) { return }
print $"Creating ($name)"
Convert Nu lists to newline-delimited text before Gum:
let items = ["feat" "fix" "docs" "chore"]
let choice = ($items | to-gum-lines | ^gum choose --header "Commit type")
if not (gum-success) { return }
Convert multi-select output back into a Nu list:
let languages = (
["Rust" "Go" "TypeScript" "Python"]
| to-gum-lines
| ^gum choose --no-limit --header "Languages"
)
if not (gum-success) { return }
let language_list = ($languages | lines)
Use --input-delimiter and --output-delimiter when the item separator is not a newline:
let picked = (
"red,green,blue"
| ^gum choose --input-delimiter "," --output-delimiter ","
)
let picked_list = ($picked | split row ",")
Confirmation And Exit Codes
Use confirm for branching. Do not expect a useful stdout value unless --show-output is explicitly requested.
if (^gum confirm "Delete generated files?"; $env.LAST_EXIT_CODE == 0) {
print "Deleting..."
}
For repeated confirmation logic, wrap it:
def confirm-or-return [prompt: string] {
^gum confirm $prompt --affirmative "Yes" --negative "No"
if $env.LAST_EXIT_CODE != 0 { return false }
true
}
if not (confirm-or-return "Publish release?") { return }
Use --default and --timeout when non-interactive or slow-response sessions are possible:
^gum confirm "Continue?" --default --timeout 10s
if $env.LAST_EXIT_CODE != 0 { return }
Choosing And Filtering
Use choose for short fixed lists:
let branch = (
["main" "develop" "release"]
| to-gum-lines
| ^gum choose --header "Target branch" --select-if-one
)
if not (gum-success) { return }
Use filter for searchable lists:
let file = (
glob "**/*.nu"
| each { |path| $path | into string }
| str join "\n"
| ^gum filter --placeholder "Search Nu files" --height 15
)
if not (gum-success) { return }
Use multi-select with --no-limit or --limit N, then parse with lines:
let selected = (
["lint" "test" "build" "release"]
| to-gum-lines
| ^gum filter --no-limit --header "Tasks"
)
if not (gum-success) { return }
for task in ($selected | lines) {
print $"Run ($task)"
}
Use --label-delimiter when display labels should map to machine values:
let type = (
["Feature:feat" "Bug fix:fix" "Documentation:docs"]
| to-gum-lines
| ^gum choose --label-delimiter ":" --header "Commit type"
)
Inputs
Use input for one-line values:
let token = (^gum input --password --placeholder "API token")
if not (gum-success) { return }
Use write for long-form text:
let body = (
^gum write
--header "Release notes"
--placeholder "Describe user-visible changes..."
--show-line-numbers
)
if not (gum-success) { return }
Pass initial values via --value or stdin:
let edited = ("Initial text" | ^gum write --height 8)
Files And Tables
Use file when the user should browse the filesystem:
let selected_file = (^gum file . --file --all --header "Select config")
if not (gum-success) { return }
open $selected_file
For directories:
let selected_dir = (^gum file . --directory --header "Select destination")
if not (gum-success) { return }
Use table for tabular choices. Convert Nu records to CSV first:
let rows = [
[name path];
["Nushell config" "shells/nushell/config.nu"]
["Zsh config" "shells/zs
Установить gum-nushell в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл gum-nushell?
Use Gum from Nushell scripts to build interactive CLI/TUI flows. Trigger when writing, reviewing, or debugging Nu scripts that call `gum` commands such as choose, filter, confirm, input, write, file, table, spin, style, format, join, pager, log, or version-check, especially when handling Nushell pipelines, lists, multi-select output, exit codes, cancellations, or Gum style environment variables.
Как установить скилл gum-nushell?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gum-nushell запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic