Expand description
§thulp-skill-files
SKILL.md file parsing and loading for the Thulp execution context platform.
This crate provides functionality for:
- Parsing SKILL.md files with YAML frontmatter
- Preprocessing skill content (arguments, commands, variables)
- Loading skills from directories with scope-based priority
§Quick Start
ⓘ
use thulp_skill_files::{SkillFile, SkillLoader, SkillLoaderConfig, SkillPreprocessor};
use std::collections::HashMap;
// Parse a single skill file
let skill = SkillFile::parse("path/to/SKILL.md")?;
println!("Skill: {}", skill.effective_name());
// Load all skills from configured directories
let config = SkillLoaderConfig::default();
let loader = SkillLoader::new(config);
let skills = loader.load_all()?;
// Preprocess skill content
let pp = SkillPreprocessor::new();
let context = HashMap::new();
let processed = pp.preprocess(&skill.content, "my args", &context)?;§SKILL.md Format
Skills are defined in SKILL.md files with optional YAML frontmatter:
---
name: my-skill
description: Does something useful
allowed-tools:
- Read
- Write
---
# Instructions
When invoked with $ARGUMENTS, do the following...§Frontmatter Options
| Field | Type | Description |
|---|---|---|
name | string | Display name (defaults to directory name) |
description | string | What the skill does |
argument-hint | string | Hint for expected arguments |
disable-model-invocation | bool | Prevent automatic invocation |
user-invocable | bool | Allow user to invoke (default: true) |
allowed-tools | list | Restrict tools the skill can use |
context | inline/fork | Execution context |
requires-approval | bool | Require user approval |
§Scope Priority
Skills are loaded with priority: Enterprise > Personal > Project. Plugin skills are namespaced and don’t conflict.
Re-exports§
pub use error::Result;pub use error::SkillFileError;pub use frontmatter::PriceModel;pub use frontmatter::SkillContext;pub use frontmatter::SkillFrontmatter;pub use frontmatter::SkillHooks;pub use loader::LoadedSkill;pub use loader::SkillLoader;pub use loader::SkillLoaderConfig;pub use loader::SkillScope;pub use parser::SkillFile;pub use parser::SupportingFile;pub use parser::SupportingFileType;pub use preprocessor::SkillPreprocessor;
Modules§
- error
- Error types for skill file operations.
- frontmatter
- YAML frontmatter types for SKILL.md files.
- loader
- Skill loader and directory scanner.
- parser
- SKILL.md file parser.
- preprocessor
- Preprocessor for skill content.