Skip to main content

vtcode_core/cli/args/
skills.rs

1use clap::Subcommand;
2
3/// Skills subcommands
4#[derive(Debug, Subcommand, Clone)]
5pub enum SkillsSubcommand {
6    /// List available skills
7    #[command(name = "list")]
8    List {
9        /// Show all skills including system skills
10        #[arg(long)]
11        all: bool,
12    },
13
14    /// Load a skill for use in agent session
15    #[command(name = "load")]
16    Load {
17        /// Skill name to load
18        name: String,
19        /// Optional path to skill directory
20        #[arg(long)]
21        path: Option<std::path::PathBuf>,
22    },
23
24    /// Unload a skill from session
25    #[command(name = "unload")]
26    Unload {
27        /// Skill name to unload
28        name: String,
29    },
30
31    /// Show skill details and instructions
32    #[command(name = "info")]
33    Info {
34        /// Skill name to get information about
35        name: String,
36    },
37
38    /// Create a new skill from template
39    #[command(name = "create")]
40    Create {
41        /// Path for new skill directory
42        path: std::path::PathBuf,
43        /// Optional template to use
44        #[arg(long)]
45        template: Option<String>,
46    },
47
48    /// Validate SKILL.md manifest
49    #[command(name = "validate")]
50    Validate {
51        /// Path to skill directory or SKILL.md file
52        path: std::path::PathBuf,
53        /// Enable strict validation (warnings become errors for routing quality checks)
54        #[arg(long)]
55        strict: bool,
56    },
57
58    /// Validate all skills for container skills compatibility
59    #[command(name = "check-compatibility")]
60    CheckCompatibility,
61
62    /// Show skill configuration and search paths
63    #[command(name = "config")]
64    Config,
65
66    /// Regenerate skills index file
67    #[command(name = "regenerate-index")]
68    RegenerateIndex,
69
70    /// skills-ref compatible commands (agentskills.io spec)
71    #[command(name = "skills-ref", subcommand)]
72    SkillsRef(SkillsRefSubcommand),
73}
74
75/// skills-ref compatible subcommands per agentskills.io specification
76#[derive(Debug, Subcommand, Clone)]
77pub enum SkillsRefSubcommand {
78    /// Validate a skill directory
79    #[command(name = "validate")]
80    Validate {
81        /// Path to skill directory
82        path: std::path::PathBuf,
83    },
84
85    /// Generate <available_skills> XML for agent prompts
86    #[command(name = "to-prompt")]
87    ToPrompt {
88        /// Paths to skill directories
89        paths: Vec<std::path::PathBuf>,
90    },
91
92    /// List discovered skills
93    #[command(name = "list")]
94    List {
95        /// Optional path to search (defaults to current directory)
96        path: Option<std::path::PathBuf>,
97    },
98}