GitHub

/desktop-integration

Desktop Integration

One instance, no lost work on quit, badges, progress, notifications and updates that don't interrupt.

npx skills@latest add agmmnn/desktop-feel --skill desktop-integration

Tauri, Electron · 10 rules · Updated November 28, 2026

What it does

  • Double-clicking the app icon opens a second copy. Single instance, focus the running window DI-01
  • A link or opened file starts a new app on Windows/Linux. Route arguments to the running instance DI-02
  • Quitting loses unsaved changes. One unsaved-changes check for close and quit DI-03
  • Unread count only visible inside the window. Dock/taskbar badge DI-04
  • Export progress hidden when the window is in the background. Taskbar/dock progress DI-05
  • Can't drag a file from the app to the desktop. Native drag out DI-06
  • Toasts nobody sees, or notifications while the app is in front. Native notifications in the background only DI-07
  • Window title says the app name, not the document. Document title and edited state DI-08
  • App starts at login without being asked. Launch at login is opt-in DI-09
  • Update dialog interrupts work, or the app restarts by itself. Updates wait for the user DI-10

When to use it

When the app doesn't act like a real app around launching, closing, files, notifications or updates.

Example prompts

You don’t need special wording. Describe the problem the way you’d describe it to a teammate.

  • /desktop-integration opening the app twice gives me two windows
  • /desktop-integration ⌘Q quits even with unsaved changes
  • /desktop-integration add auto-updates

Rules

Each rule has a stable ID. Review and audit output link back here.

DI-01Second launch focuses the running window

Without a single-instance guard, every launch starts a new process with its own window and its own state. Two copies then fight over the same files and settings. Register a single-instance handler first, and in it restore and focus the main window: unminimize, show, focus — a minimized or hidden window must come back too.

Look for
no single-instance plugin
Verify on
each OS
Severity
High

DI-02Deep links and opened files reach the running instance

On macOS the OS delivers URLs and opened files to the running app. On Windows and Linux they arrive as command-line arguments to a new process. Without forwarding, clicking myapp://… or double-clicking an associated file launches a second copy (DI-01) or is ignored.

Look for
deep-link without the single-instance deep-link feature; fileAssociations with no argument handling
Verify on
WindowsLinux
Severity
Medium

DI-03Unsaved changes survive close and quit

Closing a window with unsaved changes must ask: Save, Don't Save, Cancel (macOS order and labels; follow PC-01 on Windows). Quitting the app must ask for every dirty window.

Look for
dirty state with no onCloseRequested; predefined Quit item in an app with unsaved state
Verify on
each OS
Severity
High

DI-04Pending items on the dock/taskbar badge

When the app has something waiting for the user (unread messages, items to review), show a count on the dock icon (macOS), launcher entry (Linux, where supported) or a taskbar overlay icon (Windows). Clear it when the count is zero. Only counts the user acts on — not "new things happened". A failed export the user must retry counts; a finished one doesn't.

Look for
unread/pending counts only rendered in the UI
Verify on
each OS
Severity
Low

DI-05Long work shows on the taskbar/dock

An export, sync or download that takes more than a few seconds should show progress on the taskbar button (Windows) or dock (macOS, Linux where supported), so the user can switch away and still see it. Use an indeterminate state when progress is unknown, an error state when it fails, and clear it when done.

Look for
long exports/syncs with no setProgressBar
Verify on
WindowsmacOS
Severity
Low

DI-06Files can be dragged out

If the app shows files (attachments, exports, assets), users expect to drag them to the desktop or another app. An HTML drag carries a URL or text, not a file. Start a native drag with the file's path and an icon. For files that don't exist on disk yet, write them to a temporary location first, or use file promises on macOS.

Look for
file lists with HTML draggable only, no native drag
Verify on
each OS
Severity
Low

DI-07Native notifications, in the background only

When the window is focused, use in-app feedback (toast, inline state). When the app is in the background or minimized, use a native notification for things the user asked to be told about. Ask for notification permission the first time the user turns on something that needs it ("Notify me when the export finishes"), not on launch. Clicking a notification focuses the app on the related item.

Look for
requestPermission at startup; sendNotification without a focus check
Verify on
each OS
Severity
Medium

DI-08Document windows show the document

In a document-based app the window title is the document's name, not the app's name, and the edited state is visible.

Look for
document app with a static window title
Verify on
each OS
Severity
Low

DI-09Launch at login is opt-in

Starting at login is the user's decision, made in Settings ("Open at login"), off by default. Turning it on silently at first launch is the fastest way to be uninstalled. Reflect the real OS state in the toggle; the user may have removed the login item in System Settings.

Look for
autostart enable() outside a settings toggle
Verify on
each OS
Severity
Medium

DI-10Updates wait for the user

Check for updates in the background. Download quietly or after a single consent. Then offer "Restart to update" in a non-modal way (a menu item, a small banner) and apply it when the user chooses or at the next launch. Never restart while there are unsaved changes (DI-03), never show a modal update dialog over work, and never ask again on every launch after "Later".

Look for
install() / relaunch() without user action; modal update prompt
Verify on
each OS
Severity
Medium

Read the full skill on GitHub