getSkillClass

View as MarkdownOpen in Claude

Look up a registered skill class by its SKILL_NAME. Returns the class reference itself (not an instance); use create() to get an instance. Returns undefined if no skill is registered under that name — for a boolean check use has().

Matches Python’s get_skill_class(skill_name) (registry.py:196-203).

Parameters

name
stringRequired

The registered skill name (the skill class’s static SKILL_NAME).

Returns

typeof SkillBase | undefined — the skill class, or undefined if not registered.

Example

1import { SkillRegistry } from '@signalwire/sdk';
2
3const registry = SkillRegistry.getInstance();
4
5const WeatherSkill = registry.getSkillClass('weather');
6if (WeatherSkill) {
7 console.log(WeatherSkill.SKILL_DESCRIPTION);
8 console.log(WeatherSkill.REQUIRED_ENV_VARS);
9}