Guide for creating Nushell plugins in Rust using nu_plugin and nu_protocol crates. Use when users want to build custom Nushell commands, extend Nushell with new functionality, create data transformations, or integrate external tools/APIs into Nushell. Covers project setup, command implementation, streaming data, custom values, and testing.
90
86%
Does it follow best practices?
Impact
95%
1.20xAverage score across 3 eval scenarios
Advisory
Suggest reviewing before use
Custom value types in Nushell plugins
typetag::serde attribute
100%
100%
typetag dependency
100%
100%
serde derive feature
100%
100%
Struct-based custom value
100%
100%
Serialize/Deserialize derives
100%
100%
MsgPackSerializer in main
100%
100%
LabeledError with span
100%
100%
nu_plugin_ binary name
100%
100%
input_output_type declared
100%
100%
record! macro used
0%
100%
CustomValue trait methods
100%
100%
Streaming commands and safe path/stdio handling
PluginCommand trait used
100%
100%
PipelineData input/output
100%
100%
ListStream::new pattern
100%
100%
engine.get_current_dir() used
100%
100%
is_using_stdio() check
0%
0%
MsgPackSerializer in main
100%
100%
LabeledError with span
100%
100%
input_output_type declared
100%
100%
nu_plugin_ binary name
100%
100%
call.get_flag or call.req used
100%
100%
Plugin testing setup and version compatibility
nu-plugin-test-support dep
0%
100%
PluginTest::new() used
0%
100%
test_examples or eval_with used
0%
70%
Version consistency
50%
100%
env!("CARGO_PKG_VERSION") in version()
100%
100%
call.has_flag or call.get_flag used
100%
100%
MsgPackSerializer in main
100%
100%
LabeledError with span
50%
100%
input_output_type declared
100%
100%
nu_plugin_ binary name
100%
100%
Two or more test functions
100%
100%
aed1afb
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.