Ego Browser
Paste the following prompt into your AI chat to install this skill:
Install @user_57645b9d/ego-browser according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Web automation for AI agents often splits across two mismatched layers: the agent side must run scripts, wait, log, and manage task state, while the browser side needs access to document, window, real viewport metrics, and page JavaScript. ego-browser gives AI agents a CLI-accessible Node.js runtime with built-in helpers such as snapshot, click, evaluate, and cdp, so an agent can observe pages, interact with UI elements, evaluate browser-side JavaScript, and drive a real browser within one scripted workflow.
How It Works
Run browser operations through the Bash tool using the ego-browser nodejs { ... })() form. The heredoc body is Node.js code: put navigation, waits, console.log(...), and task-space management there. Anything that needs the page context—document, window, CSS selectors, or browser JavaScript—belongs inside evaluate(...). A typical loop is: inspect the page with snapshot or pageInfo(), check whether coordinates are valid, perform click or evaluate, then call completeTaskSpace(name, { keep }) when the task is done. Use { keep: false } by default; use { keep: true } only for concrete live-page cases.
Notes
- If
await pageInfo()reportsw: 0orh: 0, stop coordinate actions and screenshots until the viewport is fixed. Try switching to the real tab, reloading, or checking CDP viewport metrics, then verify withpageInfo()andscreenshot(). - A trailing
[ego-browser:notice]line is an update hint, not an error. Do not interrupt the current task; after the task stops orcompleteTaskSpace()completes, ask whether to upgrade and restartego lite. - Assume the runtime is ready unless the first run errors. If the first run reports
command not foundor a missing environment, follow the installation flow and then return to the original task.
Use Cases
- Agent logs into a page, clicks, and reads DOM via evaluate.
- Check pageInfo before coordinate clicks to avoid zero size.
- Click filters, then read document selectors via evaluate.
- Call completeTaskSpace after the task and default keep false.
Best For
- Engineers needing agent clicks and DOM reads in browser
- Automation devs extracting page data for downstream scripts
- Agent devs running page JS during web tasks
- Platform teams scripting login, filter, and state reads
Related Skills
Run a grilling session to interact with or test AI agents.
A systematic prompt optimization skill that refines prompts using a four-step distillation framework (diagnose, structure, think, compress) and methodologies from four prompting masters.
Tencent Cloud OCR agent for K-12 exam grading with async full-sheet or single-question marking, handwritten answer recognition, correctness, knowledge points, and coordinates.
Quickly converts a user's input, list, or screenshot into a multi-page workbench, supporting template selection, custom builds, and responsive layouts.