Expand description
Skills — load AgentSkills-compatible skill directories and inject into system prompts.
Follows the AgentSkills open standard.
Skills are directories containing a SKILL.md file with YAML frontmatter.
§Progressive Disclosure
- Metadata (~100 tokens/skill) — name + description, always in the system prompt
- Instructions (<5k tokens) — SKILL.md body, loaded by the agent when activated
- Resources (unlimited) — scripts/, references/, assets/, loaded on demand
The agent decides when to activate a skill based on the description. No trigger engine needed — the LLM is smart enough.
§Example
use phi_core::SkillSet;
let skills = SkillSet::load(&["./skills", "~/.phi-core/skills"]).unwrap();
println!("{}", skills.format_for_prompt());
// Inject into system prompt via Agent::with_skills()Structs§
Enums§
- Skill
Error - Errors during skill loading.