browser-edge-cases
यह क्या करती है
यह स्किल AI को यह पता लगाने का चरण-दर-चरण तरीका देती है कि जटिल वेबसाइटों पर ब्राउज़र का काम क्यों विफल होता है। यह उन लोगों के लिए है जो ब्राउज़र के स्वचालित काम बनाते या चलाते हैं।
कब इस्तेमाल करें
- ✓जब किसी वेबसाइट पर स्क्रॉल या क्लिक हुआ लगता है, पर कुछ नहीं होता।
- ✓जब टाइप किया गया टेक्स्ट गायब हो जाता है या पेज पुराना कंटेंट दिखाता रहता है।
- ✓जब भारी स्क्रिप्ट वाली साइट पर कोई ब्राउज़र चरण गलत पेज खोल देता है।
Skill का लिंक
https://github.com/aden-hive/hive/blob/main/.claude/skills/browser-edge-cases/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरा ब्राउज़र बॉट LinkedIn पर बटन क्लिक करता है, पर कुछ नहीं होता। मैं जानना चाहता हूँ कि ऐसा क्यों होता है और उसे कैसे ठीक करूँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI पहले ब्राउज़र को एक सरल साइट पर परखता है, फिर कठिन साइट पर console और पेज की संरचना जाँचता है। वह दोनों नतीजों की तुलना करके कारण ढूँढता है और चरणों में सुधार करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या यह हर वेबसाइट पर काम करता है?
यह LinkedIn, X और छिपे पेज हिस्सों वाले single-page apps जैसी जटिल साइटों के लिए लिखा गया है।
AI कहाँ से शुरू करता है?
कुछ बदलने से पहले वह एक छोटे टेस्ट से विफलता को दोबारा पैदा करके शुरू करता है।
कौन से ब्राउज़र टूल इस्तेमाल होते हैं?
यह navigate, snapshot, interact और console जाँच जैसे ब्राउज़र टूल इस्तेमाल करता है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 11k
- रैंकिंग में स्थान
- #11797
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
hive.browser-automation
11kयह आपके एजेंट को hive-browser टूल से और स्क्रीनशॉट व क्लिक के ज़रिए आपके अपने Chrome ब्राउज़र को नियंत्रित करना सिखाती है।
hive.colony-progress-tracker
11kयह आपके एजेंट को कार्य लेने और साझा डेटाबेस में अपने चरण व जाँच दर्ज करने में मदद करती है, ताकि काम चलते-चलते ट्रैक हो।
hive.context-preservation
11kयह आपके एजेंट को लंबे टूल नतीजों से ज़रूरी बातें नोट्स में सहेजने में मदद करती है, इससे पहले कि पुराने विवरण उसकी मेमोरी से हटें।
hive.error-recovery
11kयह आपके एजेंट को विफल टूल चरणों को साफ़ योजना से संभालने में मदद करती है: एक बार दोबारा कोशिश, इनपुट ठीक करना, आइटम छोड़ना या ऊपर भेजना।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।