Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate system tray and context menu configurations with platform-specific icons, menu templates, and event handling
.claude/skills/a5c-ai-electron-tray-menu-builder/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 71 |
| gemini-3.1-pro-preview | 100% | 1 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 42% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 66% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 64% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 52% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 56% | 0% |
Generate system tray and context menu configurations for Electron applications. This skill handles platform-specific icon requirements, menu template creation, and tray event handling across Windows, macOS, and Linux.
json{ "type": "object", "properties": { "projectPath": { "type": "string", "description": "Path to the Electron project root" }, "menuStructure": { "type": "array", "description": "Menu item definitions", "items": { "type": "object", "properties": { "label": { "type": "string" }, "type": { "enum": ["normal", "separator", "submenu", "checkbox", "radio"] }, "accelerator": { "type": "string" }, "enabled": { "type": "boolean" }, "visible": { "type": "boolean" }, "click": { "type": "string", "description": "Handler function name" }, "submenu": { "type": "array" } } } }, "iconPaths": { "type": "object", "properties": { "default": { "type": "string" }, "pressed": { "type": "string" }, "highlighted": { "type": "string" } } }, "features": { "type": "array", "items": { "enum": ["tooltip", "balloon", "click-handler", "double-click", "context-menu", "dynamic-update"] } }, "targetPlatforms": { "type": "array", "items": { "enum": ["win32", "darwin", "linux"] } } }, "required": ["projectPath", "menuStructure"] }
json{ "type": "object", "properties": { "success": { "type": "boolean" }, "files": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "description": { "type": "string" } } } }, "iconRequirements": { "type": "object", "description": "Required icon files per platform" }, "warnings": { "type": "array", "items": { "type": "string" } } }, "required": ["success"] }
javascript// tray-manager.js const { app, Tray, Menu, nativeImage } = require('electron'); const path = require('path'); class TrayManager { constructor(mainWindow) { this.mainWindow = mainWindow; this.tray = null; } create() { const iconPath = this.getIconPath(); this.tray = new Tray(iconPath); this.tray.setToolTip('My Application'); this.tray.setContextMenu(this.buildMenu()); // Platform-specific behavior if (process.platform === 'win32') { this.tray.on('double-click', () => this.showWindow()); } else if (process.platform === 'darwin') { this.tray.on('click', () => this.toggleWindow()); } } getIconPath() { const iconName = process.platform === 'win32' ? 'tray.ico' : process.platform === 'darwin' ? 'trayTemplate.png' // Template image for macOS : 'tray.png'; return path.join(__dirname, '../assets/icons', iconName); } buildMenu() { const template = [ { label: 'Show App', click: () => this.showWindow() }, { type: 'separator' }, { label: 'Status', submenu: [ { label: 'Online', type: 'radio', checked: true }, { label: 'Away', type: 'radio' }, { label: 'Busy', type: 'radio' } ] }, { type: 'separator' }, { label: 'Quit', accelerator: process.platform === 'darwin' ? 'Cmd+Q' : 'Ctrl+Q', click: () => app.quit() } ]; return Menu.buildFromTemplate(template); } showWindow() { if (this.mainWindow) { this.mainWindow.show(); this.mainWindow.focus(); } } toggleWindow() { if (this.mainWindow.isVisible()) { this.mainWindow.hide(); } else { this.showWindow(); } } updateMenu(newTemplate) { this.tray.setContextMenu(Menu.buildFromTemplate(newTemplate)); } setIcon(iconPath) { this.tray.setImage(iconPath); } destroy() { if (this.tray) { this.tray.destroy(); this.tray = null; } } } module.exports = TrayManager;
javascript// For macOS dark/light mode support const icon = nativeImage.createFromPath('trayTemplate.png'); icon.setTemplateImage(true);
assets/icons/
├── tray.ico # Windows (multi-resolution)
├── trayTemplate.png # macOS @1x (16x16 or 22x22)
├── trayTemplate@2x.png # macOS @2x
├── tray.png # Linux (24x24 or 22x22)
└── tray-active.png # State variantelectron-builder-config - Include tray icons in buildnative-notification-builder - Notifications from trayappkit-menu-bar-builder - macOS native menu bar appselectron-architect - Architecture guidanceplatform-convention-advisor - Platform UI conventions| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 9,437 | 4,990 | -47% | 1 | 1 | 0% | 1,688 | 2,810 | +66% | 0 | 0 | — |
case-02 | pass→pass | 8,616 | 4,326 | -50% | 1 | 1 | 0% | 1,606 | 2,635 | +64% | 0 | 0 | — |
case-03 | pass→pass | 9,885 | 7,242 | -27% | 1 | 1 | 0% | 2,143 | 3,256 | +52% | 0 | 0 | — |
case-04 | pass→pass | 11,889 | 8,856 | -26% | 1 | 1 | 0% | 2,369 | 3,700 | +56% | 0 | 0 | — |
case-05 | pass→pass | 4,835 | 4,615 | -5% | 1 | 1 | 0% | 890 | 2,754 | +209% | 0 | 0 | — |
case-06 | pass→pass | 6,080 | 5,498 | -10% | 1 | 1 | 0% | 1,036 | 2,784 | +169% | 0 | 0 | — |
case-07 | pass→pass | 4,929 | 3,642 | -26% | 1 | 1 | 0% | 521 | 2,505 | +381% | 0 | 0 | — |
case-08 | pass→pass | 3,564 | 3,767 | +6% | 1 | 1 | 0% | 605 | 2,406 | +298% | 0 | 0 | — |
case-09 | pass→pass | 6,326 | 3,697 | -42% | 1 | 1 | 0% | 1,090 | 2,567 | +136% | 0 | 0 | — |
case-10 | pass→pass | 3,263 | 2,828 | -13% | 1 | 1 | 0% | 562 | 2,377 | +323% | 0 | 0 | — |
case-11 | pass→pass | 12,308 | 7,227 | -41% | 1 | 1 | 0% | 2,078 | 3,176 | +53% | 0 | 0 | — |
case-12 | pass→pass | 2,968 | 3,579 | +21% | 1 | 1 | 0% | 544 | 2,442 | +349% | 0 | 0 | — |
case-13 | pass→pass | 12,247 | 8,991 | -27% | 1 | 1 | 0% | 2,290 | 3,629 | +58% | 0 | 0 | — |
case-14 | pass→pass | 10,851 | 7,057 | -35% | 1 | 1 | 0% | 2,028 | 3,080 | +52% | 0 | 0 | — |
case-15 | pass→pass | 4,211 | 3,036 | -28% | 1 | 1 | 0% | 782 | 2,359 | +202% | 0 | 0 | — |
case-16 | pass→pass | 4,858 | 4,970 | +2% | 1 | 1 | 0% | 547 | 2,776 | +407% | 0 | 0 | — |
case-17 | pass→pass | 5,523 | 5,014 | -9% | 1 | 1 | 0% | 998 | 2,516 | +152% | 0 | 0 | — |
case-18 | fail→pass | 16,170 | 8,370 | -48% | 1 | 1 | 0% | 2,422 | 3,447 | +42% | 0 | 0 | — |
case-19 | pass→pass | 3,212 | 2,639 | -18% | 1 | 1 | 0% | 557 | 2,375 | +326% | 0 | 0 | — |
case-20 | pass→pass | 9,579 | 7,334 | -23% | 1 | 1 | 0% | 1,917 | 3,357 | +75% | 0 | 0 | — |
case-21 | pass→pass | 9,442 | 5,025 | -47% | 1 | 1 | 0% | 1,558 | 2,763 | +77% | 0 | 0 | — |
case-22 | pass→pass | 9,725 | 5,856 | -40% | 1 | 1 | 0% | 2,194 | 3,046 | +39% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.