Skill Structure
Directory Layout
SKILL.md Format
TheSKILL.md file has two parts:
1. YAML Frontmatter (Required)
string
required
Skill identifier (max 64 characters). Should match the directory name.
string
required
Brief description (max 1024 characters) shown in the skills list. The AI uses this to decide when to activate the skill.
2. Markdown Body (Instructions)
The body contains detailed instructions and examples for the AI:Writing Effective Instructions
Be Specific and Concrete
✅ Good
❌ Bad
Provide Examples
Include 2-3 concrete examples:Specify File Paths
Use relative paths in instructions:The AI will automatically resolve relative paths to absolute paths when executing commands.
Example: Cryptocurrency Skill
Here’s a complete example:SKILL.md
scripts/crypto.py
Best Practices
1. Clear description
1. Clear description
Write a concise description that helps the AI decide when to use the skill:✅ Good: “Get real-time cryptocurrency prices and market data. Use when users ask about crypto prices, market cap, or trading volume.”❌ Bad: “Crypto skill”
2. Step-by-step instructions
2. Step-by-step instructions
Provide numbered steps the AI can follow:Example:
- Load the skill file
- Extract the required parameters
- Run the script with parameters
- Parse the output
- Format the response
3. Command syntax
3. Command syntax
Show exact command syntax:✅ Good:
python3 scripts/tool.py --param value❌ Bad: “Run the tool with parameters”4. Response format
4. Response format
Specify how to format responses:Example Response Format:Format the price as: ” (): $ USD”Example: “Bitcoin (BTC): $45,234.56 USD”
5. Error handling
5. Error handling
Explain what to do when things go wrong:Error Handling Example:If script exits with error:
- Check the error message in stderr
- Verify input parameters
- Inform user if service is unavailable
Testing Your Skill
1
Test scripts independently
Run your scripts manually to ensure they work. Navigate to the skill directory and execute the script with test input.
2
Install the skill
Copy to skills directory and call the reload_skills service to register it.
3
Enable in Options
Go to Voice Assistants > Options and enable your skill from the list.
4
Test with AI
Ask questions that should trigger the skill. Check logs to verify the skill is loaded, commands are executed, and output is parsed correctly.
Common Patterns
Pattern 1: Simple Script
Pattern 2: API Integration
Pattern 3: Reference Data
Contributing Skills
To share your skill with the community:1
Create your skill
Follow the structure and best practices above
2
Test thoroughly
Test with various user queries and edge cases
3
Document clearly
Include clear description and usage examples
4
Submit pull request
Submit to
examples/skills/ in the repositoryDebugging
Enable debug logging:- Skill loading and initialization
- File reads (
load_skillcalls) - Script execution and output
- Error messages
Security Considerations
Next Steps
Skills Overview
Back to skills overview
Functions
Skills work with functions
Examples
Browse skill examples
GitHub Repository
View source code