MCPcopy Create free account
hub / github.com/AI45Lab/Code / load_from_file

Method load_from_file

core/src/skills/registry.rs:211–217  ·  view source on GitHub ↗

Load a single skill from a file

(&self, path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

209
210 /// Load a single skill from a file
211 pub fn load_from_file(&self, path: impl AsRef<Path>) -> anyhow::Result<Arc<Skill>> {
212 let skill = Skill::from_file(path)?;
213 let skill = Arc::new(skill);
214 self.register(skill.clone())
215 .map_err(|e| anyhow::anyhow!("Skill validation failed: {}", e))?;
216 Ok(skill)
217 }
218
219 /// Remove a skill by name
220 pub fn remove(&self, name: &str) -> Option<Arc<Skill>> {

Callers 2

test_load_from_fileFunction · 0.80

Calls 2

registerMethod · 0.45
cloneMethod · 0.45

Tested by 2

test_load_from_fileFunction · 0.64