AGENT SKILL

nushell-structured-shell

Execute structured Nushell pipelines returning typed JSON tables/records instead of brittle POSIX text parsing (awk/sed/cut). Use when querying filesystem metadata, process tables, structured logs, git histories, or JSON/TOML/YAML configs in Vox terminal sessions.

License 许可
Apache-2.0
所属仓库
vox-foundation/vox
最近更新
2026-11-11
Stars
★ 5
Forks
0

01 前言 Front Matter

name
nushell-structured-shell
metadata
{ "vox-id": "nushell-structured-shell", "vox-shell": "nushell", "vox-tools": "vox_run_shell,term_run", "vox-category": "terminal", "vox-structured-output": "true" }
description
Execute structured Nushell pipelines returning typed JSON tables/records instead of brittle POSIX text parsing (awk/sed/cut). Use when querying filesystem metadata, process tables, structured logs, git histories, or JSON/TOML/YAML configs in Vox terminal sessions.

02 资源文件 3

03 SKILL.md 正文

Nushell Structured Shell (nushell-structured-shell)

Prefer structured Nushell (nu) pipelines over fragile POSIX awk/sed/cut text-scraping whenever inspecting files, processes, structured data, or system state in Vox.

3-Layer Execution Pyramid

  1. Layer 1: Native Vox / Stdlib (vox_interp / std.*)
    • For pure computation, repo automation, cross-platform file transforms, and script workflows, write .vox files and run via vox run (interpreted or compiled).
  2. Layer 2: Structured Shell (!nu <pipeline> / /nu <pipeline>)
    • For system exploration, structured pipeline querying (JSON, YAML, CSV, SQLite, ps, ls, netstat), and table filtering where typed fields save agent token parsing.
  3. Layer 3: Host Execution (pwsh / POSIX shell)
    • For direct invocation of external platform binaries, native toolchains (cargo, git, npm), or tasks where unbuffered raw PTY terminal interactive IO is required.

POSIX-to-Nushell Idiom Translation Table

POSIX Idiom Nushell Equivalent Rationale / Explanation
cmd1 && cmd2 cmd1; cmd2 or if (cmd1) { cmd2 } Semicolon chains execution; conditional blocks evaluate success status
cmd1 || cmd2 cmd1 or cmd2 or try { cmd1 } catch { cmd2 } Nushell boolean or / error handling block
cmd 2>&1 cmd out+err> or do -i { cmd } | complete Merges stdout and stderr into single stream or structured record
cmd | awk '{print $1}' cmd | get column_name or lines | split column ' ' | get column1 Typed table column extraction preserves data fidelity
grep pattern file open file | find "pattern" or lines | find "pattern" Built-in text and stream filtering
cat data.json | jq '.foo' open data.json | get foo First-class JSON, TOML, YAML, CSV deserialization
ps aux | grep node ps | where name =~ "node" Filters structured process table rows by field
ls -lh | sort -k5 -n ls | sort-by size Sorts structured file metadata rows by size attribute
$HOME, $PATH, $USER $env.HOME, $env.PATH, $env.USER Environment variables live in the $env namespace

Vox Terminal Invocation

  • In the Vox Console, TUI, or agent bridges:
    • !nu ls | where size > 10kb | select name size modified
    • /nu sys host | select name os_version
  • Output is automatically captured structured as JSON records or tables when piped.
  • If nu is not installed on the system, Vox provides an automatic POSIX diagnostic fallback.

04 同仓库更多 Skills

vox-foundation
vox-foundation/vox

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

测试与质量前端开发
★ 5
vox-foundation
vox-foundation/vox

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

前端开发
★ 5
vox-foundation
vox-foundation/vox

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

视觉设计
★ 5
vox-foundation
vox-foundation/vox

slack-gif-creator

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."

邮件与沟通图像与多媒体
★ 5
vox-foundation
vox-foundation/vox

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

Skill与智能体开发
★ 5
vox-foundation
vox-foundation/vox

internal-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 whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

邮件与沟通
★ 5