Agent skill

Agent Browser Electron

by moeru-ai in moeru-ai/airi

A skill your agent uses when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow…

MITAuto-check passedProductivity & Automation

Install Agent Browser Electron

skills CLI
$ npx skills add moeru-ai/airi --skill agent-browser-electron -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install moeru-ai/airi agent-browser-electron --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/moeru-ai/airi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-browser-electron .claude/skills/agent-browser-electron && rm -rf skills-src

Use ~/.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/

Facts

Skill name
agent-browser-electron
GitHub stars
50k
Token cost
~3.1k tokens
SKILL.md length
1,376 words
Files
2
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow…

  • Works in 2 steps: Verify the target immediately. → If stable tab switching is not enough,…
  • Codex needs to inspect
  • SKILL.md covers Overview, Preserve Window Roles, Why Raw CDP Discovery and Workflow, plus 3 more sections
  • Calls curl and pnpm

What it does

Agent Browser Electron is an agent skill from moeru-ai/airi. Use when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow instances, lazy-created windows, duplicate URLs, or misleading agent-browser tab list output. Covers mapping Electron windows to raw CDP targets, identifying routes like //chat, and attaching agent-browser to the correct target by webSocketDebuggerUrl.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Productivity & Automation, covering Browser automation and Browser testing. It works with Chrome DevTools and Electron. The repository describes itself as: 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to bring them into our worlds, wishing to achieve Neuro-sama's altitude. Capable of… The licence is MIT.

When your agent uses it

  • Codex needs to inspect
  • Automate an Electron app through agent-browser and Chrome DevTools Protocol
  • Especially when the app has multiple BrowserWindow instances
  • Lazy-created windows

Example prompts

  • “/agent-browser-electron”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Verify the target immediately.
  2. If stable tab switching is not enough, reset session state and reconnect.

What it can do on your machine

Read from SKILL.md and the folder at commit 0327dc8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl and pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Browser Electron loads about 3.1k tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 1,376 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~115
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from moeru-ai/airi at commit 0327dc8, republished under its MIT licence (© moeru-ai). 1,376 words, ~3,053 tokens.

Download SKILL.mdSave it as .claude/skills/agent-browser-electron/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
agent-browser-electron
description
Use when Codex needs to inspect, debug, or automate an Electron app through `agent-browser` and Chrome DevTools Protocol, especially when the app has multiple `BrowserWindow` instances, lazy-created windows, duplicate URLs, or misleading `agent-browser tab list` output. Covers mapping Electron windows to raw CDP targets, identifying routes like `/#/chat`, and attaching `agent-browser` to the correct target by `webSocketDebuggerUrl`.

Agent Browser Electron

Overview

Inspect Electron renderer windows reliably when agent-browser alone is not enough to tell which CDP target maps to which visible app window.

Prefer raw CDP target discovery over guessing from tab list, then use agent-browser --cdp <port> tab stable tab IDs to interact with the renderer target you want.

Preserve Window Roles

Before navigation, identify each relevant window's business role and the action that opens it. Inspect the app's window factories and open handlers when the role is unclear. Correlate those roles with CDP targets before interaction.

A renderer route does not define the complete window. Window creation also establishes mouse handling, focus, transparency, IPC handlers, and lifecycle behavior. Loading another route does not transfer those responsibilities.

  • Keep the main stage in its main window. Do not replace it with settings or chat through open, goto, location.hash, router calls, or loadURL.
  • Open the target window through the app UI. For diagnostic access, use its existing Electron open handler when UI access fails. Report that distinction in the results.
  • Enumerate CDP targets again after the window opens. Attach to that window, then navigate within its business role.
  • If clicks fail, inspect the target window and its mouse or focus behavior. Do not bypass the failure through navigation in another window.
  • After the interaction, verify that the main stage remains intact and that the target window accepts input. Programmatic activation alone does not prove that user clicks work.

Why Raw CDP Discovery

Use raw CDP target discovery because agent-browser is operating as a convenience layer on top of Chrome DevTools Protocol, and that layer can hide or flatten details that matter in Electron.

Raw /json/list is the source of truth for CDP target discovery because it exposes Chromium's target inventory without extra interpretation. It is not the same thing as Electron's BrowserWindow.getAllWindows().

In Electron, that distinction matters because:

  • multiple BrowserWindow instances can share the same URL
  • some windows are created lazily and appear only after an app action
  • a visible Electron window is inspectable only after its renderer/webContents exists and is exposed as a CDP target
  • detached DevTools pages and workers add noise
  • agent-browser tab list may show only a subset of targets or present them with reduced metadata
  • session state inside agent-browser can keep you attached to a previous renderer unless you reset and verify

In practice, the higher-level tab list view is useful for quick browsing, but not reliable enough for window-to-target mapping when:

  • two Electron windows both look like http://localhost:5173/#/
  • the title is empty or collapsed
  • a chat or settings window exists in CDP but is not obvious in the simplified tab output

Use curl http://127.0.0.1:<port>/json/list first whenever correct target selection matters. Treat agent-browser as the interaction client after target discovery, not as the only discovery source.

If /json/list does not contain a window that the user says exists, do not assume agent-browser hid it. First consider that the window may not have been created yet, may not have loaded a renderer route yet, or may not currently be exposed as a CDP target. Trigger the window from the app UI or Electron main-process action, then enumerate /json/list again.

Workflow

  1. Confirm the app exposes a CDP port.

The CDP port is project- and run-command-specific. Do not assume 9222, 9250, or any other value is universal. If an Electron process is running but no CDP port responds, tell the user to relaunch the app with the project's remote-debug environment variables or launch flags.

For AIRI stage-tamagotchi on POSIX shells:

bash
APP_REMOTE_DEBUG=true APP_REMOTE_DEBUG_PORT=9250 pnpm dev:tamagotchi

For Windows PowerShell:

powershell
$env:APP_REMOTE_DEBUG = "true"
$env:APP_REMOTE_DEBUG_PORT = "9250"
pnpm dev:tamagotchi

For Windows Git Bash:

bash
APP_REMOTE_DEBUG=true APP_REMOTE_DEBUG_PORT=9250 pnpm dev:tamagotchi

Adjust the port to match what the user actually started. If the project uses a different mechanism, inspect its Electron launch code before giving command advice.

  1. Identify the target window's role and ensure that the window exists.

If the app uses lazy window creation, agent-browser cannot inspect a window that has not been created yet. Open it from the app UI or trigger its Electron-side open handler first.

  1. Inspect raw CDP targets instead of trusting agent-browser --cdp <port> tab.
bash
curl -sS http://127.0.0.1:<port>/json/list

Read these fields:

  • title
  • url
  • type
  • webSocketDebuggerUrl

Use /json/version if you need to confirm the port is a Chromium/Electron CDP endpoint or need the browser-level debugger URL:

bash
curl -sS http://127.0.0.1:<port>/json/version
  1. Match the target to the Electron window.

Common patterns:

  • Distinct route: chat may be http://localhost:5173/#/chat while the main window is http://localhost:5173/#/.
  • Distinct title: Electron window titles may surface in the target list.
  • Duplicate URLs: two windows may both report http://localhost:5173/#/; in that case use screenshots, snapshots, and Electron app knowledge to disambiguate.
  • Hidden noise: worker targets and detached DevTools targets are not your app window.
  1. List the targets through agent-browser and switch with stable tab IDs.
bash
agent-browser --cdp <port> tab
agent-browser --cdp <port> tab t2

Do not use positional integers. If agent-browser tab prints [t2], switch with tab t2.

  1. Verify the target immediately.
bash
agent-browser --cdp <port> get url
agent-browser --cdp <port> get title
agent-browser --cdp <port> snapshot -i
  1. If stable tab switching is not enough, reset session state and reconnect.
bash
agent-browser close --all
agent-browser connect <webSocketDebuggerUrl>
agent-browser get url

If needed:

bash
agent-browser --cdp <port> screenshot /tmp/electron-target.png --annotate
agent-browser --cdp <port> console
agent-browser --cdp <port> errors
Show full SKILL.md (565 more words)Show less

Fast Triage

Use this order when the Electron app has multiple windows:

  1. curl /json/list
  2. Find the renderer page target with the route or title you expect
  3. Ignore worker targets unless the task is specifically about workers
  4. Ignore DevTools page targets unless debugging DevTools itself
  5. agent-browser --cdp <port> tab
  6. Switch with the stable tab ID, for example agent-browser --cdp <port> tab t3
  7. agent-browser --cdp <port> get url
  8. agent-browser --cdp <port> snapshot -i
  9. If the expected route is missing, trigger the lazy window from the UI and repeat from step 1

AIRI Example

In apps/stage-tamagotchi, some windows are lazy-created. The main window loads /#/; settings loads /#/settings; chat loads /#/chat; BeatSync loads /beat-sync.html.

The main window hosts the stage and its controls. Settings and chat have separate window owners. For a hearing test, open the settings window first, then navigate that window to /settings/modules/hearing. Do not set the main window's hash to this route. Stage mouse handling can leave the substituted page unable to accept clicks.

The 9250 examples below assume the app was started by the person running it with:

bash
APP_REMOTE_DEBUG=true APP_REMOTE_DEBUG_PORT=9250 pnpm dev:tamagotchi

That port is not intrinsic to AIRI or Electron. It depends on the current command and environment. Most stage-tamagotchi code lives under apps/stage-tamagotchi; inspect that app's Electron startup and window code when the port, routes, or remote-debug behavior differ.

Relevant files:

  • apps/stage-tamagotchi/src/main/windows/chat/index.ts
  • apps/stage-tamagotchi/src/main/windows/main/index.ts
  • apps/stage-tamagotchi/src/main/windows/main/rpc/index.electron.ts
  • apps/stage-tamagotchi/src/main/windows/settings/index.ts
  • apps/stage-tamagotchi/src/main/libs/electron/window-manager/reusable.ts
  • apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue

That means:

  • chat does not exist in CDP until something calls chatWindow()
  • settings and chat can be opened from the main window controls
  • once created, raw CDP target discovery will show page targets such as http://localhost:5173/#/settings and http://localhost:5173/#/chat
  • the stable way to inspect a window is to enumerate raw CDP targets, map them to agent-browser stable tab IDs, switch, and verify with get url

Example:

bash
curl -sS http://127.0.0.1:9250/json/list
agent-browser --cdp 9250 tab
agent-browser --cdp 9250 tab t4
agent-browser --cdp 9250 get url
agent-browser --cdp 9250 snapshot -i

If settings or chat is missing, start from the main window:

bash
agent-browser --cdp 9250 tab t2
agent-browser --cdp 9250 snapshot -i
# Click the main window control that opens the panel or launcher.
# In AIRI this is the arrow-up control in the bottom-right controls island.
# Re-snapshot after every click because refs are stale after UI changes.
agent-browser --cdp 9250 click '[i-solar\:alt-arrow-up-line-duotone]'
agent-browser --cdp 9250 snapshot -i

Then open the desired entry from the expanded controls and enumerate again:

bash
agent-browser --cdp 9250 click '[i-solar\:settings-minimalistic-outline]'
agent-browser --cdp 9250 click '[i-solar\:chat-line-line-duotone]'
curl -sS http://127.0.0.1:9250/json/list
agent-browser --cdp 9250 tab

If the controls island is visible but the accessibility refs or CSS icon click do not expand it, inspect the Vue component as a diagnostic fallback. AIRI currently nests tooltip trigger buttons around icon buttons, so a CDP click can report success while landing on the wrapper instead of the Vue ControlButton listener. This fallback is for automation/debugging only; do not use it as evidence that end-user clicking works.

bash
agent-browser --cdp 9250 eval '(() => {
  const icon = document.querySelector("[i-solar\\:alt-arrow-up-line-duotone]")
  let controls = icon.__vueParentComponent
  for (let i = 0; i < 10; i++) controls = controls.parent
  controls.devtoolsRawSetupState.expanded.value = true
  controls.proxy.$nextTick()
  return controls.devtoolsRawSetupState.expanded.value
})()'

Expected verification for chat:

  • agent-browser --cdp 9250 get url returns http://localhost:5173/#/chat
  • the snapshot exposes chat UI controls such as the message textbox or send button

Expected verification for settings:

  • agent-browser --cdp 9250 get url returns http://localhost:5173/#/settings
  • the snapshot exposes settings navigation or configuration controls

Failure Modes

  • agent-browser tab omits or flattens the target you need: use raw /json/list.
  • /json/list and browser-level target discovery both omit the window: the renderer target is not currently exposed. Trigger the window creation/loading path, then enumerate again.
  • connect <webSocketDebuggerUrl> appears to succeed but later commands still point at another renderer: switch with agent-browser --cdp <port> tab tN, or run agent-browser close --all, reconnect, and verify with get url.
  • multiple windows share the same URL: use the target title, annotated screenshots, and app code to correlate them.
  • eval returns {} for object values: prefer get url, get title, snapshot -i, or primitive-only eval return values.
  • no chat or settings target appears: the window may not have been created yet, or may exist as an Electron object without an inspectable renderer target.

© moeru-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/agent-browser-electron of moeru-ai/airi.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 0327dc8

Compare with similar skills

Agent Browser Electron 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.

Agent Browser Electron compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Browser Electron this skillmoeru-ai/airi50k—~3.1kAutomated safety check: PassMIT
Electron Devtools Testingankitvgupta/exo496—~2.4kAutomated safety check: PassCustom licence
Electron App Automationvercel-labs/agent-browser44k5 repos~1.7kAutomated safety check: PassApache-2.0
AI Search Hubminsight-ai-info/AI-Search-Hub1.3k—~1.3kAutomated safety check: PassNone
Superset Browser Controlsuperset-sh/superset15k—~2.9kAutomated safety check: PassCustom licence
Agent Browseroxylabs/agent-skills875—~3kAutomated safety check: PassMIT

Similar skills

  • Test the Electron app interactively using Chrome DevTools Protocol.

    496 GitHub stars~2.4k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Electron App Automation

    vercel-labs/agent-browser

    Official

    Automates Electron desktop apps such as VS Code, Slack or Discord by connecting agent-browser to their Chrome DevTools Protocol port.

    44k GitHub starsUsed in 5 repos~1.7k tokens
    Productivity & AutomationAuto-check passed
  • AI Search Hub

    minsight-ai-info/AI-Search-Hub

    Run the AI Search Hub browser automation scripts for Yuanbao, LongCat, Doubao, Qwen, Gemini, Grok, and MiniMax.

    1.3k GitHub stars~1.3k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Superset Browser Control

    superset-sh/superset

    Opens pages, takes screenshots, reads the console, clicks and types in the browser panes of a Superset workspace, with Browser Use as a fallback for other browsers.

    15k GitHub stars~2.9k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Agent Browser

    oxylabs/agent-skills

    Connects to Oxylabs remote agent browsers over the Chrome DevTools Protocol (CDP) with Playwright or Puppeteer.

    875 GitHub stars~3k tokensUpdated 8 days ago
    Productivity & AutomationAuto-check passed
  • Browser Tools

    981377660LMT/algorithm-study

    Interactive browser automation via Chrome DevTools Protocol.

    277 GitHub starsUsed in 1 repo~1.3k tokens
    Productivity & AutomationAuto-check passed

More from moeru-ai/airi

All 24 skills in this repo
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    Auto-check passed
  • Review pending AIRI translations on Crowdin in a batch, then sync them into the repository.

    50k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Upload a local image or file to GitHub's user-attachments storage and return a URL suitable for issue, pull request, discussion, or comment Markdown.

    50k GitHub stars~554 tokensUpdated today
    Auto-check passed
  • Create PR

    moeru-ai/airi

    Prepare and create an AIRI pull request with verifiable change context, architecture evidence, and required visual evidence.

    50k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts.

    50k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Analyze Io Traces

    moeru-ai/airi

    Read and analyze AIRI IO traces that Tamagotchi saved to local files.

    50k GitHub stars~542 tokensUpdated today
    Auto-check passed

Questions about Agent Browser Electron

What does Agent Browser Electron do?

A skill your agent uses when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow…. Agent Browser Electron is an agent skill from moeru-ai/airi. Use when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow instances, lazy-created windows, duplicate URLs, or misleading agent-browser tab list output.

When should I use Agent Browser Electron?

Agent Browser Electron fits situations like: Codex needs to inspect; automate an Electron app through agent-browser and Chrome DevTools Protocol; especially when the app has multiple BrowserWindow instances; lazy-created windows.

How do I install Agent Browser Electron in Claude Code?

Run `npx skills add moeru-ai/airi --skill agent-browser-electron -a claude-code`. Or copy the skill folder (.agents/skills/agent-browser-electron in moeru-ai/airi) into .claude/skills/agent-browser-electron in your project. Claude Code loads it when a task matches its description.

How do I install Agent Browser Electron in Codex?

Run `npx skills add moeru-ai/airi --skill agent-browser-electron -a codex`. Or copy the skill folder (.agents/skills/agent-browser-electron in moeru-ai/airi) into .agents/skills/agent-browser-electron in your project. Codex loads it when a task matches its description.

Can I use Agent Browser Electron in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add moeru-ai/airi --skill agent-browser-electron -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-browser-electron, .gemini/skills/agent-browser-electron, .github/skills/agent-browser-electron and .opencode/skills/agent-browser-electron in your project.

What does Agent Browser Electron need to run?

Going by SKILL.md and its folder, Agent Browser Electron needs the command-line tools its instructions call (curl and pnpm).

Does Agent Browser Electron access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agent Browser Electron safe to install?

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.

What licence does Agent Browser Electron use?

Agent Browser Electron is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Browser Electron use?

About 3.1k 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.

What are the alternatives to Agent Browser Electron?

Skills that share tags, products or a category with Agent Browser Electron: Electron Devtools Testing (ankitvgupta/exo, 496 stars), Electron App Automation (vercel-labs/agent-browser, 44k stars), AI Search Hub (minsight-ai-info/AI-Search-Hub, 1.3k stars) and Superset Browser Control (superset-sh/superset, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Browser Electron?

moeru-ai (a GitHub organization) maintains it in moeru-ai/airi, which has 50,204 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 9, 2026.

Source: moeru-ai/airi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.