AgentsSkillBase

validate_packages

View as MarkdownOpen in Claude

Check whether all REQUIRED_PACKAGES can be imported.

Parameters

None.

Returns

bool — True if all required packages are available, False with error logging otherwise.

Example

from signalwire.core.skill_base import SkillBase
class MySkill(SkillBase):
SKILL_NAME = "my_skill"
SKILL_DESCRIPTION = "Example skill"
REQUIRED_PACKAGES = ["requests", "beautifulsoup4"]
REQUIRED_ENV_VARS = ["MY_API_KEY", "MY_SECRET"]
def setup(self) -> bool:
if not self.validate_packages():
return False
if not self.validate_env_vars():
return False
return True
def register_tools(self):
pass