pub fn install_plugin_from_subdir(
marketplace_url: &str,
subdir: &str,
dest: &Path,
) -> Result<String, String>Expand description
Shallow-clone marketplace_url into a temp dir sibling to dest, then
move its <subdir> directly into place at dest. Returns the HEAD SHA
of the cloned marketplace. Used for Claude-Code-style marketplaces whose
plugins reference ./<subdir> instead of their own standalone repos.
Guarantees:
subdirmust passcrate::skills::marketplace::is_safe_plugin_name(no traversal, no path separators).destmust not exist.- If the subdir doesn’t exist inside the cloned repo, returns
Errand does not createdest.