nushell-plugin-builder

nushell-plugin-builder is a skill for Claude Code, Codex from YPares/agent-skills. It costs 69 tokens per session (2,076 once invoked), scanned A, original, MIT.

A guide for building Nushell plugins in Rust. Nushell is a command-line shell whose plugins can add custom commands, data transformations, and external integrations.

In plain words
What is it for?
Use it to create Rust-based Nushell commands, define their inputs and outputs, stream data, or connect them to other tools and services.
Why use it?
It explains the project setup and interfaces needed to extend Nushell without having to work out the plugin structure from scratch.

Skill for Claude CodeCodex

Part of the nushell-skills plugin — 2 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ypares/agent-skills/nushell-plugin-builder
Any agent
npx skills add YPares/agent-skills --skill nushell-plugin-builder
Clone the repo
git clone --depth 1 https://github.com/YPares/agent-skills

Made for: Claude Code, Codex.

Or install nushell-skills, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nushell-plugin-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/ypares/agent-skills/nushell-plugin-builder.svg)](https://agentmods.dev/skills/ypares/agent-skills/nushell-plugin-builder)
Your own site
<a href="https://agentmods.dev/skills/ypares/agent-skills/nushell-plugin-builder"><img src="https://agentmods.dev/badge/skills/ypares/agent-skills/nushell-plugin-builder.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,076 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00069 $0.02076
Opus 5 $0.00034 $0.01038
Sonnet 5 $0.00014 $0.00415
Haiku 4.5 $0.00007 $0.00208

Measured 4d ago against content hash b8f7abe23ba5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nushell-plugin-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/init_plugin.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

nushell-plugin-builder/SKILL.md · 324 lines

How it starts

The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Nushell Plugin Builder

Overview

This skill helps create Nushell plugins in Rust. Plugins are standalone executables that extend Nushell with custom commands, data transformations, and integrations.

Quick Start

1. Create Plugin Project

cargo new nu_plugin_<name>
cd nu_plugin_<name>
cargo add nu-plugin nu-protocol

2. Basic Plugin Structure

use nu_plugin::{EvaluatedCall, MsgPackSerializer, serve_plugin};
use nu_plugin::{EngineInterface, Plugin, PluginCommand, SimplePluginCommand};
use nu_protocol::{LabeledError, Signature, Type, Value};

struct MyPlugin;

impl Plugin for MyPlugin {
    fn version(&self) -> String {
        env!("CARGO_PKG_VERSION").into()
    }

    fn commands(&self) -> Vec<Box<dyn PluginCommand<Plugin = Self>>> {
        vec![Box::new(MyCommand)]
    }
}

struct MyCommand;

impl SimplePluginCommand for MyCommand {
    type Plugin = MyPlugin;

    fn name(&self) -> &str {
        "my-command"
    }

    fn signature(&self) -> Signature {
        Signature::build("my-command")
            .input_output_type(Type::String, Type::Int)
    }

    fn run(
        &self,
        _plugin: &MyPlugin,
        _engine: &EngineInterface,
        call: &EvaluatedCall,
        input: &Value,
    ) -> Result<Value, LabeledError> {
        match input {
            Value::String { val, .. } => {
                Ok(Value::int(val.len() as i64, call.head))
            }
            _ => Err(LabeledError::new("Expected string input")
                .with_label("requires string", call.head))
        }
    }
}

fn main() {
    serve_plugin(&MyPlugin, MsgPackSerializer)
}

3. Build and Install

# Build
cargo build --release

# Install to cargo bin
cargo install --path . --locked

# Register with nushell
plugin add ~/.cargo/bin/nu_plugin_<name>  # Add .exe on Windows
plugin use <name>

# Test
"hello" | my-command

Command Types

SimplePluginCommand

For commands that operate on single values:

  • Input: &Value
  • Output: Result<Value, LabeledError>
  • Use for: transformations, simple filters, single value operations

Read the full file on GitHub · 324 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 324 lines · 69 tokens per session scan A b8f7abe23ba5

Subscribe to this mod's changes

nushell-plugin-builder is a skill published in the GitHub repository YPares/agent-skills (30 stars, last pushed 6d ago), licensed MIT. It adds 69 tokens to every session and 2,076 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.