原生通知构建器Skill native-notification-builder

原生通知构建器是一个用于创建跨平台桌面应用通知的技能。它支持在Windows、macOS和Linux系统上构建功能丰富的原生通知,包括添加操作按钮、嵌入图像图标、显示进度条、配置提示音效等。关键词:桌面通知、跨平台开发、Electron通知、原生系统通知、Tauri通知、通知API、用户交互、桌面应用开发。

前端开发 0 次安装 0 次浏览 更新于 2/25/2026

name: native-notification-builder description: 构建跨平台的原生操作系统通知,支持操作按钮、图像和进度指示器 allowed-tools: Read, Write, Edit, Bash, Glob, Grep tags: [通知, 跨平台, 原生, 桌面, 用户界面]

原生通知构建器

在 Windows、macOS 和 Linux 平台上构建带有操作按钮、图像和进度指示器的原生操作系统通知。

功能

  • 创建基本通知
  • 添加操作按钮
  • 包含图像和应用图标
  • 显示进度指示器
  • 配置通知声音
  • 处理通知点击事件
  • 设置通知优先级
  • 配置通知分组

输入模式

{
  "type": "object",
  "properties": {
    "projectPath": { "type": "string" },
    "framework": { "enum": ["electron", "native", "tauri"] },
    "features": { "type": "array", "items": { "enum": ["actions", "images", "progress", "sounds"] } }
  },
  "required": ["projectPath"]
}

Electron 示例

const { Notification } = require('electron');

const notification = new Notification({
    title: '下载完成',
    body: '您的文件已下载完毕。',
    icon: '/path/to/icon.png',
    actions: [
        { type: 'button', text: '打开' },
        { type: 'button', text: '在文件夹中显示' }
    ]
});

notification.on('action', (event, index) => {
    if (index === 0) openFile();
    else showInFolder();
});

notification.show();

相关技能

  • electron-tray-menu-builder
  • system-services-integration 进程