Skip to main content

load_skill_file

Function load_skill_file 

Source
pub fn load_skill_file(
    skill_md: &Path,
    plugin: Option<&str>,
    plugin_root: Option<&Path>,
) -> Option<LoadedSkill>
Expand description

Load a SKILL.md file into a LoadedSkill. Applies two substitutions:

  • {baseDir} → the skill’s own directory (native SynapsCLI form).
  • ${CLAUDE_PLUGIN_ROOT} / $CLAUDE_PLUGIN_ROOT → the plugin’s root directory (Claude Code compat), when the skill belongs to a plugin.

Returns None if required frontmatter is missing or body is empty.