Use Skills Subsystem
Use this when you want reusable file-backed skills (SKILL.md, references, scripts) as runtime tools/context.
Prerequisites
- Skill directories containing
SKILL.md. tirea-extension-skillsavailable.
Steps
- Discover skills from filesystem.
use tirea::skills::FsSkill;
let discovered = FsSkill::discover("./skills")?;
let skills = FsSkill::into_arc_skills(discovered.skills);
- Enable skills mode in builder.
use tirea::composition::{AgentDefinition, AgentDefinitionSpec, AgentOsBuilder, SkillsConfig};
let os = AgentOsBuilder::new()
.with_skills(skills)
.with_skills_config(SkillsConfig {
enabled: true,
advertise_catalog: true,
..SkillsConfig::default()
})
.with_agent_spec(AgentDefinitionSpec::local_with_id(
"assistant",
AgentDefinition::new("deepseek-chat"),
))
.build()?;
Config flags:
enabled: registers skill tools (skill,load_skill_resource,skill_script)advertise_catalog: injects available-skills catalog into inference context
- (Optional) use scope filters per agent via
AgentDefinition.
AgentDefinition::new("deepseek-chat")
.with_allowed_skills(vec!["code-review".to_string()])
.with_excluded_skills(vec!["dangerous-skill".to_string()])
These populate RunPolicy.allowed_skills / RunPolicy.excluded_skills, enforced at runtime when skills are resolved.
Verify
- Resolved tools include
skill,load_skill_resource,skill_script. - Model receives available-skills context (when discovery mode is enabled).
- Activated skill resources/scripts are accessible in runtime.
Common Errors
- Enabling skills mode without providing skills/registry.
- Tool id conflict with existing
skilltool names.
Related Example
- No dedicated starter ships with skills enabled yet; the closest wiring surface is
examples/src/starter_backend/mod.rsonce you add skills discovery/config there
Key Files
crates/tirea-extension-skills/src/subsystem.rscrates/tirea-extension-skills/src/lib.rscrates/tirea-agentos/src/runtime/tests.rs
Related
- Capability Matrix
- Config
crates/tirea-agentos/src/runtime/tests.rs