browser-edge-cases
What it does
This skill gives the AI a step-by-step method for finding out why a browser task fails on complex websites. It is for people who build or run automated browser tasks.
When to use it
- ✓When a scroll or click on a website appears to work but nothing happens.
- ✓When typed text disappears or a page keeps showing old content.
- ✓When a browser step loads the wrong page on a site with heavy scripts.
Skill link
https://github.com/aden-hive/hive/blob/main/.claude/skills/browser-edge-cases/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My browser bot clicks the button on LinkedIn but nothing happens. I want to find out why and fix it.”
5 new skills a week. 1 minute to read.
How it works
The AI first tests the browser on a simple site, then checks the console and page structure on the difficult site. It compares the results to find the cause and adjusts the steps.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Browser Tool Edge Cases
Standard Operating Procedure for debugging and fixing browser automation failures on complex websites.
When to Use This Skill
browser_interact(action="scroll")succeeds but page doesn't movebrowser_interact(action="left_click")succeeds but no action triggeredbrowser_interact(action="type")text disappears or doesn't workbrowser_snapshothangs or returns stale contentbrowser_navigateloads wrong content
SOP: Debugging Browser Tool Failures
Phase 1: Reproduce & Isolate
1. Create minimal test case demonstrating failure
2. Test against simple site (example.com) to verify tool works
3. Test against problematic site to confirm issue
Quick isolation test:
# Test 1: Does the tool work at all?
await browser_navigate(tab_id, "https://example.com")
result = await browser_interact(action="scroll", tab_id=tab_id, scroll_direction="down", scroll_amount=100)
# Should work on simple sites
# Test 2: Does it fail on the problematic site?
await browser_navigate(tab_id, "https://linkedin.com/feed")
result = await browser_interact(action="scroll", tab_id=tab_id, scroll_direction="down", scroll_amount=100)
# If this fails but example.com works → site-specific edge case
Phase 2: Analyze Root Cause
Step 2a: Check console for errors
console = await browser_console(tab_id)
# Look for: CSP violations, React errors, JavaScript exceptions
Step 2b: Inspect DOM structure
html = await browser_html(tab_id)
snapshot = await browser_snapshot(tab_id)
# Look for:
# - Nested scrollable divs (overflow: scroll/auto)
# - Shadow DOM roots
# - iframes
# - Custom widgets
Step 2c: Identify the pattern
| Symptom | Likely Cause | Check |
|---|---|---|
| Scroll doesn't move | Nested scroll container | Look for overflow: scroll divs |
| Click no effect | Element covered | Check getBoundingClientRect vs viewport |
| Type clears | Autocomplete/React | Check for event listeners on input; try a type action with no selector |
| Snapshot hangs | Huge DOM | Check node count in snapshot |
| Snapshot stale | SPA hydration | Wait after navigation |
Phase 3: Implement Multi-Layer Fix
Pattern: Always have fallbacks
async def robust_operation(tab_id):
# Method 1: Primary approach
try:
result = await primary_method(tab_id)
if verify_success(result):
return result
except Exception:
pass
# Method 2: CDP fallback
try:
result = await cdp_fallback(tab_id)
if verify_success(result):
return result
except Exception:
pass
# Method 3: JavaScript fallback
return await javascript_fallback(tab_id)
Pattern: Always add timeouts
# Bad - can hang forever
result = await browser_snapshot(tab_id)
# Good - fails fast with useful error
try:
result = await browser_snapshot(tab_id, timeout_s=10.0)
except asyncio.TimeoutError:
# Handle timeout gracefully
result = await fallback_snapshot(tab_id)
Phase 4: Verify Fix
1. Run against problematic site → should work
2. Run against simple site → should still work (regression check)
3. Document in registry.md
Pattern Library
P1: Nested Scrollable Containers
Sites: LinkedIn, Twitter/X, any SPA with scrollable feeds
Detection:
// Find largest scrollable container
const candidates = [];
document.querySelectorAll('*').forEach(el => {
const style = getComputedStyle(el);
if (style.overflow.includes('scroll') || style.overflow.includes('auto')) {
const rect = el.getBoundingClientRect();
if (rect.width > 100 && rect.height > 100) {
candidates.push({el, area: rect.width * rect.height});
}
}
});
candidates.sort((a, b) => b.area - a.area);
return candidates[0]?.el;
Fix: Dispatch scroll events at container's center, not viewport center.
P2: Element Covered by Overlay
Sites: Modals, tooltips, SPAs with loading overlays
Detection:
const rect = element.getBoundingClientRect();
const centerX = rect.left + rect.width / 2;
const centerY = rect.top + rect.height / 2;
const topElement = document.elementFromPoint(centerX, centerY);
return topElement === element || element.contains(topElement);
Fix: Wait for overlay to disappear, or use JavaScript click.
P3: React Synthetic Events
Sites: React SPAs, modern
FAQ
Does this work on any website?
It is written for complex sites such as LinkedIn, X and single-page apps with hidden page parts.
Where does the AI start?
It starts by reproducing the failure with a minimal test before changing anything.
Which browser tools does it use?
It uses browser tools such as navigate, snapshot, interact and console checks.
Details
Original description by the author
SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.
repo: aden-hive/hive
Popularity
- GitHub stars
- 11k
- Ranking position
- #11797
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
hive.browser-automation
11kTeaches your agent to control your own Chrome browser with the hive-browser tool, using screenshots and clicks.
hive.colony-progress-tracker
11kHelps your agent claim tasks and record its steps and checks in a shared database, so work is tracked as it goes.
hive.context-preservation
11kHelps your agent save key facts from long tool results into notes before older details are removed from its memory.
hive.error-recovery
11kHelps your agent handle failed tool steps with a clear plan: retry once, fix the input, skip the item, or escalate.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.