본문으로 건너뛰기
Skillpedia
일반 코딩48k · #4761

go-playwright

하는 일

이 도구는 Go 프로그래밍 언어를 사용해 웹 브라우저의 작업을 자동화합니다. 클릭이나 입력 같은 사람의 행동을 흉내 내어 웹사이트와 효율적이고 눈에 띄지 않게 상호작용하며, 봇 탐지 시스템에 걸리는 것을 피하도록 돕습니다.

사용하는 경우

  • ✓웹사이트에서 정보를 자동으로 추출해야 할 때.
  • ✓브라우저에서 웹사이트가 어떻게 작동하는지 테스트할 때.
  • ✓인터넷에서 사람과 매우 비슷하게 행동하는 봇이 필요할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/go-playwright/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/go-playwright/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 페이지의 모든 뉴스 헤드라인을 추출해서 파일로 저장해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 브라우저를 시작하고 각 작업을 위한 격리된 환경을 만듭니다. 사람과 비슷한 움직임과 입력을 시뮬레이션하는 고급 기법을 사용하며, 디버깅을 쉽게 하기 위해 모든 동작을 기록합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Playwright Go Automation Expert

Overview

This skill provides a comprehensive framework for writing high-performance, production-grade browser automation scripts using github.com/playwright-community/playwright-go. It enforces architectural best practices (contexts over instances), robust error handling, structured logging (Zap), and advanced human-emulation techniques to bypass anti-bot systems.

When to Use This Skill

  • Use when the user asks to "scrape," "automate," or "test" a website using Go.
  • Use when the target site has complex dynamic content (SPA, React, Vue) requiring a real browser.
  • Use when the user mentions "stealth," "avoiding detection," "cloudflare," or "human-like" behavior.
  • Use when debugging existing Playwright scripts.

Safety & Risk

Risk Level: 🔵 Safe

  • Sandboxed Execution: Browser contexts are isolated; they do not persist data to the host machine unless explicitly saved.
  • Resource Management: Designed to close browsers and contexts via defer to prevent memory leaks.
  • No External State-Change: Default behavior is read-only (scraping/testing) unless the script is explicitly designed to submit forms or modify data.

Limitations

  • Environment Dependencies: Requires Playwright drivers and browsers to be installed (go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps).
  • Resource Intensity: Launching full browser instances (even headless) consumes significant RAM/CPU. Use single-browser/multi-context architecture.
  • Bot Detection: While this skill includes stealth techniques, extremely strict anti-bot systems (e.g., rigorous Cloudflare settings) may still detect automation.
  • CAPTCHAs: Does not include built-in CAPTCHA solving capabilities.

Strategic Implementation Guidelines

1. Architecture: Contexts vs. Browsers

CRITICAL: Never launch a new Browser instance for every task.

  • Pattern: Launch the Browser once (singleton). Create a new BrowserContext for each distinct session or task.
  • Why: Contexts are lightweight and created in milliseconds. Browsers take seconds to launch.
  • Isolation: Contexts provide complete isolation (cookies, cache, storage) without the overhead of a new process.

2. Logging & Observability

  • Library: Use go.uber.org/zap exclusively.
  • Rule: Do not use fmt.Println.
  • Modes:
    • Dev: zap.NewDevelopment() (Console friendly)
    • Prod: zap.NewProduction() (JSON structured)
  • Traceability: Log every navigation, click, and input with context fields (e.g., logger.Info("clicking button", zap.String("selector", sel))).

3. Error Handling & Stability

  • Graceful Shutdown: Always use defer to close Pages, Contexts, and Browsers.
  • Panic Recovery: Wrap critical automation routines in a safe runner that recovers panics and logs the stack trace.
  • Timeouts: Never rely on default timeouts. Set explicit timeouts (e.g., playwright.PageClickOptions{Timeout: playwright.Float(5000)}).

4. Stealth & Human-Like Behavior

To bypass anti-bot systems (Cloudflare, Akamai), the generated code must imitate human physiology:

  • Non-Linear Mouse Movement: Never teleport the mouse. Implement a helper that moves the mouse along a Bezier curve with random jitter.
  • Input Latency: never use Fill(). Use Type() with random delays between keystrokes (50ms–200ms).
  • Viewport Randomization: Randomize the viewport size slightly (e.g., 1920x1080 ± 15px) to avoid fingerprinting.
  • Behavioral Noise: Randomly scroll, focus/unfocus the window, or hover over irrelevant elements ("idling") during long waits.
  • User-Agent: Rotate User-Agents for every new Context.

5. Documentation Usage

  • Primary Source: Rely on your internal knowledge of the API first to save tokens.
  • Fallback: Refer to the official docs playwright-go documentation ONLY if:
    • You encounter an unknown error.
    • You need to implement complex network interception or authentication flows.
    • The API has changed significantly.

Resources

  • resources/implementation-playbook.md for detailed code examples and implementation patterns.

Summary Checklist for Agent

  • Is Debug Mode on? -> Headless=false, SlowMo=100+.
  • Is it a new user identity? -> NewContext, apply new Proxy, rotate User-Agent.

…

자주 묻는 질문

추가로 설치해야 할 것이 있나요?

네. Playwright 구성 요소와 Playwright가 사용하는 브라우저를 설치해야 합니다. Playwright는 이를 위한 명령을 제공합니다.

웹사이트에서 탐지될 수 있나요?

이 도구는 사람처럼 보이고 탐지를 피하기 위한 기법을 사용합니다. 하지만 매우 고급 봇 방지 시스템을 갖춘 웹사이트는 여전히 자동화를 알아챌 수 있습니다.

CAPTCHA를 해결할 수 있나요?

아닙니다. 이 도구는 CAPTCHA를 자동으로 해결하는 기능이 없습니다.

상세 정보

작성자의 원본 설명

Expert capability for robust, stealthy, and efficient browser automation using Playwright Go.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4761
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬