Skip to main content

Crate zeph_skills

Crate zeph_skills 

Source
Expand description

Skill subsystem: SKILL.md parser, registry, embedding matcher, hot-reload, and self-learning.

§Overview

zeph-skills is the skills runtime for the Zeph AI agent. Skills are Markdown documents (SKILL.md) with a YAML frontmatter header that describe what an agent can do, which tools it may invoke, and how to use them. At runtime the agent matches user intent to skills via embedding similarity and BM25 lexical ranking, then injects the matching skill body as prompt context.

§Module Map

ModuleResponsibility
loaderParse and validate SKILL.md frontmatter and body
registryIn-process skill index with lazy body loading
matcherAsync embedding-based skill matching with two-stage category filtering
bm25In-memory BM25 inverted index with Reciprocal Rank Fusion
watcherFilesystem hot-reload via notify debouncer
bundledCompile-time embedded bundled skills and startup provisioning
managerInstall / uninstall / verify skills from git URLs or local paths
trustTrust levels and source tracking for installed skills
trust_scoreBayesian Wilson-score re-ranking of skill match candidates
scannerAdvisory prompt-injection pattern scanner
promptFormat skills into prompt XML blocks
generatorNL-to-SKILL.md generation via LLM
evolutionSelf-learning: failure classification, step corrections, outcome tracking
erlExperiential Reflective Learning: heuristic extraction from completed tasks
stemSTEM: automatic detection of recurring tool-use patterns
rl_head2-layer MLP routing head trained with REINFORCE for skill re-ranking
resourceSkill-local resource file discovery and loading
qdrant_matcherQdrant-backed vector store for skill matching at scale (feature qdrant)

§Quick Start

use zeph_skills::registry::SkillRegistry;

// Load all skills from a directory (metadata only — bodies are lazy).
let registry = SkillRegistry::load(&["/path/to/skills"]);
println!("loaded {} skills", registry.all_meta().len());

// Look up a skill body by name.
let body = registry.body("my-skill")?;
println!("{}", body);

Re-exports§

pub use bundled::bundled_skill_names;
pub use error::SkillError;
pub use evaluator::EvaluationWeights;
pub use evaluator::SkillEvaluationRequest;
pub use evaluator::SkillEvaluator;
pub use evaluator::SkillQualityScore;
pub use evaluator::SkillVerdict;
pub use generator::GeneratedSkill;
pub use generator::SkillGenerationRequest;
pub use generator::SkillGenerator;
pub use matcher::IntentClassification;
pub use matcher::MatchResult;
pub use matcher::ScoredMatch;
pub use proactive::DomainLabel;
pub use proactive::ProactiveExplorer;
pub use trust::SkillSource;
pub use trust::SkillTrust;
pub use trust::compute_skill_hash;

Modules§

bm25
In-memory BM25 inverted index over skill descriptions with Reciprocal Rank Fusion.
bundled
Compile-time embedded bundled skills and startup provisioning.
erl
ERL (Experiential Reflective Learning) — heuristic extraction and injection at skill match time.
error
evaluator
External-feedback skill evaluator (#3319).
evolution
Self-learning skill evolution: failure classification, outcome tracking, and prompt templates.
generator
NL-to-SKILL.md generation pipeline.
loader
SKILL.md frontmatter parser and file-system loader.
manager
Skill lifecycle management: install, remove, verify, and list installed skills.
matcher
Async embedding-based skill matcher with optional two-stage category filtering.
miner
Automated skill mining from GitHub repositories.
proactive
Proactive world-knowledge exploration (#3320).
prompt
Format matched skills into the <available_skills> XML block injected into the system prompt.
registry
In-process skill registry with lazy body loading and content fingerprinting.
resource
Skill-local resource file discovery and safe loading.
rl_head
SkillOrchestra RL routing head: 2-layer MLP for skill re-ranking.
scanner
Advisory content scanner for skill bodies.
stem
STEM (Skill Template Evolution from Mining) — automatic detection of recurring tool-use patterns and conversion to SKILL.md candidates.
trust
Skill trust levels and provenance tracking.
trust_score
Bayesian posterior weight computation for skill ranking.
watcher
Filesystem hot-reload for skill directories.

Enums§

SkillTrustLevel
Trust tier controlling what a skill is allowed to do.