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
| Module | Responsibility |
|---|---|
loader | Parse and validate SKILL.md frontmatter and body |
registry | In-process skill index with lazy body loading |
matcher | Async embedding-based skill matching with two-stage category filtering |
bm25 | In-memory BM25 inverted index with Reciprocal Rank Fusion |
watcher | Filesystem hot-reload via notify debouncer |
bundled | Compile-time embedded bundled skills and startup provisioning |
manager | Install / uninstall / verify skills from git URLs or local paths |
trust | Trust levels and source tracking for installed skills |
trust_score | Bayesian Wilson-score re-ranking of skill match candidates |
scanner | Advisory prompt-injection pattern scanner |
prompt | Format skills into prompt XML blocks |
generator | NL-to-SKILL.md generation via LLM |
evolution | Self-learning: failure classification, step corrections, outcome tracking |
erl | Experiential Reflective Learning: heuristic extraction from completed tasks |
stem | STEM: automatic detection of recurring tool-use patterns |
rl_head | 2-layer MLP routing head trained with REINFORCE for skill re-ranking |
resource | Skill-local resource file discovery and loading |
qdrant_matcher | Qdrant-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§
- Skill
Trust Level - Trust tier controlling what a skill is allowed to do.