browser-edge-cases
하는 일
이 스킬은 AI에게 복잡한 웹사이트에서 브라우저 작업이 왜 실패하는지 찾는 단계별 방법을 알려 줍니다. 자동화된 브라우저 작업을 만들거나 운영하는 사람들을 위한 것입니다.
사용하는 경우
- ✓웹사이트에서 스크롤이나 클릭은 된 것 같은데 아무 일도 일어나지 않을 때.
- ✓입력한 글자가 사라지거나 페이지가 계속 예전 내용을 보여 줄 때.
- ✓스크립트가 많은 사이트에서 브라우저 단계가 잘못된 페이지를 열 때.
스킬 링크
https://github.com/aden-hive/hive/blob/main/.claude/skills/browser-edge-cases/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 브라우저 봇이 LinkedIn에서 버튼을 클릭하는데 아무 일도 일어나지 않습니다. 원인을 찾아서 고쳐 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 먼저 간단한 사이트에서 브라우저를 테스트하고, 그다음 어려운 사이트에서 콘솔과 페이지 구조를 확인합니다. 두 결과를 비교해 원인을 찾고 단계를 조정합니다.
기술 내용 (원본 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 같은 복잡한 사이트나 숨겨진 페이지 부분이 있는 단일 페이지 앱을 위해 작성되었습니다.
AI는 어디서부터 시작하나요?
무엇이든 바꾸기 전에, 최소한의 테스트로 실패를 똑같이 재현하는 것부터 시작합니다.
어떤 브라우저 도구를 사용하나요?
navigate, snapshot, interact, 콘솔 확인 같은 브라우저 도구를 사용합니다.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
hive.browser-automation
11k에이전트가 hive-browser 도구로 내 Chrome 브라우저를 제어하도록 가르칩니다. 스크린샷과 클릭을 사용합니다.
hive.colony-progress-tracker
11k에이전트가 작업을 맡고 단계와 점검 내용을 공유 데이터베이스에 기록하도록 돕습니다. 작업이 진행되는 동안 추적됩니다.
hive.context-preservation
11k에이전트가 긴 도구 결과에서 핵심 사실을 메모로 저장해, 오래된 세부 내용이 기억에서 지워지기 전에 보존하도록 돕습니다.
hive.error-recovery
11k에이전트가 실패한 도구 단계를 명확한 계획으로 처리하도록 돕습니다. 한 번 다시 시도하거나, 입력을 고치거나, 항목을 건너뛰거나, 상위로 올립니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.