oxios_kernel/skill/
mod.rs1pub mod archive;
5pub mod clawhub;
6pub mod format;
7pub mod frontmatter;
8pub mod manager;
9pub mod prompt;
10pub mod requirements;
11pub mod skills_sh;
12pub mod types;
13
14pub use format::SkillFormat;
15pub use manager::SkillManager;
16pub use prompt::{compact_path, escape_xml};
17pub use requirements::check_requirements;
18pub use types::{
19 ConfigCheck, InstallKind, Requirements, RequirementsCheck, Skill, SkillConfig, SkillEntry,
20 SkillInstallSpec, SkillInvocationPolicy, SkillMeta, SkillMetadata, SkillRef, SkillSnapshot,
21 SkillSource, SkillState, SkillStatus,
22};
23
24pub(crate) fn is_safe_relative_path(rel: &str) -> bool {
31 let p = std::path::Path::new(rel);
32 !p.components().any(|c| {
33 matches!(
34 c,
35 std::path::Component::ParentDir
36 | std::path::Component::RootDir
37 | std::path::Component::Prefix(_)
38 )
39 })
40}