pub trait Skill: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn version(&self) -> &str;
fn variables(&self) -> HashMap<String, String>;
fn allowed_tools(&self) -> Vec<String>;
fn instructions(&self) -> &str;
fn is_user_invocable(&self) -> bool;
fn execute_tool<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
params: Value,
ctx: &'life2 dyn ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A skill is a high-level agent capability composed of tools, instructions, and configuration.
Skills are the primary unit of agent customization. They can be
loaded from SKILL.md files, bundled with plugins, or
auto-generated. Skills can contribute tools that appear in MCP
tools/list and can be invoked via slash commands.
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description.
Sourcefn variables(&self) -> HashMap<String, String>
fn variables(&self) -> HashMap<String, String>
Template variables the skill accepts (name -> description).
Sourcefn allowed_tools(&self) -> Vec<String>
fn allowed_tools(&self) -> Vec<String>
Tool names this skill is allowed to invoke.
Sourcefn instructions(&self) -> &str
fn instructions(&self) -> &str
System instructions injected when the skill is active.
Sourcefn is_user_invocable(&self) -> bool
fn is_user_invocable(&self) -> bool
Whether this skill can be invoked directly by users (e.g., via /command).
Sourcefn execute_tool<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
params: Value,
ctx: &'life2 dyn ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_tool<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
params: Value,
ctx: &'life2 dyn ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Value, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a tool provided by this skill.
tool_name is the specific tool within this skill to call.
params is a JSON object of tool parameters.
ctx is the execution context providing key-value store access.