Struct SkillCreator
pub struct SkillCreator { /* private fields */ }Expand description
Creates reusable skill definitions from successful multi-step executions.
Implementations§
Source§impl SkillCreator
impl SkillCreator
pub fn new(workspace_dir: PathBuf, config: SkillCreationConfig) -> Self
Sourcepub async fn create_from_execution(
&self,
task_description: &str,
tool_calls: &[ToolCallRecord],
embedding_provider: Option<&dyn EmbeddingProvider>,
) -> Result<Option<String>>
pub async fn create_from_execution( &self, task_description: &str, tool_calls: &[ToolCallRecord], embedding_provider: Option<&dyn EmbeddingProvider>, ) -> Result<Option<String>>
Attempt to create a skill from a successful multi-step task execution.
Returns Ok(Some(slug)) if a skill was created, Ok(None) if skipped
(disabled, duplicate, or insufficient tool calls).
Sourcepub async fn create_from_execution_reflected(
&self,
task_description: &str,
tool_calls: &[ToolCallRecord],
final_answer: &str,
embedding_provider: Option<&dyn EmbeddingProvider>,
provider_name: &str,
model_provider: &dyn ModelProvider,
model: &str,
) -> Result<Option<String>>
pub async fn create_from_execution_reflected( &self, task_description: &str, tool_calls: &[ToolCallRecord], final_answer: &str, embedding_provider: Option<&dyn EmbeddingProvider>, provider_name: &str, model_provider: &dyn ModelProvider, model: &str, ) -> Result<Option<String>>
Like Self::create_from_execution, but synthesizes a canonical SKILL.md
from a bounded slice of the execution via a model-provider reflection
call. If reflection fails — provider error, malformed output, empty
body — it falls back to the deterministic SKILL.toml generator so a
creation attempt is never left half-done.
Gating (enabled flag, minimum tool calls, dedup, slug, LRU) is shared
with Self::create_from_execution.
Auto Trait Implementations§
impl Freeze for SkillCreator
impl RefUnwindSafe for SkillCreator
impl Send for SkillCreator
impl Sync for SkillCreator
impl Unpin for SkillCreator
impl UnsafeUnpin for SkillCreator
impl UnwindSafe for SkillCreator
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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 more