Generate Clap-based Rust CLI applications with derive macros, subcommands, and modern Rust patterns. Creates production-ready Rust CLI with proper cargo structure.
Generates production-ready Rust CLI applications with Clap derive macros, subcommands, and proper project structure.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdGenerate a complete Clap CLI application with Rust, derive macros, and best practices.
Invoke this skill when you need to:
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Name of the CLI project (kebab-case) |
| description | string | Yes | Short description of the CLI |
| commands | array | No | List of commands to scaffold |
| deriveFeatures | array | No | Clap derive features to enable |
| colorOutput | boolean | No | Enable colored output (default: true) |
{
"commands": [
{
"name": "run",
"description": "Run the application",
"args": [
{ "name": "target", "help": "Target to run", "required": true }
],
"options": [
{ "long": "watch", "short": "w", "help": "Watch for changes" },
{ "long": "port", "short": "p", "value_name": "PORT", "default": "3000" }
]
}
]
}
<projectName>/
├── Cargo.toml
├── Cargo.lock
├── README.md
├── .gitignore
├── src/
│ ├── main.rs # Entry point
│ ├── cli.rs # Clap definitions
│ ├── commands/
│ │ ├── mod.rs # Command exports
│ │ └── <command>.rs # Individual commands
│ ├── config.rs # Configuration
│ └── error.rs # Error types
├── tests/
│ └── cli.rs # CLI integration tests
└── completions/
├── _<projectName> # Zsh completions
├── <projectName>.bash # Bash completions
└── <projectName>.fish # Fish completions
use clap::{Parser, Subcommand, Args};
#[derive(Parser)]
#[command(name = "<projectName>")]
#[command(author, version, about, long_about = None)]
pub struct Cli {
/// Enable verbose output
#[arg(short, long, global = true)]
pub verbose: bool,
/// Configuration file path
#[arg(short, long, global = true)]
pub config: Option<PathBuf>,
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand)]
pub enum Commands {
/// Run the application
Run(RunArgs),
/// Build the project
Build(BuildArgs),
/// Generate shell completions
Completions {
/// Shell to generate completions for
#[arg(value_enum)]
shell: clap_complete::Shell,
},
}
#[derive(Args)]
pub struct RunArgs {
/// Target to run
pub target: String,
/// Watch for changes
#[arg(short, long)]
pub watch: bool,
/// Port to use
#[arg(short, long, default_value = "3000")]
pub port: u16,
}
use anyhow::Result;
use clap::Parser;
use colored::Colorize;
mod cli;
mod commands;
mod config;
mod error;
use cli::{Cli, Commands};
fn main() -> Result<()> {
let cli = Cli::parse();
// Setup logging based on verbosity
if cli.verbose {
env_logger::Builder::from_env(
env_logger::Env::default().default_filter_or("debug")
).init();
}
match cli.command {
Commands::Run(args) => commands::run::execute(args)?,
Commands::Build(args) => commands::build::execute(args)?,
Commands::Completions { shell } => {
generate_completions(shell);
}
}
Ok(())
}
use anyhow::Result;
use colored::Colorize;
use crate::cli::RunArgs;
pub fn execute(args: RunArgs) -> Result<()> {
println!("{} Running target: {}", "→".blue(), args.target.green());
if args.watch {
println!("{} Watch mode enabled", "!".yellow());
}
println!("{} Listening on port {}", "✓".green(), args.port);
Ok(())
}
[package]
name = "<projectName>"
version = "0.1.0"
edition = "2021"
[dependencies]
clap = { version = "4.4", features = ["derive", "env"] }
clap_complete = "4.4"
anyhow = "1.0"
thiserror = "1.0"
colored = "2.0"
env_logger = "0.10"
log = "0.4"
[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.0"
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.