test-electron-app

test-electron-app is a skill for Claude Code from PostHog/posthog-foss. It costs 112 tokens per session (3,038 once invoked), scanned A, original, MIT.

A testing guide for driving a real PostHog desktop app through Chrome DevTools Protocol, including its live services and data.

In plain words
What is it for?
Use it to connect to the app, inspect its accessibility tree and network requests, interact with live data, and test changes against a local Django stack.
Why use it?
It helps verify desktop changes against the actual running application instead of relying only on mocked or isolated tests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to connect to the app, inspect its accessibility tree and network requests, interact with live data, and test changes against a local Django stack.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/test-electron-app
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill test-electron-app
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-electron-app

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/test-electron-app/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/test-electron-app)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/test-electron-app"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/test-electron-app/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-electron-app

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/test-electron-app"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/test-electron-app.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 116
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium MCP Rug Pull · line 4
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.03038
Opus 5.5 $0.00045 $0.01215
Sonnet 5.5 $0.00022 $0.00608
Haiku 4.5 $0.00011 $0.00304

Measured 1mo ago against content hash 693ff90e49c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-electron-app scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

until curl -s localhost:9222/json/version >/dev/null; do sleep 1; done
products/desktop/.claude/skills/test-electron-app/SKILL.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test the real PostHog Electron app

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/)

For a live backend-to-desktop test, read references/local-django-stack.md before starting services.

Prerequisites

npm i -g agent-browser && agent-browser install   # once

The 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 connects

If it reports the app is not reachable, the app isn't running. Start it, then retry pnpm app:cdp.

Launching the app yourself (background / no TTY)

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 running

pnpm 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.

Read the full file on GitHub · 239 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 239 lines · 112 tokens per session scan A 693ff90e49c2

Subscribe to this mod's changes

test-electron-app is a skill published in the GitHub repository PostHog/posthog-foss (725 stars, last pushed today), licensed MIT. It adds 112 tokens to every session and 3,038 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

browse

Drive a real browser through Aside: open a page, read it, click through a flow, take screenshots, check console errors. (gstack).

garrytan/gstack · 32 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

create-verification-skill

Create a repo-local verification skill and exhaustive feature map for driving a real app through its UI, CLI, or API. Use for "create a verification skill", "make a verify skill for this repo", or "document how agents can verify this app".

get-bb/bb · 57 tokens

browser-qa

A browser-based quality check for deployed web pages and user flows. It uses browser automation to test rendering, navigation, forms, interactions, responsive behaviour, and accessibility-related issues.

hashgraph-online/awesome-codex-plugins · 58 tokens

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.

anthropics/skills · 35 tokens

smoke-test

Run smoke tests against a deployed or local app based on your git diff. Each test uses Skyvern browser tools (navigate, act, validate, screenshot) with Chrome DevTools MCP as fallback. Posts screenshot evidence as PR comments.

Skyvern-AI/skyvern · 50 tokens