Instruction skills that actively constrain normal session tool use. Built-in skills have local allowlists for explicit `Skill` invocation, but those allowlists must not make the default registry globally read-only. If a user replaces a built-in name through registration or a skill directory, the replacement is no longer considered built-in.
(&self)
| 256 | /// read-only. If a user replaces a built-in name through registration or a |
| 257 | /// skill directory, the replacement is no longer considered built-in. |
| 258 | pub fn global_tool_restricting_skills(&self) -> Vec<Arc<Skill>> { |
| 259 | let skills = self.skills.read().unwrap(); |
| 260 | let builtin_names = self.builtin_names.read().unwrap(); |
| 261 | skills |
| 262 | .values() |
| 263 | .filter(|skill| { |
| 264 | skill.kind == SkillKind::Instruction |
| 265 | && skill.allowed_tools.is_some() |
| 266 | && !builtin_names.contains(&skill.name) |
| 267 | }) |
| 268 | .cloned() |
| 269 | .collect() |
| 270 | } |
| 271 | |
| 272 | /// Get all skills with a specific tag |
| 273 | pub fn by_tag(&self, tag: &str) -> Vec<Arc<Skill>> { |