Function writeSkillFile

  • 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.

    Parameters

    • tool: EmergentTool

      The emergent tool to export.

    • outputDir: string

      Base directory where the skill subdirectory will be created.

    Returns Promise<string>

    Absolute path to the written SKILL.md file.

    Throws

    If the filesystem write fails (permissions, disk full, etc.).

    Example

    const skillPath = await writeSkillFile(myTool, '/home/user/.wunderland/capabilities');
    // => "/home/user/.wunderland/capabilities/my-tool/SKILL.md"