register

View as MarkdownOpen in Claude

Register a skill class. The skill name is read from the class’s static SKILL_NAME. The registry validates that SKILL_NAME is non-empty and that getParameterSchema() returns a non-empty object before registering.

Parameters

SkillClass
typeof SkillBaseRequired

A concrete subclass of SkillBase with a non-empty static SKILL_NAME and a non-empty getParameterSchema() return value.

Returns

void

Throws

  • Error if the class has no SKILL_NAME.
  • Error if getParameterSchema() throws or returns an empty object.

Locked skill names (see lock) are skipped with a warning rather than throwing.

Example

import { SkillRegistry, SkillBase } from '@signalwire/sdk';
class MySkill extends SkillBase {
static override SKILL_NAME = 'my-skill';
// ...
}
SkillRegistry.getInstance().register(MySkill);