Skills

Drive Desktop App

Drive and verify an Electron or Tauri desktop app from the inside, including the...

Install

npx skills add reticlehq/reticle --skill drive-desktop-app -g -a claude-code -y
Repository
reticlehq/reticle1.3k
Category
Design
Updated
3d ago
License
Apache-2.0
Context cost
Lightabout 1,161 tokens
Runs scripts
No, instructions only

What it does

Drive and verify an Electron or Tauri desktop app from the inside, including the main-process and Rust IPC calls a browser tool cannot see. Use when a desktop app needs testing, when a feature works in the browser but not in the packaged app, when an IPC or invoke call needs proving, when a desktop screenshot or visual diff is wanted, or when you need a headless run of a desktop UI in CI.

Drive a desktop app and prove what happened

A desktop app reaches its backend over IPC, not HTTP. Patching fetch/XHR cannot see that, so a browser-shaped tool is blind to every backend call the app makes: the network log reads empty, an action has no in-flight request to settle on, and asserting on the network is vacuously true. That is a false green by construction.

Reticle observes the renderer and the IPC boundary, so a desktop verdict means what a web one does. Not set up? Follow the reticle skill: it installs Reticle, asks the user before init changes the app's files, and proves one flow.

Electron: two lines, none in your app code

// vite.config.ts, desktop:true lets connect() start in a packaged renderer (NODE_ENV=production).
// A default (production-mode) `vite build` ships no Reticle code; to drive a packaged
// renderer with no dev server, build it with `vite build --mode development`
export default defineConfig({
  base: './', // file:// needs relative asset paths
  plugins: [react(), reticle({ desktop: true })],
});
// electron/preload.cjs, FIRST line. This is what makes main-process IPC visible.
require('@reticlehq/electron/preload');

It must be in the preload and it must be first. contextBridge.exposeInMainWorld hands the renderer a deeply frozen object, so nothing in the page can instrument it afterwards. The preload is the last point where ipcRenderer.invoke is still writable, and the shim has to run before your preload captures its own reference.

A sandboxed preload cannot resolve node_modules, so the bare require fails. Either bundle the preload (electron-vite and Forge do by default) or set sandbox: false.

Tauri: the CSP step is required and its failure is silent

Read the whole SKILL.md on GitHub

More in Design