#[non_exhaustive]pub struct Skill {
pub name: String,
pub description: String,
pub path: Option<AbsolutePath>,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
An Agent Skill the user can invoke.
The type discriminator value is skill.
The Client invokes a skill with a skill content block that names it. The
/name syntax applies only to command entries. An Agent that sends
skill entries MUST advertise the session.prompt.skill capability.
Agents MUST only send skill entries when the Client advertised the
session.commands.skill Client capability. Agents SHOULD advertise only
skills the user can invoke.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringSkill name. The Client uses it to refer to the skill in a skill content block.
MUST NOT contain whitespace and MUST be unique within the command list,
across commands and skills. It need not match the name in the skill’s
frontmatter.
description: StringHuman-readable description of what the skill does, shown to users.
path: Option<AbsolutePath>The absolute path of the file that defines the skill, normally its
SKILL.md, on the machine the Agent runs on.
Omitted and null are equivalent and mean the skill has no such file,
as with a skill that is built into the Agent or served by an MCP server.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Omitted and null are equivalent and mean no metadata.
Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Implementations§
Source§impl Skill
impl Skill
Sourcepub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Available on crate feature unstable_agent_skills only.
pub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
unstable_agent_skills only.Builds Skill with the required fields set. Optional fields start unset or empty.
Sourcepub fn path(self, path: impl IntoOption<AbsolutePath>) -> Self
Available on crate feature unstable_agent_skills only.
pub fn path(self, path: impl IntoOption<AbsolutePath>) -> Self
unstable_agent_skills only.The absolute path of the file that defines the skill, normally its
SKILL.md, on the machine the Agent runs on.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
Available on crate feature unstable_agent_skills only.
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
unstable_agent_skills only.The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
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>,
impl Eq for Skill
Source§impl JsonSchema for Skill
impl JsonSchema for Skill
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Skill
Auto Trait Implementations§
impl Forget for Skill
impl Freeze for Skill
impl Move 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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.