addSkillDirectory

View as MarkdownOpen in Claude

Register an external directory containing skill subdirectories. The path is validated (it must exist and be a directory) and de-duplicated before being added. This is the recommended, strict entry point for registering third-party skill directories.

Unlike addSearchPath(), which silently accepts any path, addSkillDirectory() throws on an invalid path. Retrieve registered directories with getExternalPaths().

Parameters

path
stringRequired

Absolute or relative path to a directory containing skill subdirectories.

Returns

void — Throws an Error when the path doesn’t exist or isn’t a directory.