Hot reloading allows you to update skills at runtime without restarting the FastSkill service. This feature is essential for development workflows where you need to iterate quickly on skill implementations.
Hot reloading is primarily intended for development environments. Consider disabling it in production for better performance and security.
# Edit the skill file and see changes immediately# skills/hello-world/SKILL.md - updated version---name: hello-worlddescription: A simple hello world skill with enhanced features---# Hello WorldThis skill greets users with enthusiasm!## Tools### say_helloSay hello with enthusiasm!**Parameters:**- `name` (string, optional): Name to greet (default: "World")**Returns:**- Greeting message### say_goodbyeSay goodbye to someone.**Parameters:**- `name` (string, optional): Name to say goodbye to (default: "World")**Returns:**- Goodbye message
The skill is automatically reloaded when you save the file!
New tools and updated functionality are available immediately.
use fastskill::{FastSkillService, ServiceConfig};use std::path::PathBuf;// Hot reload events are logged automatically when files change// Check service logs to see reload events#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> { let config = ServiceConfig { skill_storage_path: PathBuf::from("./skills"), enable_hot_reload: true, ..Default::default() }; let mut service = FastSkillService::new(config).await?; service.initialize().await?; println!("🔥 Hot reloading enabled - watch logs for reload events"); println!("📝 Edit skill files to see automatic reloading"); // Keep service running tokio::signal::ctrl_c().await?; service.shutdown().await?; Ok(())}
use fastskill::ServiceConfig;use std::path::PathBuf;// Production configuration - hot reload disabledlet config = ServiceConfig { skill_storage_path: PathBuf::from("./skills"), enable_hot_reload: false, // Disable for security and performance ..Default::default()};
# Use file watchers to run tests when skills change# Example with entr (Linux/Mac)find ./skills -name "*.md" | entr -c cargo test# Or use a simple watch scriptwhile inotifywait -e modify ./skills/**/*.md; do cargo testdone
Create separate skills for development with “dev-” prefix to avoid affecting production.
2
Test thoroughly
Run comprehensive tests after hot reload to ensure functionality still works.
3
Monitor performance
Keep an eye on reload times and memory usage during development.
4
Version control integration
Ensure hot reload changes are properly tracked in version control.
5
Disable in production
Always disable hot reload in production environments for security and performance.
Hot reloading dramatically improves development experience by eliminating the need to restart services. Use it during development but disable it in production environments.