get_skill_file

Function get_skill_file 

Source
pub fn get_skill_file(path: &str) -> Option<&'static [u8]>
Expand description

Retrieves an embedded skill file by its path within the skills assets.

The path should be the file’s path relative to the skills root (for example “brainstorming/SKILL.md”).

§Returns

Some(&[u8]) with the file contents if a file exists at path, None otherwise.

§Examples

use ito_templates::get_skill_file;
let contents = get_skill_file("brainstorming/SKILL.md");
if let Some(bytes) = contents {
    assert!(!bytes.is_empty());
}