name: Browser Fu description: "Fixes browser automation failures. Snapshot-first workflow + API discovery behind any website UI. Use when: 'browser not working', 'can't click', 'flaky UI', 'DOM not exposed', 'scrape website', 'browser keeps failing', 'automate this website', 'web scraping', 'element not found'."
Stop fighting the DOM. Read it first, find the API behind it, skip the UI entirely when possible.
Never blind-click. Always snapshot first.
1. browser snapshot → read the page, get element refs
2. browser act → use refs from snapshot (e.g. ref="e12")
3. browser snapshot → verify what changed
If the snapshot doesn't show what you need, the element isn't in the DOM. Don't guess. Don't retry the same approach.
On any browser task, follow this order:
web_fetch handles it. If yes, don't open the browser.references/api-discovery.md. Most SPAs make fetch/XHR calls you can replicate directly. This is 10x faster and more reliable than UI automation.loadState: "networkidle" or a brief wait before snapshotting. SPAs often render asynchronously.| Symptom | Wrong approach | Right approach |
|---|---|---|
| "Element not found" | Click by text/selector guess | Snapshot first, use exact ref |
| "DOM not exposed" | Give up | Snapshot with refs="aria", or check network tab for API |
| Blank/empty page | Retry same URL | loadState: "networkidle", then snapshot. If still blank, JS-heavy SPA, try web_fetch or find API |
| Clicking does nothing | Click again harder | Snapshot after click to check state. Maybe it DID work but page re-rendered |
| Login wall | Try to automate login | Use profile="user" for existing session cookies |
| Infinite scroll | Scroll and pray | Find the pagination API endpoint instead |
Most modern websites are SPAs with REST/GraphQL APIs behind the UI. See references/api-discovery.md for the full procedure:
web_fetch or exec curlThis turns a 2-hour flaky scrape into a 2-minute clean data pull.
refs="aria" for stable cross-call referencestargetId across snapshot/act pairs (don't switch tabs accidentally)depth to limit how deep the DOM tree goescompact: true reduces token usage on large pagesweb_fetch (faster, no browser overhead)web_search (Brave API)7w4.net小蔥技能。
web_fetch → then use browser這個 Skill 教你怎麼更聰明地用瀏覽器自動化工具。做得好的地方:提供了清晰的決策流程告訴你什麼時候該用瀏覽器、什麼時候該跳過;還有個超實用的"找網站後臺介面"技巧,能把複雜的網頁抓取變成簡單的資料請求。不足:內容主要是文字說明,沒有可直接用的程式碼模板,對實際操作的幫助有限。如果你經常需要抓網站資料或自動化網頁操作,這個 Skill 的思路很有用,但別指望直接複製貼上就能用。