skills/electron-build-deploy/SKILL.md
Build and deploy Electron app before Playwright verification so tests run against newly-built code. Triggered by test-flow when buildDeploy is configured. Triggers on: electron build, electron deploy, desktop app build, build before test.
npx skillsauth add mdmagnuson-creator/yo-go electron-build-deployInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Trigger: test-flow Step 3.5 detects
apps.desktop.buildDeployinproject.jsonPurpose: Build the Electron app, deploy to the test app location, and relaunch — so Playwright verifies newly-built code, not stale code.
test-flow loads this skill at Step 3.5 when ALL of these are true:
project.json has apps.desktop.buildDeploy configuredbuildDeploy.triggerPathsRead these fields from project.json → apps.desktop.buildDeploy:
| Field | Example | Description |
|-------|---------|-------------|
| buildCommand | "pnpm build" | Command to build the Electron app |
| buildOutputApp | "apps/desktop/dist/mac-universal/Helm.app" | Path to the built .app bundle (relative to project root) |
| testApp | "/Applications/Helm Preview.app" | Absolute path to the installed test app |
| buildTimeoutMs | 300000 | Build timeout in ms (default: 5 minutes) |
| autoDeployAfterStory | true | Whether to auto-deploy (default: true) |
| triggerPaths | ["apps/desktop/electron/**"] | Glob patterns — if changed files match, rebuild is needed |
⛔ CRITICAL: Execute ALL steps in order. Do NOT skip any step. Builder has a pattern of skipping deploy/relaunch steps. This skill exists specifically to prevent that. Every step below is REQUIRED. Skipping any step means Playwright tests verify stale code.
🔨 Building Electron app...
Build command: {buildCommand}
Timeout: {buildTimeoutMs / 1000}s
{buildCommand}
buildTimeoutMs (default 300000ms / 5 minutes)⛔ Do NOT skip this step. The
.appbundle cannot be overwritten while the process is running.
Derive the process name from the testApp path (strip /Applications/ and .app):
killall "{processName}" 2>/dev/null || true
Example: testApp: "/Applications/Helm Preview.app" → killall "Helm Preview"
|| true because the app may not be running — that's finesleep 2
⛔ Do NOT skip this step. Without this copy, the installed app still has the old code.
cp -R "{buildOutputApp}/." "{testApp}/"
/. to copy the contents of the bundle, not the bundle itselfVerify the copy succeeded:
ls -la "{testApp}/Contents/MacOS/"
⛔ Do NOT skip this step. Playwright-Electron launches the installed app. If it's not running or was just killed, Playwright needs a fresh instance.
open "{testApp}"
sleep 3
✅ Electron build-deploy complete
Built: {buildOutputApp}
Deployed to: {testApp}
Build time: {elapsed}s
Status: Ready for Playwright verification
| Error | Action |
|-------|--------|
| Build command fails (non-zero exit) | STOP. Report build error with full output. Return failure to test-flow. |
| Build times out | STOP. Report timeout. Return failure to test-flow. |
| killall fails | Ignore (app may not be running). Continue to Step 4. |
| cp -R fails | STOP. Report copy error (permissions? disk space?). Return failure to test-flow. |
| open fails | STOP. Report launch error. Return failure to test-flow. |
Report back to test-flow:
| Result | test-flow behavior | |--------|-------------------| | Success | Proceed to Playwright verification | | Failure | Treat as test-flow failure. Enter fix loop (max 3 attempts). | | Skipped (no trigger paths matched) | Proceed to Playwright — no rebuild needed |
data-ai
Generate verification contracts before delegating tasks to sub-agents, defining how success will be measured. Triggers on: verification contract, delegation contract, task verification, contract-first delegation.
testing
Verify that Vercel environment variables point to the correct Supabase project for each environment to prevent staging/production cross-wiring. Triggers on: vercel supabase check, environment alignment, env var check, supabase environment.
development
Manage codebase and database vectorization for semantic search. Use when initializing, refreshing, or querying the vector index. Triggers on: vectorize init, vectorize refresh, vectorize search, semantic search, vector index, enable vectorization.
testing
Patterns for XCUITest UI tests for native Apple apps (macOS/iOS). Use when writing or reviewing XCUITest tests for Swift apps. Triggers on: XCUITest, xcuitest, native app testing, Apple UI tests, SwiftUI tests, AppKit tests, UIKit tests.