The emergent tool to export.
Base directory where the skill subdirectory will be created.
Absolute path to the written SKILL.md file.
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 SKILL.md. Nothing is written.
If the filesystem write fails (permissions, disk full, etc.).
const skillPath = await writeSkillFile(myTool, '/home/user/.wunderland/capabilities');
// => "/home/user/.wunderland/capabilities/my-tool/SKILL.md"
Writes a SKILL.md file to disk for an emergent tool.
Creates the output directory if it does not exist. The file is written to
<outputDir>/<tool.name>/SKILL.md. The tool's name must be a safe folder name and its folder must resolve insideoutputDir, and belowoutputDirthe file is written through no link and only into a regular file; otherwise nothing is written.