Browser Research Skill
Research web pages using agent-browser CLI and summarize content.
Usage
/browser-research <URL> [research topic or question]
Workflow
0. Clean up existing session (if needed)
A previous session may still be open. Close it before starting to avoid conflicts:
agent-browser close 2>/dev/null || true
1. Open the page
agent-browser open "<URL>" && agent-browser wait --load networkidle --timeout 15000
If open fails: verify the URL is well-formed, retry once. If it fails again, report the error to the user and stop.
If wait times out: proceed anyway — the page may still be usable.
Next, choose the extraction method based on your purpose:
| Purpose | Command | When to use |
|---|---|---|
| Read article/docs text | agent-browser eval "document.body.innerText" |
Blog posts, documentation, text-heavy pages. Most token-efficient |
| Understand page structure | agent-browser snapshot -c |
Need to see layout, navigation, or element refs for interaction |
| Find interactive elements | agent-browser snapshot -i -c |
Need to click links, buttons, or fill forms |
For a typical single-article research, eval "document.body.innerText" is often sufficient. Use snapshot only when you need structure or element refs.
For large pages, append --max-output 10000 to prevent token explosion:
agent-browser eval "document.body.innerText" --max-output 10000
If a cookie consent banner or overlay blocks content, dismiss it first:
agent-browser snapshot -i -c # find the accept/close button ref
agent-browser click "@ref" # dismiss the banner
Then proceed with the chosen extraction method.
Stop here if you have enough information. Steps 2–6 below are only needed for deeper investigation.
2. Get detailed content (if needed)
Get text from specific element:
agent-browser get text "@ref"
Get page metadata:
agent-browser get title && agent-browser get url
Find elements by role, text, or label:
agent-browser find role heading
agent-browser find text "keyword"
3. Handle long pages
Scroll to load more content:
agent-browser scroll down 500 && agent-browser snapshot -c
Scroll a specific element into view:
agent-browser scrollintoview "@ref" && agent-browser snapshot -c
4. Navigate to linked pages
Click a link:
agent-browser click "@ref" && agent-browser wait --load networkidle --timeout 15000 && agent-browser snapshot -c
Go back:
agent-browser back && agent-browser snapshot -c
5. Research additional URLs
Use tabs to research multiple pages without losing previous context:
agent-browser tab new && agent-browser open "<next-URL>" && agent-browser wait --load networkidle --timeout 15000 && agent-browser snapshot -c
Switch between tabs or close current tab:
agent-browser tab list
agent-browser tab <n>
agent-browser tab close
6. Save page as PDF (optional)
When the user requests a saved copy:
agent-browser pdf "/path/to/output.pdf"
7. Close when done
agent-browser close
Critical Rules
- Always close the session — every
openmust have a matchingclose. - Read-only by default — never submit forms or enter data. Clicking is allowed only for passive navigation: dismissing cookie/consent banners, following links, expanding collapsed sections, or switching tabs. Do not click buttons that trigger writes, purchases, or state changes.
- No guessing — do not fabricate or assume page content; only report what
snapshot/get/evalreturn. - Authentication pages — if a page requires login, report it immediately and stop. Do not attempt to authenticate.
- Prefer command chaining — use
&&to combine related commands in a single bash call for efficiency. - Minimize tokens — prefer
eval "document.body.innerText"oversnapshotwhen you only need text content. Use--max-outputfor large pages.
Output Format
Respond in the same language the user used. Summarize findings in this structure:
- Overview: Main topic and purpose of the page
- Key Points: Important information as bullet points
- Details: Detailed explanations as needed
- Related Links: Additional resources to reference
When researching multiple URLs or when the user requests it, save results to a file using the Write tool. For a single-URL quick lookup, respond directly in chat.
Snapshot Options
| Flag | Description |
|---|---|
-i, --interactive |
Show only interactive elements |
-c, --compact |
Remove empty structural elements |
-d <n>, --depth <n> |
Limit DOM tree depth |
-s <sel>, --selector <sel> |
Scope to CSS selector |
Additional Useful Commands
screenshot --full— Capture full page screenshotscreenshot --annotate— Screenshot with numbered element labelsdiff snapshot— Compare current page state against previous snapshotconsole— View browser console logs (useful for debugging)errors— View page errorsget count "<sel>"— Count matching elements--max-output <chars>— Truncate output for large pages
Converted and distributed by TomeVault — claim your Tome and manage your conversions.