[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AESJVDCNH4HET15RS6AZKF":3,"skill-same:01M6AESJVDCNH4HET15RS6AZKF":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":58,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6AESJVDCNH4HET15RS6AZKF","rust-cli-builder",null,"Plan and build production-ready Rust CLI tools using clap for argument parsing, with subcommands, config file support, colored output, and proper error handling. Uses interview-driven planning to clarify commands, input\u002Foutput formats, and distribution strategy before writing any code.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33602,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Frust-cli-builder\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"cli","builder","cli builder","rust cli builder","rust","clarify","production-ready","argument","command-line","error","line","distribution","writing","terminal","ready","command","support","plan","Tools","Production","file","devtools","error handling","planning","code","config","2026-11-10 10:12:30",false,"---\nname: rust-cli-builder\ndescription: Plan and build production-ready Rust CLI tools using clap for argument parsing, with subcommands, config file support, colored output, and proper error handling. Uses interview-driven planning to clarify commands, input\u002Foutput formats, and distribution strategy before writing any code.\nmetadata:\n  tags: [rust, cli, clap, terminal, command-line, devtools]\n---\n\n# Rust CLI Tool Builder\n\n## When to use\n\nUse this skill when you need to:\n\n- Scaffold a new Rust CLI tool from scratch with clap\n- Add subcommands to an existing CLI application\n- Implement config file loading (TOML\u002FJSON\u002FYAML)\n- Set up proper error handling with anyhow\u002Fthiserror\n- Add colored and formatted terminal output\n- Structure a CLI project for distribution via cargo install or GitHub releases\n\n## Phase 1: Explore (Plan Mode)\n\nEnter plan mode. Before writing any code, explore the existing project:\n\n### If extending an existing project\n- Find `Cargo.toml` and check current dependencies (clap version, serde, tokio, etc.)\n- Locate the CLI entry point (`src\u002Fmain.rs` or `src\u002Fcli.rs`)\n- Check if clap is using derive macros or builder pattern\n- Identify existing subcommand structure\n- Look for existing error types, config structs, and output formatting\n- Check if there's a `src\u002Flib.rs` separating library logic from CLI\n\n### If starting from scratch\n- Check the workspace for any existing Rust projects or workspace `Cargo.toml`\n- Look for a `.cargo\u002Fconfig.toml` with custom settings\n- Check for `rust-toolchain.toml` to know the target Rust edition\n\n## Phase 2: Interview (AskUserQuestion)\n\nUse AskUserQuestion to clarify requirements. Ask in rounds.\n\n### Round 1: Tool purpose and commands\n\n```\nQuestion: \"What kind of CLI tool are you building?\"\nHeader: \"Tool type\"\nOptions:\n  - \"Single command (like ripgrep, curl)\" — One main action with flags and arguments\n  - \"Multi-command (like git, cargo)\" — Multiple subcommands under one binary\n  - \"Interactive REPL (like psql)\" — Persistent session with a prompt loop\n  - \"Pipeline tool (like jq, sed)\" — Reads stdin, transforms, writes stdout\n\nQuestion: \"What will the tool operate on?\"\nHeader: \"Input\"\nOptions:\n  - \"Files\u002Fdirectories\" — Read, process, or generate files\n  - \"Network\u002FAPI\" — HTTP requests, TCP connections, API calls\n  - \"System resources\" — Processes, hardware info, OS config\n  - \"Data streams (stdin\u002Fstdout)\" — Pipe-friendly text\u002Fbinary processing\n```\n\n### Round 2: Subcommands (if multi-command)\n\n```\nQuestion: \"Describe the subcommands you need (e.g., 'init', 'build', 'deploy')\"\nHeader: \"Commands\"\nOptions:\n  - \"2-3 subcommands (I'll describe them)\" — Small focused tool\n  - \"4-8 subcommands with groups\" — Medium tool, may need command groups\n  - \"I have a rough list, help me design the API\" — Collaborative command design\n```\n\n### Round 3: Configuration and output\n\n```\nQuestion: \"How should the tool be configured?\"\nHeader: \"Config\"\nOptions:\n  - \"CLI flags only (Recommended)\" — All config via command-line arguments\n  - \"Config file (TOML)\" — Load defaults from ~\u002F.config\u002Ftoolname\u002Fconfig.toml\n  - \"Config file + CLI overrides\" — Config file for defaults, flags override specific values\n  - \"Environment variables + flags\" — Env vars for secrets, flags for everything else\n\nQuestion: \"What output format does the tool need?\"\nHeader: \"Output\"\nOptions:\n  - \"Human-readable (colored text)\" — Pretty terminal output with colors and formatting\n  - \"Machine-readable (JSON)\" — Structured output for piping to other tools\n  - \"Both (--format flag)\" — Default human, --json or --format=json for machines\n  - \"Minimal (exit codes only)\" — Success\u002Ffailure via exit code, errors to stderr\n```\n\n### Round 4: Async and error handling\n\n```\nQuestion: \"Does the tool need async operations?\"\nHeader: \"Async\"\nOptions:\n  - \"No — synchronous is fine (Recommended)\" — File I\u002FO, computation, simple operations\n  - \"Yes — tokio (network I\u002FO)\" — HTTP requests, concurrent connections, async file I\u002FO\n  - \"Yes — tokio multi-threaded\" — Heavy parallelism, multiple concurrent tasks\n\nQuestion: \"How should errors be presented to users?\"\nHeader: \"Errors\"\nOptions:\n  - \"Simple messages (anyhow) (Recommended)\" — Human-readable error chains, good for most CLIs\n  - \"Typed errors (thiserror)\" — Custom error enum with specific variants for each failure\n  - \"Both (thiserror for lib, anyhow for bin)\" — Library code is typed, CLI wraps with anyhow\n```\n\n## Phase 3: Plan (ExitPlanMode)\n\nWrite a concrete implementation plan covering:\n\n1. **Project structure** — `Cargo.toml` dependencies, `src\u002F` file layout\n2. **CLI definition** — clap derive structs for all commands, args, and flags\n3. **Config loading** — config file format and merge strategy with CLI args\n4. **Core logic** — main functions for each subcommand, separated from CLI layer\n5. **Error types** — error enum or anyhow usage, user-facing error messages\n6. **Output formatting** — colored output, JSON mode, progress indicators\n7. **Tests** — unit tests for core logic, integration tests for CLI behavior\n\nPresent via ExitPlanMode for user approval.\n\n## Phase 4: Execute\n\nAfter approval, implement following this order:\n\n### Step 1: Project setup (Cargo.toml)\n\n```toml\n[package]\nname = \"toolname\"\nversion = \"0.1.0\"\nedition = \"2021\"\ndescription = \"Short description of the tool\"\n\n[dependencies]\nclap = { version = \"4\", features = [\"derive\", \"env\"] }\nserde = { version = \"1\", features = [\"derive\"] }\nanyhow = \"1\"\n# Add based on interview:\n# thiserror = \"2\"              # if typed errors\n# tokio = { version = \"1\", features = [\"full\"] }  # if async\n# serde_json = \"1\"             # if JSON output\n# toml = \"0.8\"                 # if TOML config\n# colored = \"2\"                # if colored output\n# indicatif = \"0.17\"           # if progress bars\n# dirs = \"5\"                   # if config file (~\u002F.config\u002F)\n```\n\n### Step 2: CLI definition with clap derive\n\n```rust\nuse clap::{Parser, Subcommand};\n\n\u002F\u002F\u002F Short one-line description of the tool\n#[derive(Parser, Debug)]\n#[command(name = \"toolname\", version, about, long_about = None)]\npub struct Cli {\n    \u002F\u002F\u002F Increase verbosity (-v, -vv, -vvv)\n    #[arg(short, long, action = clap::ArgAction::Count, global = true)]\n    pub verbose: u8,\n\n    \u002F\u002F\u002F Output format\n    #[arg(long, default_value = \"text\", global = true)]\n    pub format: OutputFormat,\n\n    \u002F\u002F\u002F Path to config file\n    #[arg(long, global = true)]\n    pub config: Option\u003Cstd::path::PathBuf>,\n\n    #[command(subcommand)]\n    pub command: Commands,\n}\n\n#[derive(Subcommand, Debug)]\npub enum Commands {\n    \u002F\u002F\u002F Initialize a new project\n    Init {\n        \u002F\u002F\u002F Project name\n        name: String,\n\n        \u002F\u002F\u002F Template to use\n        #[arg(short, long, default_value = \"default\")]\n        template: String,\n    },\n\n    \u002F\u002F\u002F Build the project\n    Build {\n        \u002F\u002F\u002F Build in release mode\n        #[arg(short, long)]\n        release: bool,\n\n        \u002F\u002F\u002F Target directory\n        #[arg(short, long)]\n        output: Option\u003Cstd::path::PathBuf>,\n    },\n\n    \u002F\u002F\u002F Show project status\n    Status,\n}\n\n#[derive(clap::ValueEnum, Clone, Debug)]\npub enum OutputFormat {\n    Text,\n    Json,\n}\n```\n\n### Step 3: Error handling\n\n```rust\n\u002F\u002F With anyhow (simple approach):\nuse anyhow::{Context, Result};\n\nfn load_config(path: &Path) -> Result\u003CConfig> {\n    let content = std::fs::read_to_string(path)\n        .with_context(|| format!(\"Failed to read config file: {}\", path.display()))?;\n    let config: Config = toml::from_str(&content)\n        .context(\"Invalid TOML in config file\")?;\n    Ok(config)\n}\n\n\u002F\u002F With thiserror (typed approach):\nuse thiserror::Error;\n\n#[derive(Error, Debug)]\npub enum AppError {\n    #[error(\"Config file not found: {path}\")]\n    ConfigNotFound { path: std::path::PathBuf },\n\n    #[error(\"Invalid config: {0}\")]\n    InvalidConfig(#[from] toml::de::Error),\n\n    #[error(\"Network error: {0}\")]\n    Network(#[from] reqwest::Error),\n\n    #[error(\"{0}\")]\n    Custom(String),\n}\n```\n\n### Step 4: Config file loading\n\n```rust\nuse serde::Deserialize;\nuse std::path::{Path, PathBuf};\n\n#[derive(Deserialize, Debug, Default)]\npub struct Config {\n    pub default_template: Option\u003CString>,\n    pub output_dir: Option\u003CPathBuf>,\n    \u002F\u002F ... fields from interview\n}\n\nimpl Config {\n    pub fn load(explicit_path: Option\u003C&Path>) -> anyhow::Result\u003CSelf> {\n        let path = match explicit_path {\n            Some(p) => p.to_path_buf(),\n            None => Self::default_path(),\n        };\n\n        if !path.exists() {\n            return Ok(Config::default());\n        }\n\n        let content = std::fs::read_to_string(&path)?;\n        let config: Config = toml::from_str(&content)?;\n        Ok(config)\n    }\n\n    fn default_path() -> PathBuf {\n        dirs::config_dir()\n            .unwrap_or_else(|| PathBuf::from(\".\"))\n            .join(\"toolname\")\n            .join(\"config.toml\")\n    }\n}\n```\n\n### Step 5: Colored output and formatting\n\n```rust\nuse colored::Colorize;\n\npub struct Output {\n    format: OutputFormat,\n    verbose: u8,\n}\n\nimpl Output {\n    pub fn new(format: OutputFormat, verbose: u8) -> Self {\n        Self { format, verbose }\n    }\n\n    pub fn success(&self, msg: &str) {\n        match self.format {\n            OutputFormat::Text => eprintln!(\"{} {}\", \"✓\".green().bold(), msg),\n            OutputFormat::Json => {} \u002F\u002F JSON output goes to stdout only\n        }\n    }\n\n    pub fn error(&self, msg: &str) {\n        match self.format {\n            OutputFormat::Text => eprintln!(\"{} {}\", \"✗\".red().bold(), msg),\n            OutputFormat::Json => {\n                let err = serde_json::json!({\"error\": msg});\n                println!(\"{}\", serde_json::to_string(&err).unwrap());\n            }\n        }\n    }\n\n    pub fn info(&self, msg: &str) {\n        if self.verbose >= 1 {\n            match self.format {\n                OutputFormat::Text => eprintln!(\"{} {}\", \"ℹ\".blue(), msg),\n                OutputFormat::Json => {}\n            }\n        }\n    }\n\n    pub fn data\u003CT: serde::Serialize>(&self, data: &T) {\n        match self.format {\n            OutputFormat::Text => {\n                \u002F\u002F Pretty print for humans — customize per subcommand\n                println!(\"{:#?}\", data);\n            }\n            OutputFormat::Json => {\n                println!(\"{}\", serde_json::to_string_pretty(data).unwrap());\n            }\n        }\n    }\n}\n```\n\n### Step 6: Main entry point\n\n```rust\nuse clap::Parser;\n\nfn main() -> anyhow::Result\u003C()> {\n    let cli = Cli::parse();\n    let config = Config::load(cli.config.as_deref())?;\n    let output = Output::new(cli.format.clone(), cli.verbose);\n\n    match cli.command {\n        Commands::Init { name, template } => {\n            cmd_init(&name, &template, &config, &output)?;\n        }\n        Commands::Build { release, output_dir } => {\n            let dir = output_dir\n                .or(config.output_dir.clone())\n                .unwrap_or_else(|| PathBuf::from(\".\u002Fdist\"));\n            cmd_build(release, &dir, &output)?;\n        }\n        Commands::Status => {\n            cmd_status(&config, &output)?;\n        }\n    }\n\n    Ok(())\n}\n\n\u002F\u002F If async (tokio):\n\u002F\u002F #[tokio::main]\n\u002F\u002F async fn main() -> anyhow::Result\u003C()> { ... }\n```\n\n### Step 7: Subcommand implementations\n\n```rust\nfn cmd_init(name: &str, template: &str, config: &Config, out: &Output) -> anyhow::Result\u003C()> {\n    let template = if template == \"default\" {\n        config.default_template.as_deref().unwrap_or(\"default\")\n    } else {\n        template\n    };\n\n    out.info(&format!(\"Using template: {}\", template));\n\n    let project_dir = Path::new(name);\n    if project_dir.exists() {\n        anyhow::bail!(\"Directory '{}' already exists\", name);\n    }\n\n    std::fs::create_dir_all(project_dir)?;\n    \u002F\u002F ... scaffold project files based on template\n\n    out.success(&format!(\"Created project '{}' with template '{}'\", name, template));\n    Ok(())\n}\n```\n\n### Step 8: Tests\n\n```rust\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_config_default() {\n        let config = Config::default();\n        assert!(config.default_template.is_none());\n    }\n\n    #[test]\n    fn test_config_parse_toml() {\n        let toml_str = r#\"\n            default_template = \"react\"\n            output_dir = \".\u002Fbuild\"\n        \"#;\n        let config: Config = toml::from_str(toml_str).unwrap();\n        assert_eq!(config.default_template.unwrap(), \"react\");\n    }\n}\n\n\u002F\u002F Integration tests (tests\u002Fcli.rs):\nuse assert_cmd::Command;\nuse predicates::prelude::*;\n\n#[test]\nfn test_help_flag() {\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .arg(\"--help\")\n        .assert()\n        .success()\n        .stdout(predicate::str::contains(\"Usage:\"));\n}\n\n#[test]\nfn test_version_flag() {\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .arg(\"--version\")\n        .assert()\n        .success();\n}\n\n#[test]\nfn test_init_creates_directory() {\n    let dir = tempfile::tempdir().unwrap();\n    let project_name = dir.path().join(\"test-project\");\n\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .args([\"init\", project_name.to_str().unwrap()])\n        .assert()\n        .success();\n\n    assert!(project_name.exists());\n}\n\n#[test]\nfn test_init_existing_directory_fails() {\n    let dir = tempfile::tempdir().unwrap();\n\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .args([\"init\", dir.path().to_str().unwrap()])\n        .assert()\n        .failure()\n        .stderr(predicate::str::contains(\"already exists\"));\n}\n\n#[test]\nfn test_json_output_format() {\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .args([\"--format\", \"json\", \"status\"])\n        .assert()\n        .success()\n        .stdout(predicate::str::starts_with(\"{\"));\n}\n```\n\n## Project structure reference\n\n```\ntoolname\u002F\n├── Cargo.toml\n├── src\u002F\n│   ├── main.rs          # Entry point, CLI parsing, command dispatch\n│   ├── cli.rs           # Clap derive structs (Cli, Commands, Args)\n│   ├── config.rs        # Config file loading and merging\n│   ├── output.rs        # Output formatting (text\u002FJSON\u002Fcolored)\n│   ├── error.rs         # Error types (if using thiserror)\n│   └── commands\u002F\n│       ├── mod.rs\n│       ├── init.rs      # Init subcommand logic\n│       ├── build.rs     # Build subcommand logic\n│       └── status.rs    # Status subcommand logic\n└── tests\u002F\n    └── cli.rs           # Integration tests with assert_cmd\n```\n\n## Best practices\n\n### Separate CLI from logic\nKeep clap structs and argument parsing in `cli.rs`. Put business logic in `commands\u002F`. This makes the core logic testable without invoking the CLI.\n\n### Use stderr for status, stdout for data\nHuman-readable messages (progress, success, errors) go to `stderr`. Machine-readable data goes to `stdout`. This lets users pipe output cleanly: `toolname status --format json | jq '.items'`.\n\n### Respect NO_COLOR\nCheck the `NO_COLOR` environment variable and disable colors when set:\n```rust\nif std::env::var(\"NO_COLOR\").is_ok() {\n    colored::control::set_override(false);\n}\n```\n\n### Exit codes\nUse meaningful exit codes: 0 for success, 1 for general errors, 2 for usage errors (clap handles this automatically).\n\n### Dev dependencies for testing\n\n```toml\n[dev-dependencies]\nassert_cmd = \"2\"\npredicates = \"3\"\ntempfile = \"3\"\n```\n\n## Checklist before finishing\n\n- [ ] `clap` derive structs have doc comments (they become --help text)\n- [ ] All subcommands have short and long descriptions\n- [ ] Config file has sensible defaults and doesn't error when missing\n- [ ] `--format json` outputs valid, parseable JSON to stdout\n- [ ] Errors show context (file paths, what went wrong, how to fix it)\n- [ ] Integration tests verify CLI behavior end-to-end\n- [ ] `cargo clippy` passes with no warnings\n- [ ] `cargo fmt` has been run\n","# Rust CLI Tool Builder\n\n## When to use\n\nUse this skill when you need to:\n\n- Scaffold a new Rust CLI tool from scratch with clap\n- Add subcommands to an existing CLI application\n- Implement config file loading (TOML\u002FJSON\u002FYAML)\n- Set up proper error handling with anyhow\u002Fthiserror\n- Add colored and formatted terminal output\n- Structure a CLI project for distribution via cargo install or GitHub releases\n\n## Phase 1: Explore (Plan Mode)\n\nEnter plan mode. Before writing any code, explore the existing project:\n\n### If extending an existing project\n- Find `Cargo.toml` and check current dependencies (clap version, serde, tokio, etc.)\n- Locate the CLI entry point (`src\u002Fmain.rs` or `src\u002Fcli.rs`)\n- Check if clap is using derive macros or builder pattern\n- Identify existing subcommand structure\n- Look for existing error types, config structs, and output formatting\n- Check if there's a `src\u002Flib.rs` separating library logic from CLI\n\n### If starting from scratch\n- Check the workspace for any existing Rust projects or workspace `Cargo.toml`\n- Look for a `.cargo\u002Fconfig.toml` with custom settings\n- Check for `rust-toolchain.toml` to know the target Rust edition\n\n## Phase 2: Interview (AskUserQuestion)\n\nUse AskUserQuestion to clarify requirements. Ask in rounds.\n\n### Round 1: Tool purpose and commands\n\n```\nQuestion: \"What kind of CLI tool are you building?\"\nHeader: \"Tool type\"\nOptions:\n  - \"Single command (like ripgrep, curl)\" — One main action with flags and arguments\n  - \"Multi-command (like git, cargo)\" — Multiple subcommands under one binary\n  - \"Interactive REPL (like psql)\" — Persistent session with a prompt loop\n  - \"Pipeline tool (like jq, sed)\" — Reads stdin, transforms, writes stdout\n\nQuestion: \"What will the tool operate on?\"\nHeader: \"Input\"\nOptions:\n  - \"Files\u002Fdirectories\" — Read, process, or generate files\n  - \"Network\u002FAPI\" — HTTP requests, TCP connections, API calls\n  - \"System resources\" — Processes, hardware info, OS config\n  - \"Data streams (stdin\u002Fstdout)\" — Pipe-friendly text\u002Fbinary processing\n```\n\n### Round 2: Subcommands (if multi-command)\n\n```\nQuestion: \"Describe the subcommands you need (e.g., 'init', 'build', 'deploy')\"\nHeader: \"Commands\"\nOptions:\n  - \"2-3 subcommands (I'll describe them)\" — Small focused tool\n  - \"4-8 subcommands with groups\" — Medium tool, may need command groups\n  - \"I have a rough list, help me design the API\" — Collaborative command design\n```\n\n### Round 3: Configuration and output\n\n```\nQuestion: \"How should the tool be configured?\"\nHeader: \"Config\"\nOptions:\n  - \"CLI flags only (Recommended)\" — All config via command-line arguments\n  - \"Config file (TOML)\" — Load defaults from ~\u002F.config\u002Ftoolname\u002Fconfig.toml\n  - \"Config file + CLI overrides\" — Config file for defaults, flags override specific values\n  - \"Environment variables + flags\" — Env vars for secrets, flags for everything else\n\nQuestion: \"What output format does the tool need?\"\nHeader: \"Output\"\nOptions:\n  - \"Human-readable (colored text)\" — Pretty terminal output with colors and formatting\n  - \"Machine-readable (JSON)\" — Structured output for piping to other tools\n  - \"Both (--format flag)\" — Default human, --json or --format=json for machines\n  - \"Minimal (exit codes only)\" — Success\u002Ffailure via exit code, errors to stderr\n```\n\n### Round 4: Async and error handling\n\n```\nQuestion: \"Does the tool need async operations?\"\nHeader: \"Async\"\nOptions:\n  - \"No — synchronous is fine (Recommended)\" — File I\u002FO, computation, simple operations\n  - \"Yes — tokio (network I\u002FO)\" — HTTP requests, concurrent connections, async file I\u002FO\n  - \"Yes — tokio multi-threaded\" — Heavy parallelism, multiple concurrent tasks\n\nQuestion: \"How should errors be presented to users?\"\nHeader: \"Errors\"\nOptions:\n  - \"Simple messages (anyhow) (Recommended)\" — Human-readable error chains, good for most CLIs\n  - \"Typed errors (thiserror)\" — Custom error enum with specific variants for each failure\n  - \"Both (thiserror for lib, anyhow for bin)\" — Library code is typed, CLI wraps with anyhow\n```\n\n## Phase 3: Plan (ExitPlanMode)\n\nWrite a concrete implementation plan covering:\n\n1. **Project structure** — `Cargo.toml` dependencies, `src\u002F` file layout\n2. **CLI definition** — clap derive structs for all commands, args, and flags\n3. **Config loading** — config file format and merge strategy with CLI args\n4. **Core logic** — main functions for each subcommand, separated from CLI layer\n5. **Error types** — error enum or anyhow usage, user-facing error messages\n6. **Output formatting** — colored output, JSON mode, progress indicators\n7. **Tests** — unit tests for core logic, integration tests for CLI behavior\n\nPresent via ExitPlanMode for user approval.\n\n## Phase 4: Execute\n\nAfter approval, implement following this order:\n\n### Step 1: Project setup (Cargo.toml)\n\n```toml\n[package]\nname = \"toolname\"\nversion = \"0.1.0\"\nedition = \"2021\"\ndescription = \"Short description of the tool\"\n\n[dependencies]\nclap = { version = \"4\", features = [\"derive\", \"env\"] }\nserde = { version = \"1\", features = [\"derive\"] }\nanyhow = \"1\"\n# Add based on interview:\n# thiserror = \"2\"              # if typed errors\n# tokio = { version = \"1\", features = [\"full\"] }  # if async\n# serde_json = \"1\"             # if JSON output\n# toml = \"0.8\"                 # if TOML config\n# colored = \"2\"                # if colored output\n# indicatif = \"0.17\"           # if progress bars\n# dirs = \"5\"                   # if config file (~\u002F.config\u002F)\n```\n\n### Step 2: CLI definition with clap derive\n\n```rust\nuse clap::{Parser, Subcommand};\n\n\u002F\u002F\u002F Short one-line description of the tool\n#[derive(Parser, Debug)]\n#[command(name = \"toolname\", version, about, long_about = None)]\npub struct Cli {\n    \u002F\u002F\u002F Increase verbosity (-v, -vv, -vvv)\n    #[arg(short, long, action = clap::ArgAction::Count, global = true)]\n    pub verbose: u8,\n\n    \u002F\u002F\u002F Output format\n    #[arg(long, default_value = \"text\", global = true)]\n    pub format: OutputFormat,\n\n    \u002F\u002F\u002F Path to config file\n    #[arg(long, global = true)]\n    pub config: Option\u003Cstd::path::PathBuf>,\n\n    #[command(subcommand)]\n    pub command: Commands,\n}\n\n#[derive(Subcommand, Debug)]\npub enum Commands {\n    \u002F\u002F\u002F Initialize a new project\n    Init {\n        \u002F\u002F\u002F Project name\n        name: String,\n\n        \u002F\u002F\u002F Template to use\n        #[arg(short, long, default_value = \"default\")]\n        template: String,\n    },\n\n    \u002F\u002F\u002F Build the project\n    Build {\n        \u002F\u002F\u002F Build in release mode\n        #[arg(short, long)]\n        release: bool,\n\n        \u002F\u002F\u002F Target directory\n        #[arg(short, long)]\n        output: Option\u003Cstd::path::PathBuf>,\n    },\n\n    \u002F\u002F\u002F Show project status\n    Status,\n}\n\n#[derive(clap::ValueEnum, Clone, Debug)]\npub enum OutputFormat {\n    Text,\n    Json,\n}\n```\n\n### Step 3: Error handling\n\n```rust\n\u002F\u002F With anyhow (simple approach):\nuse anyhow::{Context, Result};\n\nfn load_config(path: &Path) -> Result\u003CConfig> {\n    let content = std::fs::read_to_string(path)\n        .with_context(|| format!(\"Failed to read config file: {}\", path.display()))?;\n    let config: Config = toml::from_str(&content)\n        .context(\"Invalid TOML in config file\")?;\n    Ok(config)\n}\n\n\u002F\u002F With thiserror (typed approach):\nuse thiserror::Error;\n\n#[derive(Error, Debug)]\npub enum AppError {\n    #[error(\"Config file not found: {path}\")]\n    ConfigNotFound { path: std::path::PathBuf },\n\n    #[error(\"Invalid config: {0}\")]\n    InvalidConfig(#[from] toml::de::Error),\n\n    #[error(\"Network error: {0}\")]\n    Network(#[from] reqwest::Error),\n\n    #[error(\"{0}\")]\n    Custom(String),\n}\n```\n\n### Step 4: Config file loading\n\n```rust\nuse serde::Deserialize;\nuse std::path::{Path, PathBuf};\n\n#[derive(Deserialize, Debug, Default)]\npub struct Config {\n    pub default_template: Option\u003CString>,\n    pub output_dir: Option\u003CPathBuf>,\n    \u002F\u002F ... fields from interview\n}\n\nimpl Config {\n    pub fn load(explicit_path: Option\u003C&Path>) -> anyhow::Result\u003CSelf> {\n        let path = match explicit_path {\n            Some(p) => p.to_path_buf(),\n            None => Self::default_path(),\n        };\n\n        if !path.exists() {\n            return Ok(Config::default());\n        }\n\n        let content = std::fs::read_to_string(&path)?;\n        let config: Config = toml::from_str(&content)?;\n        Ok(config)\n    }\n\n    fn default_path() -> PathBuf {\n        dirs::config_dir()\n            .unwrap_or_else(|| PathBuf::from(\".\"))\n            .join(\"toolname\")\n            .join(\"config.toml\")\n    }\n}\n```\n\n### Step 5: Colored output and formatting\n\n```rust\nuse colored::Colorize;\n\npub struct Output {\n    format: OutputFormat,\n    verbose: u8,\n}\n\nimpl Output {\n    pub fn new(format: OutputFormat, verbose: u8) -> Self {\n        Self { format, verbose }\n    }\n\n    pub fn success(&self, msg: &str) {\n        match self.format {\n            OutputFormat::Text => eprintln!(\"{} {}\", \"✓\".green().bold(), msg),\n            OutputFormat::Json => {} \u002F\u002F JSON output goes to stdout only\n        }\n    }\n\n    pub fn error(&self, msg: &str) {\n        match self.format {\n            OutputFormat::Text => eprintln!(\"{} {}\", \"✗\".red().bold(), msg),\n            OutputFormat::Json => {\n                let err = serde_json::json!({\"error\": msg});\n                println!(\"{}\", serde_json::to_string(&err).unwrap());\n            }\n        }\n    }\n\n    pub fn info(&self, msg: &str) {\n        if self.verbose >= 1 {\n            match self.format {\n                OutputFormat::Text => eprintln!(\"{} {}\", \"ℹ\".blue(), msg),\n                OutputFormat::Json => {}\n            }\n        }\n    }\n\n    pub fn data\u003CT: serde::Serialize>(&self, data: &T) {\n        match self.format {\n            OutputFormat::Text => {\n                \u002F\u002F Pretty print for humans — customize per subcommand\n                println!(\"{:#?}\", data);\n            }\n            OutputFormat::Json => {\n                println!(\"{}\", serde_json::to_string_pretty(data).unwrap());\n            }\n        }\n    }\n}\n```\n\n### Step 6: Main entry point\n\n```rust\nuse clap::Parser;\n\nfn main() -> anyhow::Result\u003C()> {\n    let cli = Cli::parse();\n    let config = Config::load(cli.config.as_deref())?;\n    let output = Output::new(cli.format.clone(), cli.verbose);\n\n    match cli.command {\n        Commands::Init { name, template } => {\n            cmd_init(&name, &template, &config, &output)?;\n        }\n        Commands::Build { release, output_dir } => {\n            let dir = output_dir\n                .or(config.output_dir.clone())\n                .unwrap_or_else(|| PathBuf::from(\".\u002Fdist\"));\n            cmd_build(release, &dir, &output)?;\n        }\n        Commands::Status => {\n            cmd_status(&config, &output)?;\n        }\n    }\n\n    Ok(())\n}\n\n\u002F\u002F If async (tokio):\n\u002F\u002F #[tokio::main]\n\u002F\u002F async fn main() -> anyhow::Result\u003C()> { ... }\n```\n\n### Step 7: Subcommand implementations\n\n```rust\nfn cmd_init(name: &str, template: &str, config: &Config, out: &Output) -> anyhow::Result\u003C()> {\n    let template = if template == \"default\" {\n        config.default_template.as_deref().unwrap_or(\"default\")\n    } else {\n        template\n    };\n\n    out.info(&format!(\"Using template: {}\", template));\n\n    let project_dir = Path::new(name);\n    if project_dir.exists() {\n        anyhow::bail!(\"Directory '{}' already exists\", name);\n    }\n\n    std::fs::create_dir_all(project_dir)?;\n    \u002F\u002F ... scaffold project files based on template\n\n    out.success(&format!(\"Created project '{}' with template '{}'\", name, template));\n    Ok(())\n}\n```\n\n### Step 8: Tests\n\n```rust\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_config_default() {\n        let config = Config::default();\n        assert!(config.default_template.is_none());\n    }\n\n    #[test]\n    fn test_config_parse_toml() {\n        let toml_str = r#\"\n            default_template = \"react\"\n            output_dir = \".\u002Fbuild\"\n        \"#;\n        let config: Config = toml::from_str(toml_str).unwrap();\n        assert_eq!(config.default_template.unwrap(), \"react\");\n    }\n}\n\n\u002F\u002F Integration tests (tests\u002Fcli.rs):\nuse assert_cmd::Command;\nuse predicates::prelude::*;\n\n#[test]\nfn test_help_flag() {\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .arg(\"--help\")\n        .assert()\n        .success()\n        .stdout(predicate::str::contains(\"Usage:\"));\n}\n\n#[test]\nfn test_version_flag() {\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .arg(\"--version\")\n        .assert()\n        .success();\n}\n\n#[test]\nfn test_init_creates_directory() {\n    let dir = tempfile::tempdir().unwrap();\n    let project_name = dir.path().join(\"test-project\");\n\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .args([\"init\", project_name.to_str().unwrap()])\n        .assert()\n        .success();\n\n    assert!(project_name.exists());\n}\n\n#[test]\nfn test_init_existing_directory_fails() {\n    let dir = tempfile::tempdir().unwrap();\n\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .args([\"init\", dir.path().to_str().unwrap()])\n        .assert()\n        .failure()\n        .stderr(predicate::str::contains(\"already exists\"));\n}\n\n#[test]\nfn test_json_output_format() {\n    Command::cargo_bin(\"toolname\")\n        .unwrap()\n        .args([\"--format\", \"json\", \"status\"])\n        .assert()\n        .success()\n        .stdout(predicate::str::starts_with(\"{\"));\n}\n```\n\n## Project structure reference\n\n```\ntoolname\u002F\n├── Cargo.toml\n├── src\u002F\n│   ├── main.rs          # Entry point, CLI parsing, command dispatch\n│   ├── cli.rs           # Clap derive structs (Cli, Commands, Args)\n│   ├── config.rs        # Config file loading and merging\n│   ├── output.rs        # Output formatting (text\u002FJSON\u002Fcolored)\n│   ├── error.rs         # Error types (if using thiserror)\n│   └── commands\u002F\n│       ├── mod.rs\n│       ├── init.rs      # Init subcommand logic\n│       ├── build.rs     # Build subcommand logic\n│       └── status.rs    # Status subcommand logic\n└── tests\u002F\n    └── cli.rs           # Integration tests with assert_cmd\n```\n\n## Best practices\n\n### Separate CLI from logic\nKeep clap structs and argument parsing in `cli.rs`. Put business logic in `commands\u002F`. This makes the core logic testable without invoking the CLI.\n\n### Use stderr for status, stdout for data\nHuman-readable messages (progress, success, errors) go to `stderr`. Machine-readable data goes to `stdout`. This lets users pipe output cleanly: `toolname status --format json | jq '.items'`.\n\n### Respect NO_COLOR\nCheck the `NO_COLOR` environment variable and disable colors when set:\n```rust\nif std::env::var(\"NO_COLOR\").is_ok() {\n    colored::control::set_override(false);\n}\n```\n\n### Exit codes\nUse meaningful exit codes: 0 for success, 1 for general errors, 2 for usage errors (clap handles this automatically).\n\n### Dev dependencies for testing\n\n```toml\n[dev-dependencies]\nassert_cmd = \"2\"\npredicates = \"3\"\ntempfile = \"3\"\n```\n\n## Checklist before finishing\n\n- [ ] `clap` derive structs have doc comments (they become --help text)\n- [ ] All subcommands have short and long descriptions\n- [ ] Config file has sensible defaults and doesn't error when missing\n- [ ] `--format json` outputs valid, parseable JSON to stdout\n- [ ] Errors show context (file paths, what went wrong, how to fix it)\n- [ ] Integration tests verify CLI behavior end-to-end\n- [ ] `cargo clippy` passes with no warnings\n- [ ] `cargo fmt` has been run\n",{"name":5,"metadata":50,"description":7},{"tags":51},[23,19,52,32,27,40],"clap","main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Frust-cli-builder",3963,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-15 01:32:48",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add davila7\u002Fclaude-code-templates --skill rust-cli-builder",{"tool":69,"command":70},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill rust-cli-builder",{"tool":72,"command":73},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill rust-cli-builder","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Frust-cli-builder\u002FSKILL.md",true,[77],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fdeliver.mjs","SCRIPT","脚本",473,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Faiwg-pr\u002Fscripts\u002Fdeliver.mjs",[84,116,141,174,206,230],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":95,"publishedAt":45},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[90],{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],"scoring","pool","wealthville pool scoring","liquidity","which","for","exit","now","use","when","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":45},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[122],{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},[124,125,126,127,128,129,130,131,132,133,134,105,43,135,136,36,137,138,139,140],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","todo","work","focus","signals","audit","dependency",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":156,"publishedAt":45},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[147,150,151],{"categoryNo":148,"categoryName":149,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},{"categoryNo":152,"categoryName":153,"taxonomyType":154,"taxonomyTypeDesc":155},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[157,158,159,160,161,162,163,101,164,165,166,167,168,169,170,104,171,172,105,173],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","access","database","query",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":178,"licenseFileUrl":179,"sourceHtmlUrl":180,"categories":181,"keywords":185,"publishedAt":45},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[182],{"categoryNo":183,"categoryName":184,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000009","前端开发",[186,187,188,189,20,190,191,192,193,194,195,196,37,39,197,198,199,200,201,202,203,204,101,205],"artifacts builder","web","web artifacts builder","artifacts","state","routing","state management","component","css","frontend","ui","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":178,"licenseFileUrl":210,"sourceHtmlUrl":211,"categories":212,"keywords":217,"publishedAt":45},"01M6AFWF33SFV9Z3SF4PEEE4BF","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.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[213,216],{"categoryNo":214,"categoryName":215,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":183,"categoryName":184,"taxonomyType":93,"taxonomyTypeDesc":94},[218,219,220,221,222,187,223,195,196,224,225,226,227,101,228,107,229],"webapp testing","testing","webapp","browser","playwright","applications","debugging","toolkit","logs","screenshots","local","behavior",{"skillNo":231,"name":232,"nameZh":6,"description":233,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":178,"licenseFileUrl":234,"sourceHtmlUrl":235,"categories":236,"keywords":244,"publishedAt":45},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[237,240,241],{"categoryNo":238,"categoryName":239,"taxonomyType":93,"taxonomyTypeDesc":94},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":91,"categoryName":92,"taxonomyType":93,"taxonomyTypeDesc":94},{"categoryNo":242,"categoryName":243,"taxonomyType":154,"taxonomyTypeDesc":155},"01JBSEEDCAT000000000000036","内容创作者",[245,246,247,248,249,250,251,31,189,252,39,43,253,254,255,256,257,169,258,105,259,260,261,26,262,113,263],"discernment nudge","nudge","interpretation","help","run","reasoning","data","lookup","content","review","conversation","short","up","invoke","you","analysis","claims","assemble","recommendations"]