How Skills Work
Skill Structure
Skills are defined in YAML files with comprehensive metadata:Skill API Endpoints
List All Skills
Get Skill Details
Get Skill Documentation
Creating Skills
1. Create Skill File
Create a YAML file inskills/ directory:
2. Register Skill in Agent Config
3. Implement Skill Logic
Skills are executed through your agent’s handler function. The skill metadata is used for discovery and routing, while actual execution happens in your code.Skill Metadata Fields
Required Fields
skill_id- Unique identifier (e.g., “pdf-processing-v1”)name- Human-readable nameversion- Semantic version (e.g., “1.0.0”)description- Brief description of capability
Optional Fields
capabilities- List of specific capabilitiestags- Keywords for discoverydocumentation- Detailed markdown documentationinput_structure- JSON schema or exampleoutput_format- Expected output structureexamples- Usage examples with input/outputerror_handling- How errors are handledbest_practices- Guidelines for usersconstraints- Limitations and requirementsassessment- Metadata for negotiation
Assessment Metadata
Used by the negotiation system for intelligent agent selection:Best Practices
Skill Design
- Single responsibility - One skill, one capability
- Clear naming - Descriptive skill_id and name
- Versioning - Use semantic versioning
- Documentation - Provide examples and error handling
Input/Output
- Structured formats - Use JSON schemas
- Validation - Document required fields
- Error handling - Define error response format
- Examples - Include realistic use cases
Assessment
- Accurate keywords - Match actual capabilities
- Honest specializations - Don’t over-claim
- Clear anti-patterns - Prevent false matches
- Complexity indicators - Help with performance estimation
Example Skills
Seeexamples/skills/ directory for complete examples:
skills/question-answering/- Q&A capabilityskills/pdf-processing/- PDF document handlingskills/cbt-*/- Therapy protocol skills