Skip to main content

references_in

Function references_in 

Source
pub fn references_in(line: &str, skills_prefix: &str) -> Vec<(String, String)>
Expand description

The skill references one line makes: majordomus://skill/<id>, and <skills dir>/<id>/SKILL.md.

use majordomus_cli::skill::references_in;
let r = references_in(
    "Follow majordomus://skill/repo-review, then .ai/repo/skills/implement/SKILL.md.",
    ".ai/repo/skills/",
);
assert_eq!(r[0].0, "repo-review");
assert_eq!(r[1], ("implement".to_string(), ".ai/repo/skills/implement/SKILL.md".to_string()));