Skip to main content

find_skill_root

Function find_skill_root 

Source
pub fn find_skill_root<R: Read + Seek>(
    zip: &mut ZipArchive<R>,
) -> Result<String>
Expand description

Find the directory prefix inside the archive that contains a SKILL.md marker. Returns "" when the marker sits at the archive root.

Some archives zip the skill directory directly (code-review/SKILL.md), others zip its contents (SKILL.md). This detects the common prefix so extraction can strip it and land contents flat in target.