Skip to main content

telos_agent/knowledge/skills/
mod.rs

1//! Skills system — user-defined slash-commands loaded from markdown files.
2//!
3//! Skills are Markdown files with YAML frontmatter. They are loaded from
4//! directories in priority order and injected into the system prompt.
5
6pub mod loader;
7pub mod registry;
8
9pub use loader::SkillLoader;
10pub use registry::SkillRegistry;
11
12/// A loaded skill ready for invocation.
13#[derive(Debug, Clone)]
14pub struct Skill {
15    pub name: String,
16    pub description: String,
17    pub when_to_use: Option<String>,
18    pub prompt: String,
19    pub arguments: Vec<SkillArg>,
20    pub body: String,
21    pub source: SkillSource,
22}
23
24/// Description of a skill argument for template substitution.
25#[derive(Debug, Clone)]
26pub struct SkillArg {
27    pub name: String,
28    pub description: String,
29    pub required: bool,
30}
31
32/// Where a skill was loaded from — determines override priority.
33#[derive(Debug, Clone, PartialEq, Eq)]
34pub enum SkillSource {
35    Bundled,
36    Managed,
37    Project,
38    User,
39    /// Loaded from an installed plugin.
40    Plugin {
41        plugin_id: crate::integrations::plugin::PluginId,
42    },
43}