systemprompt_cli/commands/core/skills/
mod.rs1pub mod types;
11
12mod list;
13mod show;
14
15use anyhow::{Context, Result};
16use clap::Subcommand;
17
18use crate::context::CommandContext;
19use crate::shared::render_result;
20
21#[derive(Debug, Subcommand)]
22pub enum SkillsCommands {
23 #[command(about = "List configured skills")]
24 List(list::ListArgs),
25
26 #[command(about = "Show skill details")]
27 Show(show::ShowArgs),
28}
29
30pub fn execute(command: SkillsCommands, ctx: &CommandContext) -> Result<()> {
31 match command {
32 SkillsCommands::List(args) => {
33 let result = list::execute(args, &ctx.cli).context("Failed to list skills")?;
34 render_result(&result, &ctx.cli);
35 Ok(())
36 },
37 SkillsCommands::Show(args) => {
38 let result = show::execute(&args, &ctx.cli).context("Failed to show skill")?;
39 render_result(&result, &ctx.cli);
40 Ok(())
41 },
42 }
43}