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