pub struct SkillContribution {
pub name: String,
pub description: String,
pub instructions: String,
pub files: Vec<(String, String)>,
pub user_invocable: bool,
pub disable_model_invocation: bool,
}Expand description
A skill contributed by a capability in code.
During session startup, contributions are normalized into mount points under
/.agents/skills/{name}/ so the built-in SkillsCapability discovers them
alongside user-uploaded and registry-based skills. This reuses the existing
discovery, prompt listing, and activation path rather than introducing a
parallel skill pipeline.
Fields§
§name: StringSkill name — also used as the mount directory name.
description: StringShort description shown in the skill list and prompt.
instructions: StringSKILL.md body (markdown instructions).
files: Vec<(String, String)>Bundled files mounted alongside SKILL.md (path -> content).
user_invocable: boolWhether this skill is user-invocable as a /slash command.
disable_model_invocation: boolWhether the model is prevented from auto-invoking this skill.
Implementations§
Source§impl SkillContribution
impl SkillContribution
Sourcepub fn new(
name: impl Into<String>,
description: impl Into<String>,
instructions: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, description: impl Into<String>, instructions: impl Into<String>, ) -> Self
Create a new skill contribution with default flags
(user_invocable = true, disable_model_invocation = false).
Sourcepub fn with_files(self, files: Vec<(String, String)>) -> Self
pub fn with_files(self, files: Vec<(String, String)>) -> Self
Attach bundled files that will be mounted alongside SKILL.md.
Sourcepub fn with_user_invocable(self, flag: bool) -> Self
pub fn with_user_invocable(self, flag: bool) -> Self
Set whether the skill is user-invocable as a /slash command.
Sourcepub fn with_disable_model_invocation(self, flag: bool) -> Self
pub fn with_disable_model_invocation(self, flag: bool) -> Self
Set whether the model is prevented from auto-invoking this skill.
Sourcepub fn to_mount(&self, owner_id: &str) -> MountPoint
pub fn to_mount(&self, owner_id: &str) -> MountPoint
Build a read-only mount at /.agents/skills/{name}/ containing the
reconstructed SKILL.md and all bundled files. owner_id is recorded
as the mount’s owning capability, typically the contributing capability’s
ID.
Trait Implementations§
Source§impl Clone for SkillContribution
impl Clone for SkillContribution
Source§fn clone(&self) -> SkillContribution
fn clone(&self) -> SkillContribution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SkillContribution
impl RefUnwindSafe for SkillContribution
impl Send for SkillContribution
impl Sync for SkillContribution
impl Unpin for SkillContribution
impl UnsafeUnpin for SkillContribution
impl UnwindSafe for SkillContribution
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,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request