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

1import { SkillRegistry, SkillBase } from '@signalwire/sdk';
2
3class MySkill extends SkillBase {
4 static override SKILL_NAME = 'my-skill';
5 // ...
6}
7
8SkillRegistry.getInstance().register(MySkill);