Skill Base
SkillBase API
API reference for SkillBase, the abstract base class for creating custom agent skills.
Class Definition
Overview
Skills are modular, reusable capabilities that can be added to agents.
Features:
- Auto-discovered from skill directories
- Automatic dependency validation
- Configuration via parameters
- Can add tools, prompts, hints, and global data
Class Attributes
Class Attributes Reference
Constructor
Instance Attributes
Abstract Methods (Must Implement)
setup
Validate environment, initialize APIs, prepare resources.
register_tools
Register functions that the skill provides.
Helper Methods
define_tool
Register a tool with automatic swaig_fields merging.
validate_env_vars
Check if all required environment variables are set.
validate_packages
Check if all required Python packages are available.
Optional Override Methods
get_hints
get_global_data
get_prompt_sections
cleanup
get_instance_key
Parameter Schema
get_parameter_schema
Define configuration parameters:
Parameter Schema Fields
Complete Skill Example
Using Skills
Skill Directory Structure
signalwire_agents/skills
weather
__init__.py
skill.py# WeatherSkill class
requirements.txt# Skill-specific dependencies
calendar