Function exportToolAsSkillPack

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

    Parameters

    • tool: EmergentTool

      The emergent tool to export.

    • outputDir: string

      Base directory where the skill subdirectory will be created.

    Returns Promise<{
        skillPath: string;
        capabilityPath: string;
    }>

    Paths to the written SKILL.md and CAPABILITY.yaml files.

    Throws

    If the filesystem writes fail (permissions, disk full, etc.).

    Example

    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"