Matterway
    Preparing search index...

    Function getSkillIcon

    • Retrieves the skill icon as a base64 data URI string.

      For managed skills: reads from {assistantPath}/skills/managed/index.json and returns the iconPictureUrl for the matching skill identifier.

      For local skills: extracts icon.png from the skill zip file at {assistantPath}/skills/local/{skillName}.zip.

      Parameters

      • ctx: Context

        The skill context

      Returns Promise<string | undefined>

      Promise resolving to data URI string (e.g., data:image/png;base64,...) or undefined if not found

      Basic usage with headerBar (icon string is automatically rendered as image)

      const icon = await getSkillIcon(ctx);
      await showUI(ctx, bubble([
      headerBar({
      title: 'My Skill',
      icon: icon
      }),
      group([...])
      ]));

      With fallback icon

      const icon = await getSkillIcon(ctx);
      await showUI(ctx, bubble([
      headerBar({
      title: 'My Skill',
      icon: icon || '🔧'
      }),
      group([...])
      ]));