use codex_core_skills::injection::SkillInjection; use super::ContextualUserFragment; #[derive(Debug, Clone, PartialEq)] pub(crate) struct SkillInstructions { pub(crate) name: String, pub(crate) path: String, pub(crate) contents: String, } impl From<&SkillInjection> for SkillInstructions { fn from(skill: &SkillInjection) -> Self { Self { name: skill.name.clone(), path: skill.path.clone(), contents: skill.contents.clone(), } } } impl ContextualUserFragment for SkillInstructions { fn role() -> &'static str { "user" } fn markers(&self) -> (&'static str, &'static str) { Self::type_markers() } fn type_markers() -> (&'static str, &'static str) { ("", "") } fn body(&self) -> String { format!( "\n{}\n{}\n{}\n", self.name, self.path, self.contents ) } }