pub mod clawhub;
pub mod format;
pub mod frontmatter;
pub mod manager;
pub mod prompt;
pub mod requirements;
pub mod skills_sh;
pub mod types;
pub use format::SkillFormat;
pub use manager::SkillManager;
pub use prompt::{compact_path, escape_xml};
pub use requirements::check_requirements;
pub use types::{
ConfigCheck, InstallKind, Requirements, RequirementsCheck, Skill, SkillConfig, SkillEntry,
SkillInstallSpec, SkillInvocationPolicy, SkillMeta, SkillMetadata, SkillRef, SkillSnapshot,
SkillSource, SkillState, SkillStatus,
};
pub(crate) fn is_safe_relative_path(rel: &str) -> bool {
let p = std::path::Path::new(rel);
!p.components().any(|c| {
matches!(
c,
std::path::Component::ParentDir
| std::path::Component::RootDir
| std::path::Component::Prefix(_)
)
})
}