systemprompt_cli/commands/core/skills/
show.rs1use anyhow::{Context, Result};
7use clap::Args;
8
9use crate::CliConfig;
10use crate::shared::CommandOutput;
11
12use super::list::show_skill_detail;
13
14#[derive(Debug, Clone, Args)]
15pub struct ShowArgs {
16 #[arg(help = "Skill ID (directory name)")]
17 pub name: String,
18}
19
20pub(super) fn execute(args: &ShowArgs, _config: &CliConfig) -> Result<CommandOutput> {
21 let skills_path = get_skills_path()?;
22 show_skill_detail(&args.name, &skills_path)
23}
24
25fn get_skills_path() -> Result<std::path::PathBuf> {
26 let profile = systemprompt_config::ProfileBootstrap::get().context("Failed to get profile")?;
27 Ok(std::path::PathBuf::from(profile.paths.skills()))
28}