The emergent tool to export.
Base directory where the skill subdirectory will be created.
Absolute paths to the written SKILL.md and CAPABILITY.yaml files.
If the tool's name is not a safe folder name
or its folder would lie outside outputDir. Nothing is written.
If a link, a second name or anything but a regular file is at the tool's folder or at either file. Nothing is written.
If the filesystem writes fail (permissions, disk full, etc.).
const { skillPath, capabilityPath } = await exportToolAsSkillPack(
myTool,
'/home/user/.wunderland/capabilities',
);
// skillPath => "/home/user/.wunderland/capabilities/my-tool/SKILL.md"
// capabilityPath => "/home/user/.wunderland/capabilities/my-tool/CAPABILITY.yaml"
Exports an emergent tool as a full skill pack (SKILL.md + CAPABILITY.yaml).
Creates a directory named after the tool under
outputDir, containing both files. This directory structure is compatible with the capability manifest scanner and can be placed in any scan directory (~/.wunderland/capabilities/,./.wunderland/capabilities/, etc.) for automatic discovery. The tool's name must be a safe folder name and its folder must resolve insideoutputDir, and belowoutputDirthe files are written through no link and only into regular files; otherwise nothing is written.