pub struct Skill {
pub frontmatter: SkillFrontmatter,
pub instructions: String,
pub agent_name: String,
pub execution: SkillExecution,
pub tools: Vec<String>,
pub tags: Vec<String>,
pub base_dir: PathBuf,
}Expand description
A fully-parsed skill: frontmatter + body + derived fields.
Fields§
§frontmatter: SkillFrontmatterParsed YAML frontmatter.
instructions: StringMarkdown body (the agent instructions).
agent_name: StringNormalised snake_case name derived from frontmatter.name.
execution: SkillExecutionResolved execution mode (from execution, metadata.execution, or the default).
tools: Vec<String>Tools declared by allowed-tools, the complete allowlist for this skill. Empty when the
skill declared an empty list, and also when it declared nothing — see
Self::declares_tools, which is what decides whether the manager’s defaults apply.
Resource tags declared by resource-tags. Empty when the skill declared an empty list, and
also when it declared nothing — see Self::declares_resource_tags.
base_dir: PathBufSkill directory path (parent of SKILL.md) for resolving relative resources.
Implementations§
Source§impl Skill
impl Skill
Sourcepub fn is_subagent(&self) -> bool
pub fn is_subagent(&self) -> bool
Whether this skill is exposed as a callable subagent.
Sourcepub fn declares_tools(&self) -> bool
pub fn declares_tools(&self) -> bool
Whether the skill declared allowed-tools at all.
Distinct from a non-empty Self::tools: allowed-tools: [] is a skill asking for no
tools, and must not fall through to the manager’s default grant.
Whether the skill declared resource-tags at all.
Distinct from a non-empty Self::tags: resource-tags: [] is a skill asking for no
resources, and must not fall through to the * default.
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>,
Source§impl From<&Skill> for SubAgent
impl From<&Skill> for SubAgent
Only meaningful for SkillExecution::Subagent skills; inline skills are never materialized
as callables. Tools are taken verbatim from the skill — crate::extension::skill::SkillManager
substitutes its defaults when the skill declares none.
A skill that declares no resource-tags gets *, so a delegated skill receives the resources
the caller is holding. Without it a skill subagent can never see the current turn’s
attachments, since anda_core::select_resources returns nothing for an empty tag list. A
skill that declares an empty list means the opposite — take nothing — so it keeps its empty
tags.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more