pub async fn extract_skill_metadata(
skill_path: &Path,
) -> Result<(SkillFrontmatter, Vec<String>)>Expand description
Extract metadata from a skill directory.
This function reads a skill directory, validates its structure,
and extracts metadata including the frontmatter and file list.
Uses the shared SkillDirectoryInfo to perform validation and
metadata extraction in a single pass.
§Arguments
skill_path- Path to the skill directory
§Returns
Returns a tuple of (frontmatter, file_list) if valid
§Examples
use agpm_cli::skills::extract_skill_metadata;
use std::path::Path;
let (frontmatter, files) = extract_skill_metadata(Path::new("my-skill")).await?;
println!("Skill: {}", frontmatter.name);
println!("Files: {:?}", files);