Ghostex Browser Use
Agent Buildingghostex-browser-useGhostex Browser Use is an Agent Skill for agent building published in the maddada/Ghostex repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use this skill when adding, configuring, or troubleshooting agent access to Ghostex embedded CEF browser panes through the Ghostex Browser Use MCP workflow. It covers CLI installation, MCP config, page selection, console logs, DOM snapshots, clicks, fills, key presses, screenshots, and the CEF remote debugging port used by `ghostex browser mcp`.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/maddada/Ghostex/blob/HEAD/skills/ghostex-browser-use/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/ghostex-browser-use, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
ghostex-browser-use
Use this skill when a user wants an agent to see or control the browser pane inside Ghostex, especially when they ask for Chrome DevTools-style capabilities such as console logs, page snapshots, clicks, fills, navigation, or screenshots.
Requirements
- Ghostex must be running before the MCP server can attach to CEF.
- A browser pane does not need to exist yet; create or reuse one with
ghostex browser open <url>. - The Ghostex CLI is bundled with the macOS app and auto-linked on app startup.
- The browser skill should be installed by the CLI:
ghostex browser install-skill.
MCP Server
Configure the agent to launch the MCP server over stdio:
[mcp_servers.ghostex-browser]
command = "ghostex"
args = ["browser", "mcp"]
If the CEF remote debugging port is not one of Ghostex's default ports, pass it explicitly:
[mcp_servers.ghostex-browser]
command = "ghostex"
args = ["browser", "mcp", "--port", "9333"]
The same value can be provided as GHOSTEX_CEF_REMOTE_DEBUGGING_PORT.
Workflow
- Open or reuse a pane with
ghostex browser open <url>when no suitable Ghostex browser pane exists yet. - List pages with
ghostex_list_pages. - Select the intended pane with
ghostex_select_pagewhen multiple pages are open. - Use
ghostex_console_logsbefore and after interactions when debugging runtime errors. - Use
ghostex_snapshotto get stable element refs, then operate withghostex_click,ghostex_fill, andghostex_press_key. - Use
ghostex_evaluatefor focused inspection andghostex_screenshotwhen visual evidence matters.
Opening Panes
- Prefer
ghostex browser open <url>for embedded browser panes. It defaults to the agent process cwd as the project path and reuses a same-origin pane in that project. - Pass
--project-path "$PWD"or--project-id <id>when opening a pane from a task tied to a specific Ghostex project/worktree. - Keep the returned browser session id and the MCP page id from
ghostex_list_pages; reuse them for follow-up work instead of opening another pane. - Use
--reuse exactfor exact-URL reuse only, or--newwhen a separate pane is intentionally required.
Notes
- The server connects directly to CEF's Chrome DevTools Protocol endpoint; do not add Playwright or a second browser automation runtime for Ghostex panes.
- Element refs from
ghostex_snapshotare only valid for the current page state. Re-runghostex_snapshotafter navigation or major DOM changes. - Console collection starts when the MCP server attaches to a page, so open the MCP server before reproducing errors when possible.