pub struct Skill {
pub name: String,
pub description: String,
pub allowed_tools: Option<String>,
pub disable_model_invocation: bool,
pub kind: SkillKind,
pub content: String,
}Expand description
Skill definition
Represents a skill with:
- name: skill identifier
- description: what the skill does
- allowed_tools: tool permissions (e.g., “Bash(gh:*)”)
- disable_model_invocation: whether to disable model calls
- content: the prompt/instruction content
Fields§
§name: StringSkill name (from frontmatter or filename)
description: StringSkill description
allowed_tools: Option<String>Allowed tools (Claude Code format: “Bash(pattern:*)”)
disable_model_invocation: boolWhether to disable model invocation
kind: SkillKindSkill kind (instruction, tool, or agent)
content: StringSkill content (markdown instructions)
Implementations§
Source§impl Skill
impl Skill
Sourcepub fn parse_allowed_tools(&self) -> HashSet<ToolPermission>
pub fn parse_allowed_tools(&self) -> HashSet<ToolPermission>
Parse allowed tools into a set of tool patterns
Claude Code format: “Bash(gh issue view:), Bash(gh search:)” Returns patterns like: [“Bash:gh issue view:”, “Bash:gh search:”]
Sourcepub fn is_tool_allowed(&self, tool_name: &str, args: &str) -> bool
pub fn is_tool_allowed(&self, tool_name: &str, args: &str) -> bool
Check if a tool call is allowed by this skill
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Skill
impl<'de> Deserialize<'de> for Skill
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Skill
impl RefUnwindSafe for Skill
impl Send for Skill
impl Sync for Skill
impl Unpin for Skill
impl UnsafeUnpin for Skill
impl UnwindSafe for Skill
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more