Skip to content
Back to skills

Native Menus

ASecurity

Native menus for web-built desktop apps (Tauri, Electron) — the macOS app menu, the Edit menu without which ⌘C/⌘V/⌘A stop working in the web view, native vs web context menus, destructive item placement, accelerators that match their handlers, and macOS template tray icons. Use when adding or changing an app menu, when copy/paste stops working after a menu change, when adding right-click menus, or when adding a tray icon.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
designjavascriptgojavashellnodeapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add agmmnn/desktop-feel --skill native-menus --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Native Menus?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Native Menus
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agmmnn-native-menus/badge)](https://www.skillsdirectory.com/skills/agmmnn-native-menus)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: native-menus
description: Native menus for web-built desktop apps (Tauri, Electron) — the macOS app menu, the Edit menu without which ⌘C/⌘V/⌘A stop working in the web view, native vs web context menus, destructive item placement, accelerators that match their handlers, and macOS template tray icons. Use when adding or changing an app menu, when copy/paste stops working after a menu change, when adding right-click menus, or when adding a tray icon.
---

# Native Menus

## Initial Response

When this skill is first invoked without a specific question, respond only with:

> Ready to work on menus. Tell me whether this is the app menu, a context menu or the tray.

## Hard Rules

1. **Replacing the menu replaces the Edit menu.** On macOS, Cut/Copy/Paste/Select All/Undo reach the web view through the Edit menu's items. A custom menu without them silently breaks those shortcuts.
2. **Use predefined items for standard actions.** They get the OS label, shortcut, localization and enabling for free.
3. **One owner per shortcut.** If a menu item has an accelerator, the menu handles it; don't also listen for the key in JavaScript.
4. **Shell code in [TAURI.md](TAURI.md).** Read it when `src-tauri/` exists. If the project uses Electron (an `electron` dependency, a main-process file that creates `BrowserWindow`), there is no ELECTRON.md yet: apply the shell-agnostic fixes in this file, and for shell-level fixes use only Electron APIs you can confirm against the installed version: its type definitions (`node_modules/electron/electron.d.ts`) first, then its docs. Name the version you checked, and mark anything you couldn't confirm as verify in the output. In Electron, a missing app menu means Electron's default menu, which includes Reload and Toggle Developer Tools.

## The Symptom Table

| Problem | Solution | Rule |
| --- | --- | --- |
| ⌘C / ⌘V / ⌘A stopped working | Edit menu with predefined items | NM-01 |
| No About, Settings, Hide or Quit on macOS | Standard app menu | NM-02 |
| Right-click menus look different across the app | One context menu strategy | NM-03 |
| "Delete" sits between "Rename" and "Duplicate" | Destructive items last | NM-04 |
| Menu says ⌘K, the app listens for ⌘J | Accelerator is the handler | NM-05 |
| Colored tray icon on the macOS menu bar | Template image | NM-06 |

## The Fixes

### NM-01 Keep the Edit menu

Every custom menu on macOS includes an Edit submenu with Undo, Redo, separator, Cut, Copy, Paste, Select All as predefined items. Verify on macOS: copy and paste in a text field after the change.

### NM-02 Standard macOS app menu

App menu (named after the app): About, separator, Settings… (⌘,), separator, Services, separator, Hide, Hide Others, Show All, separator, Quit. Then File, Edit, View, Window, Help as the app needs. Windows and Linux have no app menu; Settings goes in File or a visible control (PC-02).

### NM-03 Native or web context menus — decide once

| Use native | Use web (e.g. Radix ContextMenu) |
| --- | --- |
| Standard actions on files, text, list items | Rich content: color swatches, inputs, previews |
| OS look, accessibility and position handled by the OS | Identical look on every platform matters more |

Pick per kind of target and stay consistent. Text fields always keep the OS text menu (DN-06).

### NM-04 Destructive items last

Delete/Remove/Move to Trash go at the bottom, after a separator. Name the object ("Delete Project…"); add "…" when a confirmation follows.

### NM-05 Accelerators match handlers

Register the shortcut once, on the menu item, and route its click to the same command the UI button calls. Labels then match behavior by construction.

### NM-06 macOS tray icons are templates

Menu bar icons on macOS are monochrome template images that the OS tints for light/dark and highlight. A colored icon looks foreign. Provide a black-on-transparent 16–18pt icon (with @2x) and mark it as a template.

## Never Ship

| Never | Instead |
| --- | --- |
| A custom macOS menu without Edit items | Predefined Edit items |
| Custom labels for Copy/Paste/Quit | Predefined items |
| The same shortcut in the menu and in a keydown handler | Menu owns it |
| Colored macOS tray icon | Template image |

## Output

| Rule | File | Change | Verified |
| --- | --- | --- | --- |

Menus need the running app on each OS; list what to click.

Files in this skill

  • SKILL.md4.3 KB
  • TAURI.md2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in design →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.