pub struct SkillConfig {
pub name: String,
pub description: String,
pub instructions: Option<String>,
pub path: Option<String>,
pub allowed_tools: Option<Vec<String>>,
pub metadata: Option<JsonObject>,
pub license: Option<String>,
pub compatibility: Option<String>,
}Expand description
Configuration for a Skill (SkillConfig).
use strands::vended_plugins::skills::{Skill, SkillConfig};
let skill = Skill::new(SkillConfig {
name: "my-skill".into(),
description: "A custom skill".into(),
instructions: Some("Do the thing".into()),
..Default::default()
});
assert_eq!(skill.instructions(), "Do the thing");Fields§
§name: StringUnique identifier for the skill (1-64 chars, lowercase alphanumeric and hyphens).
description: StringWhat the skill does.
instructions: Option<String>Full markdown instructions from the SKILL.md body. Defaults to empty.
path: Option<String>Path to the skill directory, if loaded from disk.
allowed_tools: Option<Vec<String>>Tool names the skill may use (experimental, not enforced).
metadata: Option<JsonObject>Additional key-value metadata from the SKILL.md frontmatter. Defaults to empty.
license: Option<String>License identifier, such as Apache-2.0.
compatibility: Option<String>Compatibility information.
Implementations§
Source§impl SkillConfig
impl SkillConfig
Sourcepub fn builder() -> SkillConfigBuilder
pub fn builder() -> SkillConfigBuilder
Create an instance of SkillConfig using the builder syntax
Trait Implementations§
Source§impl Clone for SkillConfig
impl Clone for SkillConfig
Source§impl Debug for SkillConfig
impl Debug for SkillConfig
Source§impl Default for SkillConfig
impl Default for SkillConfig
Source§impl From<SkillConfig> for Skill
impl From<SkillConfig> for Skill
Source§fn from(config: SkillConfig) -> Self
fn from(config: SkillConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SkillConfig
impl PartialEq for SkillConfig
impl StructuralPartialEq for SkillConfig
Auto Trait Implementations§
impl Freeze for SkillConfig
impl RefUnwindSafe for SkillConfig
impl Send for SkillConfig
impl Sync for SkillConfig
impl Unpin for SkillConfig
impl UnsafeUnpin for SkillConfig
impl UnwindSafe for SkillConfig
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
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.