Skip to main content

SkillWriter

Trait SkillWriter 

Source
pub trait SkillWriter: Send + Sync {
    // Required method
    fn write_skill(
        &self,
        description: String,
        signature: String,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + '_>>;
}
Expand description

Trait for writing a generated SKILL.md to disk.

Implemented in zeph-core using zeph_skills::generator::SkillGenerator. Defined here to avoid a circular crate dependency.

§Contract

Implementors must:

  • Generate a valid SKILL.md from description.
  • Apply any configured evaluator gate before writing.
  • Return Ok(()) on success or evaluator rejection (rejection is not an error).
  • Return Err only on hard failures (LLM error, I/O error).

Required Methods§

Source

fn write_skill( &self, description: String, signature: String, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + '_>>

Generate and persist a SKILL.md from description.

signature is used as an idempotency key — callers should ensure the skill file does not already exist before calling this method.

§Errors

Returns an error string on generation or I/O failure.

Implementors§