Skip to content
FunCoding

Search

Search docs, Skills and MCP

drive-desktop-app

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.

浏览器自动化1.2kskills/drive-desktop-app/SKILL.md

Install

Send this to Claude Code, Codex or Cursor. The agent checks the Skill for safety first and installs it only after you confirm.

读取 https://funcoding.ai/skills/reticlehq/reticle/drive-desktop-app/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

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 installed? RETICLE_INSTALL_SOURCE=npx_skill npx @reticlehq/server@latest init, then the install-and-verify skill.

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

The frontend is the same as any web app. The part people miss is that Tauri's default CSP blocks the bridge WebSocket before it opens, so the app runs perfectly and simply never connects:

{
  "app": {
    "security": {
      "csp": "default-src 'self' ipc: http://ipc.localhost; connect-src 'self' ipc: http://ipc.localhost ws://localhost:4400 ws://127.0.0.1:4400"
    }
  }
}

Keep ipc: http://ipc.localhost: Tauri v2 needs it for invoke itself. Dev-only; drop the ws:// entries from your release config.

IPC observation needs nothing on the Rust side: an invoke('load_todos') already reaches Reticle as ipc://load_todos. The reticle-tauri crate is only for screenshots and headless, and it is versioned independently of the npm packages.

Also: use a hash router. A packaged renderer is served from file://, where history-based routing does not resolve.

Verify

Same loop as the web, with IPC in the predicates:

reticle_act_and_wait({ sessionId, ref, action: "click", until: { kind: "allOf", predicates: [
  { kind: "net",     urlContains: "ipc://todos:archive", status: 200 },
  { kind: "element", query: { testid: "..." } },
  { kind: "console", level: "error", absent: true },
]}})

IPC has no status code. 200/500 are synthetic, mapped from whether the command succeeded, precisely so the same predicates keep working. On Tauri you will see status: 500 next to statusText: "OK". That is not a bug: the transport answered fine and the 500 is the command's own verdict. ok is authoritative.

reticle_look { action: "state" } reads the live store exactly as on the web. reticle_screenshot and reticle_visual_diff work once the platform's capture step is wired. Electron needs nothing extra; Tauri needs the crate. Headless on Tauri is RETICLE_HEADLESS=1, and screenshots keep working because the capture renders the webview rather than the screen.

What a missing observer looks like

A missing Electron preload is declared, not silent: verdicts come back with coverage: partial naming the line you did not add, instead of reading clean over a blind spot. If you see that, add the preload line before trusting anything.

If IPC calls never appear while the app works fine: on Electron, the shim's require is not first. On Tauri, invoke from @tauri-apps/api/core is observed, but a hand-rolled postMessage protocol is not.

Honesty

unknown is not a pass on the desktop either. And do not weaken an IPC assertion to make a red verdict green: a desktop false green is the exact failure this wiring exists to remove.


Full desktop reference: curl https://docs.reticle.sh/desktop.md. Everything else: curl https://docs.reticle.sh/llms.txt.

Similar Skills

webapp-testing
anthropics/skills180k

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

Browser automation

browser-testing-with-devtools
addyosmani/agent-skills103k

browser-testing-with-devtools

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

Browser automation

webapp-testing
ComposioHQ/awesome-claude-skills77k

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

Browser automation

browser
code-yeongyu/oh-my-openagent70k

browser

Drives a real browser through the omowright library from the js eval kernel: sites the user is already signed into, forms and clicks, JS-rendered pages, screenshots, web QA, extension popups, a human handoff for login, CAPTCHA or OTP, and a browser you own for scraping, bot-scored targets, network capture and QA traces. Use for any interactive browser task; not for a plain search or an unblocked static fetch.

Browser automation

agent-browser
shanraisshan/claude-code-best-practice67k

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

Browser automation

cherry-regression-test
CherryHQ/cherry-studio52k

cherry-regression-test

Run Cherry Studio critical-path system regression tasks through the repository-owned Playwright E2E workflow. Use for full regression, release acceptance, development-branch system validation, or a named cherry-regression-test task on GitHub-hosted macOS and Windows runners.

Browser automation