Test Electron App
PostHog/posthog-foss
Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser.
Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser.
$ npx skills add PostHog/code --skill test-electron-app -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PostHog/code test-electron-app --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/test-electron-app .claude/skills/test-electron-app && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "test-electron-app" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-app into .claude/skills/test-electron-app/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-electron-app", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-appType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PostHog/code --skill test-electron-app -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PostHog/code test-electron-app --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/test-electron-app .agents/skills/test-electron-app && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "test-electron-app" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-app into .agents/skills/test-electron-app/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-electron-app", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/code --skill test-electron-app -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PostHog/code test-electron-app --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/test-electron-app .cursor/skills/test-electron-app && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "test-electron-app" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-app into .cursor/skills/test-electron-app/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-electron-app", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PostHog/code.git --path .claude/skills/test-electron-app--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PostHog/code --skill test-electron-app -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PostHog/code test-electron-app --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/test-electron-app .gemini/skills/test-electron-app && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "test-electron-app" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-app into .gemini/skills/test-electron-app/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-electron-app", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PostHog/code test-electron-appInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PostHog/code --skill test-electron-app -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/test-electron-app .github/skills/test-electron-app && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "test-electron-app" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-app into .github/skills/test-electron-app/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-electron-app", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/code --skill test-electron-app -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PostHog/code test-electron-app --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/test-electron-app .opencode/skills/test-electron-app && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "test-electron-app" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/test-electron-app into .opencode/skills/test-electron-app/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "test-electron-app", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
test-electron-appDrive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser.
Test Electron App is an agent skill from PostHog/code, published by the product's own GitHub organization. Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser. Connect to the running app on port 9222, snapshot the accessibility tree to verify changes, click/type/navigate, and screenshot the actual desktop app only when explicitly asked. Use when asked to test, verify, dogfood, screenshot or interact with the running app. For regression specs use the Playwright E2E suite.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Browser automation, gRPC and Protobuf and End-to-end testing. It works with Electron, PostHog, Playwright and tRPC. The repository describes itself as: The era of self-driving development is here. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit a4c32df. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(agent-browser:*)Bash(npx agent-browser:*)Bash(pnpm app:cdp*)From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmcurlnpmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Test Electron App loads about 2.9k tokens when it runs. Until then it costs about 112 tokens; SKILL.md has 1,333 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from PostHog/code at commit a4c32df, republished under its MIT licence (© PostHog). 1,333 words, ~2,881 tokens.
.claude/skills/test-electron-app/SKILL.md (or your agent's skills folder).Drive the actual running app over the Chrome DevTools Protocol with
agent-browser. The dev app
already launches with --remote-debugging-port=9222 (see apps/code/package.json),
so an agent can connect, snapshot the UI, interact, and (only when asked) screenshot the live app.
This exercises real state: live tRPC, workspace-server, GitHub/Slack and
whatever profile is signed into ~/.posthog-code. Pick the right surface:
| Goal | Tool |
|---|---|
| Verify or screenshot a change in the real app, live data | this skill (agent-browser + CDP :9222) |
| Regression coverage in CI | Playwright E2E (apps/code/tests/e2e/) |
npm i -g agent-browser && agent-browser install # onceThe app must be running with remote debugging. pnpm dev (or pnpm dev:code)
already passes --remote-debugging-port=9222. Preflight + connect:
pnpm app:cdp # checks agent-browser + that the app is up on :9222, then connectsIf it reports the app is not reachable, the app isn't running. Start it, then
retry pnpm app:cdp.
Do not use pnpm dev from a non-interactive shell. It builds deps then hands
off to the phrocs TUI process-multiplexer, which aborts without a controlling
terminal (bubbletea: could not open TTY: /dev/tty: device not configured). An
agent in a background shell has no TTY, so pnpm dev cannot launch it headlessly.
Build the workspace deps (TTY-safe, the same step pnpm dev runs first), then
launch only the Electron app with its stdin held open:
pnpm build:deps # turbo build of @posthog/code deps
tail -f /dev/null | pnpm dev:code # run in the background; leave it runningpnpm dev:code is pnpm --filter code start, i.e. electron-vite dev --watch — just
the app, no phrocs TUI; it watches and rebuilds main/preload and hot-reloads the
renderer (fine for screenshotting/interacting). The CDP port (:9222) is opened by
the app itself in dev (the remote-debugging-port switch in
apps/code/src/main/bootstrap.ts), not by a CLI flag.
The tail -f /dev/null | prefix is a harmless guard and no longer strictly required.
The old electron-forge start ran an interactive "type rs to restart" stdin reader
that hit EOF in a no-stdin shell, treated it as quit, and tore the Electron window
down before the CDP port ever opened. electron-vite dev has no such reader, so a
backgrounded pnpm dev:code with no stdin stays up on its own; keeping the pipe does
no harm.
Then wait for the port and connect (poll, don't sleep blindly):
until curl -s localhost:9222/json/version >/dev/null; do sleep 1; done
agent-browser connect 9222Never auto-kill an instance you didn't start. If pnpm app:cdp found the app
already up on :9222, it's the user's own — when you're done just agent-browser close your session and leave the app running.
When you launched it, don't tear it down the instant you finish. The app survives between turns, so leave it up and end your turn by telling the user it's still running and asking if they want anything else — a follow-up needs no relaunch.
So a forgotten app doesn't linger, arm a 10-minute idle watchdog at launch. Touch a marker file on launch and after every interaction; the watchdog tears the app down once that file sits untouched for 10 minutes (re-touching resets the clock):
touch /tmp/posthog-dev-lastuse # arm now; re-run after each interactionThen start the watchdog once, as a background task (touch the marker first or it fires immediately). It polls, then self-exits after it fires or once the marker is removed:
while sleep 30; do
last=$(stat -f %m /tmp/posthog-dev-lastuse 2>/dev/null || echo 0)
[ $(( $(date +%s) - last )) -ge 600 ] && break
done
pid=$(pgrep -f "remote-debugging-port=9222" | head -1)
[ -n "$pid" ] && kill -TERM "-$(ps -o pgid= -p "$pid" | tr -d ' ')" 2>/dev/nullTo stop early (user says "done" / "shut it down"): close the session, group-kill the app, and drop the marker so the watchdog exits:
agent-browser close
pid=$(pgrep -f "remote-debugging-port=9222" | head -1)
[ -n "$pid" ] && kill -TERM "-$(ps -o pgid= -p "$pid" | tr -d ' ')" 2>/dev/null
rm -f /tmp/posthog-dev-lastuseGroup-killing the launcher (kill -TERM -PGID) takes down tail, pnpm,
electron-vite and Electron together, so nothing — not even the
tail -f /dev/null stdin pipe — lingers. Matching remote-debugging-port=9222
hits only your dev instance (prod has no debug port and a separate
posthog-code-dev profile), so it never touches the user's app. Verify with
curl -s localhost:9222/json/version (fails) and pgrep -fl posthog-code-dev
(empty).
agent-browser serves version-matched docs. Read them before driving:
agent-browser skills get electron # Electron-over-CDP workflow (authoritative)
agent-browser skills get core # snapshot/interact/screenshot referenceagent-browser connect 9222 # attach (skip if you ran pnpm app:cdp)
agent-browser snapshot -i # interactive elements only (the app is already dark)
agent-browser click @e5 # act on a ref from the snapshot
agent-browser snapshot -i # ALWAYS re-snapshot after the UI changes — this is how you verify
agent-browser close # done; free the sessionVerifying a change is snapshot, not screenshot. The accessibility tree
tells you what is on screen for almost no tokens, and it is how you confirm a test
worked. Do not capture a screenshot to check your own work — only run screenshot
when the user explicitly asks to see the app (see Screenshots).
Refs (@e1, @e2, …) are reassigned on every snapshot and go stale the moment
the UI changes. Re-snapshot before the next ref interaction.
The renderer uses data-testid heavily, so prefer stable locators over refs
when you know the target:
agent-browser find testid new-task-button click
agent-browser find role button click --name "New task"
agent-browser find text "Settings" clickOnly screenshot when the user explicitly asks for one ("screenshot", "show
me", "what does it look like"). To confirm a change worked, use agent-browser snapshot — the accessibility tree is the cheap default and is almost always
enough. Auto-capturing a screenshot to "confirm" your work just burns image
tokens.
agent-browser screenshot /tmp/app.png # viewport (absolute path = clickable)
agent-browser screenshot --full /tmp/app.png # full page instead of viewportNavigate to the target view first (click through the UI), then capture. agent-browser prints the saved path. Repeated captures reuse the connected session, so batches are fast.
When the user asked for a screenshot, they want to look at it, so close the loop every time:
/tmp/app.png, never a bare out.png). Claude Code renders absolute paths as clickable links, so the path itself opens the PNG on click.open /tmp/app.png (macOS opens it in Preview). If the request was clearly "screenshot it so I can see it", just open it instead of asking.!open /tmp/app.png.9222 (override with POSTHOG_CODE_CDP_PORT). Collides with Chrome's
default debugging port; if connect attaches to the wrong target, list and
pick the PostHog window: agent-browser tab then agent-browser tab --url "*".agent-browser tab lists them;
switch with agent-browser tab <index>.--color-scheme dark: that global flag makes agent-browser apply
device emulation that forces a 1280x720 viewport and renders this Electron window
blank, and it sticks in the daemon (only restarting the agent-browser daemon
clears it, not close). The app is already dark, so plain agent-browser snapshot / agent-browser screenshot is what you want.~/.posthog-code. If the app
shows onboarding or sign-in, that is the real boot state. Do not mutate
production data (don't create real tasks/PRs) while exploring.#root > * appears and "Loading" clears.PostHog orchestrates the agent, so the usual loop is: prod (the installed app) runs the agent, and the dev build (pnpm dev) is the system under test. They coexist by design (apps/code/src/main/bootstrap.ts): dev runs as posthog-code-dev with its own app name, userData and single-instance lock, so it never collides with prod.
:9222; prod has no debug port, so connect 9222 can't accidentally drive prod.posthog-code-dev profile; it is not signed in just because prod is. Sign into the dev window once; its state persists.8238) and :9222 mean a second pnpm dev collides and quits. Run prod + one dev.lsof -i :9222 or curl -s localhost:9222/json/version.electron-forge
"quit on stdin EOF" behavior is gone under electron-vite, so the
tail -f /dev/null | prefix is optional and not the fix here. This is now usually a
build error, the single-instance lock (another dev instance running) or a crash —
check the pnpm dev:code output. Note pnpm dev cannot run headlessly at all — its
phrocs TUI needs a TTY; use pnpm dev:code.agent-browser tab and switch to the "PostHog" page.agent-browser keyboard type "text" (types at
current focus) or agent-browser keyboard inserttext "text" to bypass key events.© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/test-electron-app of PostHog/code.
Open the folder on GitHubat commit a4c32df
Test Electron App next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Test Electron App this skillPostHog/code | 179 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Test Electron AppPostHog/posthog-foss | 721 | — | ~3k | Automated safety check: Pass | MIT | |
| playwright-cli Browser Automationgithub/gh-aw | 5.3k | 23 repos | ~2.8k | Automated safety check: Pass | MIT | |
| E2E Agent Browserjh941213/my-cc-harness | 126 | — | ~3.1k | Automated safety check: Notes | None | |
| UI Previewtingly-dev/tingly-box | 351 | — | ~2k | Automated safety check: Notes | MPL-2.0 | |
| E2E VerificationChorus-AIDLC/Chorus | 1.2k | — | ~1.5k | Automated safety check: Notes | AGPL-3.0 |
PostHog/posthog-foss
Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser.
github/gh-aw
Drives a real browser from the command line with playwright-cli to open pages, interact, mock requests, save state and work with Playwright tests.
jh941213/my-cc-harness
E2E test automation using agent-browser CLI. An agent skill from jh941213/my-cc-harness.
tingly-dev/tingly-box
Capture headless-Chrome screenshots of the tingly-box frontend (running locally in mock mode) so frontend changes can be visually verified in environments without a real browser.
Chorus-AIDLC/Chorus
A skill your agent uses when manually verifying a Chorus frontend change in a real browser — finding local login credentials, driving the running dev server with the Playwright MCP, logging in…
Asvarox/allkaraoke
Run, write, and debug Playwright E2E tests for this project.
PostHog/code
How PostHog "canvas" dashboards work end-to-end — the two rendering tiers (json-render vs freeform React-in-iframe), the agent system prompts that steer each, and the RIGHT way to fetch PostHog data…
PostHog/code
How to write JavaScript workflow scripts for the workflow tool - fanning work out across many isolated subagents with agent(), parallel(), and pipeline(), then synthesizing one result.
PostHog/code
Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent.
PostHog/code
Merge a PR into main through the Trunk merge queue and babysit it until it lands.
PostHog/code
Add, replace, and optimize the looping demo videos in the onboarding "welcome" bento grid (packages/ui/src/features/onboarding).
PostHog/code
Edit the @posthog/quill design system locally and consume the change in this repo (posthog-code) before it is published to npm.
Works with
Categories
Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser. Test Electron App is an agent skill from PostHog/code, published by the product's own GitHub organization. Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser.
Test Electron App fits situations like: interact with the running app; tasks that involve Browser automation; tasks that involve gRPC and Protobuf.
Run `npx skills add PostHog/code --skill test-electron-app -a claude-code`. Or copy the skill folder (.claude/skills/test-electron-app in PostHog/code) into .claude/skills/test-electron-app in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PostHog/code --skill test-electron-app -a codex`. Or copy the skill folder (.claude/skills/test-electron-app in PostHog/code) into .agents/skills/test-electron-app in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/code --skill test-electron-app -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-electron-app, .gemini/skills/test-electron-app, .github/skills/test-electron-app and .opencode/skills/test-electron-app in your project.
Going by SKILL.md and its folder, Test Electron App needs the command-line tools its instructions call (pnpm, curl and npm). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(agent-browser:*), Bash(npx agent-browser:*), Bash(pnpm app:cdp*).
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Test Electron App is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Test Electron App: Test Electron App (PostHog/posthog-foss, 721 stars), playwright-cli Browser Automation (github/gh-aw, 5.3k stars), E2E Agent Browser (jh941213/my-cc-harness, 126 stars) and UI Preview (tingly-dev/tingly-box, 351 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PostHog (a GitHub organization, an official publisher) maintains it in PostHog/code, which has 179 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on August 5, 2026.
Source: PostHog/code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.