Skip to navigation

discoverFromDirectory

View as MarkdownOpen in Claude

Discover and register skills from a directory by importing each file. Imports every .ts and .js file in the directory (not .d.ts), and skill.ts (or skill.js when there’s no skill.ts) in each subdirectory. Requires SWML_SKILL_DISCOVERY_ENABLED=true to be set.

Parameters

dirPath
stringRequired

Absolute path to the directory to scan.

Returns

Promise<string[]> — Array of newly discovered skill names.