Skip to main content

Overview

Methods

getSkills()

Get all skills with optional filtering.
Example:
Search skills using TF-IDF text matching.
Example:

loadSkill()

Load skill content by ID/name with tool validation.
Example:

listSkills()

List skills with pagination support.
Example:

count()

Get total skill count.

findByName()

Find a skill by its base name.

findByQualifiedName()

Find a skill by its fully qualified name.

getInlineSkills()

Get skills defined inline (local only).

validateAllTools()

Validate all skills’ tool references against the ToolRegistry.
Example:

subscribe()

Subscribe to skill change events.
Returns: Unsubscribe function.

getCapabilities()

Get MCP capabilities for skills.

hasAny()

Check if any skills exist.

adoptFromChild()

Adopt skills from a child registry.
When a child’s skill is removed, the adopting registry stops serving it at once, including from its storage provider.

registerSkillContent()

Register a skill at runtime from a fully resolved SkillContent. Registering again with the same id replaces the skill.
RegisteredSkillContent: A skill whose id is another skill’s skill:// path, or whose path is another skill’s id, is refused with INVALID_PARAMS and nothing changes, since skill://<id>/SKILL.md would serve one for the other. The check covers every registry that serves this one’s skills: the registries that adopt it, and their other children. A change that registers its new skills before removing the old ones, such as a skill bundle sync, names the old ones in supersedes, so a new skill can take the name of one it drops or renames. A superseded skill the new one collides with is removed in the same step, so the two are never served together, and is listed in removed. The other superseded skills stay registered until the caller registers them again or unregisters them. Example:

unregisterSkill()

Remove a skill registered with registerSkillContent(). Returns false when no such skill is registered.
The skill leaves the registry at once. If the storage provider fails to remove its copy, the registry still stops serving it from search(), listSkills(), count() and loadSkill().

External Storage

Skills can be synced to external storage for persistence:

setExternalProvider()

Configure an external storage provider.

syncToExternal()

Sync local skills to external storage.
Example:

hasExternalProvider()

Check if external provider is configured.

getExternalProvider()

Get the configured external provider.

Change Events

SkillEntry Accessors

Each skill in the registry is a SkillEntry with these accessor methods:

Skill Visibility

Skills can have different visibility modes:

Tool Validation

Skills can reference tools that must exist in the registry:
Validation modes:
  • strict: Fail if any tool is missing
  • warn: Log warning for missing tools
  • ignore: Skip validation