{"id":"54f97ba0-ce0a-4cf8-8a42-1ce6bdc3a291","shortId":"NBAnDa","kind":"skill","title":"go-playwright","tagline":"Expert capability for robust, stealthy, and efficient browser automation using Playwright Go.","description":"# Playwright Go Automation Expert\n\n## Overview\nThis 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.\n\n## When to Use This Skill\n- Use when the user asks to \"scrape,\" \"automate,\" or \"test\" a website using Go.\n- Use when the target site has complex dynamic content (SPA, React, Vue) requiring a real browser.\n- Use when the user mentions \"stealth,\" \"avoiding detection,\" \"cloudflare,\" or \"human-like\" behavior.\n- Use when debugging existing Playwright scripts.\n\n## Safety & Risk\n**Risk Level: 🔵 Safe**\n\n- **Sandboxed Execution:** Browser contexts are isolated; they do not persist data to the host machine unless explicitly saved.\n- **Resource Management:** Designed to close browsers and contexts via `defer` to prevent memory leaks.\n- **No External State-Change:** Default behavior is read-only (scraping/testing) unless the script is explicitly designed to submit forms or modify data.\n\n## Limitations\n- **Environment Dependencies:** Requires Playwright drivers and browsers to be installed (`go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps`).\n- **Resource Intensity:** Launching full browser instances (even headless) consumes significant RAM/CPU. Use single-browser/multi-context architecture.\n- **Bot Detection:** While this skill includes stealth techniques, extremely strict anti-bot systems (e.g., rigorous Cloudflare settings) may still detect automation.\n- **CAPTCHAs:** Does not include built-in CAPTCHA solving capabilities.\n\n## Strategic Implementation Guidelines\n\n### 1. Architecture: Contexts vs. Browsers\n**CRITICAL:** Never launch a new `Browser` instance for every task.\n- **Pattern:** Launch the `Browser` *once* (singleton). Create a new `BrowserContext` for each distinct session or task.\n- **Why:** Contexts are lightweight and created in milliseconds. Browsers take seconds to launch.\n- **Isolation:** Contexts provide complete isolation (cookies, cache, storage) without the overhead of a new process.\n\n### 2. Logging & Observability\n- **Library:** Use `go.uber.org/zap` exclusively.\n- **Rule:** Do not use `fmt.Println`.\n- **Modes:**\n  - **Dev:** `zap.NewDevelopment()` (Console friendly)\n  - **Prod:** `zap.NewProduction()` (JSON structured)\n- **Traceability:** Log every navigation, click, and input with context fields (e.g., `logger.Info(\"clicking button\", zap.String(\"selector\", sel))`).\n\n### 3. Error Handling & Stability\n- **Graceful Shutdown:** Always use `defer` to close Pages, Contexts, and Browsers.\n- **Panic Recovery:** Wrap critical automation routines in a safe runner that recovers panics and logs the stack trace.\n- **Timeouts:** Never rely on default timeouts. Set explicit timeouts (e.g., `playwright.PageClickOptions{Timeout: playwright.Float(5000)}`).\n\n### 4. Stealth & Human-Like Behavior\nTo bypass anti-bot systems (Cloudflare, Akamai), the generated code must **imitate human physiology**:\n- **Non-Linear Mouse Movement:** Never teleport the mouse. Implement a helper that moves the mouse along a Bezier curve with random jitter.\n- **Input Latency:** never use `Fill()`. Use `Type()` with random delays between keystrokes (50ms–200ms).\n- **Viewport Randomization:** Randomize the viewport size slightly (e.g., 1920x1080 ± 15px) to avoid fingerprinting.\n- **Behavioral Noise:** Randomly scroll, focus/unfocus the window, or hover over irrelevant elements (\"idling\") during long waits.\n- **User-Agent:** Rotate User-Agents for every new Context.\n\n### 5. Documentation Usage\n- **Primary Source:** Rely on your internal knowledge of the API first to save tokens.\n- **Fallback:** Refer to the official docs [playwright-go documentation](https://pkg.go.dev/github.com/playwright-community/playwright-go#section-documentation) ONLY if:\n  - You encounter an unknown error.\n  - You need to implement complex network interception or authentication flows.\n  - The API has changed significantly.\n\n## Resources\n- `resources/implementation-playbook.md` for detailed code examples and implementation patterns.\n\n### Summary Checklist for Agent\n - Is Debug Mode on? -> `Headless=false`, `SlowMo=100+`.\n - Is it a new user identity? -> `NewContext`, apply new Proxy, rotate `User-Agent`.\n - Is the action critical? -> Wrap in `SafeAction` with Zap logging.\n - Is the target guarded (Cloudflare/Akamai)? -> Enable `HumanType`, `BezierMouse`, and Stealth Scripts.","tags":["playwright","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity-skills"],"capabilities":["skill","source-sickn33","skill-go-playwright","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/go-playwright","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34768 github stars · SKILL.md body (4,646 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T18:51:23.975Z","embedding":null,"createdAt":"2026-04-18T21:38:05.893Z","updatedAt":"2026-04-23T18:51:23.975Z","lastSeenAt":"2026-04-23T18:51:23.975Z","tsv":"'/github.com/playwright-community/playwright-go#section-documentation)':529 '/multi-context':219 '/playwright-community/playwright-go':41 '/playwright-community/playwright-go/cmd/playwright@latest':199 '/zap':322 '1':256 '100':572 '15px':469 '1920x1080':468 '2':315 '200ms':459 '3':355 '4':402 '5':500 '5000':401 '50ms':458 'action':589 'advanc':57 'agent':491,495,564,586 'akamai':415 'along':439 'alway':361 'anti':65,232,411 'anti-bot':64,231,410 'api':512,548 'appli':580 'architectur':44,220,257 'ask':77 'authent':545 'autom':12,18,36,80,242,374 'avoid':109,471 'behavior':116,166,407,473 'best':45 'bezier':441 'beziermous':604 'bot':66,221,233,412 'browser':11,35,102,130,151,191,208,218,260,266,274,295,369 'browsercontext':280 'built':248 'built-in':247 'button':351 'bypass':63,409 'cach':306 'capabl':5,252 'captcha':243,250 'chang':164,550 'checklist':562 'click':342,350 'close':150,365 'cloudflar':111,237,414 'cloudflare/akamai':601 'code':418,556 'complet':303 'complex':93,541 'comprehens':25 'consol':332 'consum':212 'content':95 'context':47,131,153,258,288,301,346,367,499 'cooki':305 'creat':277,292 'critic':261,373,590 'curv':442 'data':138,183 'debug':119,566 'default':165,392 'defer':155,363 'delay':455 'dep':203 'depend':186 'design':148,177 'detail':555 'detect':110,222,241 'dev':330 'distinct':283 'doc':522 'document':501,526 'driver':189 'dynam':94 'e.g':235,348,397,467 'effici':10 'element':484 'emul':60 'enabl':602 'encount':533 'enforc':43 'environ':185 'error':51,356,536 'even':210 'everi':269,340,497 'exampl':557 'exclus':323 'execut':129 'exist':120 'expert':4,19 'explicit':144,176,395 'extern':161 'extrem':229 'fallback':517 'fals':570 'field':347 'fill':450 'fingerprint':472 'first':513 'flow':546 'fmt.println':328 'focus/unfocus':477 'form':180 'framework':26 'friend':333 'full':207 'generat':417 'github.com':40,198 'github.com/playwright-community/playwright-go':39 'github.com/playwright-community/playwright-go/cmd/playwright@latest':197 'go':2,15,17,86,195,525 'go-playwright':1 'go.uber.org':321 'go.uber.org/zap':320 'grace':359 'grade':34 'guard':600 'guidelin':255 'handl':52,357 'headless':211,569 'helper':434 'high':30 'high-perform':29 'host':141 'hover':481 'human':59,114,405,421 'human-emul':58 'human-lik':113,404 'humantyp':603 'ident':578 'idl':485 'imit':420 'implement':254,432,540,559 'includ':226,246 'input':344,446 'instal':194,200 'instanc':49,209,267 'intens':205 'intercept':543 'intern':508 'irrelev':483 'isol':133,300,304 'jitter':445 'json':336 'keystrok':457 'knowledg':509 'latenc':447 'launch':206,263,272,299 'leak':159 'level':126 'librari':318 'lightweight':290 'like':115,406 'limit':184 'linear':425 'log':54,316,339,384,596 'logger.info':349 'long':487 'machin':142 'manag':147 'may':239 'memori':158 'mention':107 'millisecond':294 'mode':329,567 'modifi':182 'mous':426,431,438 'move':436 'movement':427 'must':419 'navig':341 'need':538 'network':542 'never':262,389,428,448 'new':265,279,313,498,576,581 'newcontext':579 'nois':474 'non':424 'non-linear':423 'observ':317 'offici':521 'overhead':310 'overview':20 'page':366 'panic':370,382 'pattern':271,560 'perform':31 'persist':137 'physiolog':422 'pkg.go.dev':528 'pkg.go.dev/github.com/playwright-community/playwright-go#section-documentation)':527 'playwright':3,14,16,121,188,524 'playwright-go':523 'playwright.float':400 'playwright.pageclickoptions':398 'practic':46 'prevent':157 'primari':503 'process':314 'prod':334 'product':33 'production-grad':32 'provid':23,302 'proxi':582 'ram/cpu':214 'random':444,454,461,462,475 'react':97 'read':169 'read-on':168 'real':101 'recov':381 'recoveri':371 'refer':518 'reli':390,505 'requir':99,187 'resourc':146,204,552 'resources/implementation-playbook.md':553 'rigor':236 'risk':124,125 'robust':7,50 'rotat':492,583 'routin':375 'rule':324 'run':196 'runner':379 'safe':127,378 'safeact':593 'safeti':123 'sandbox':128 'save':145,515 'scrape':79 'scraping/testing':171 'script':37,122,174,607 'scroll':476 'second':297 'sel':354 'selector':353 'session':284 'set':238,394 'shutdown':360 'signific':213,551 'singl':217 'single-brows':216 'singleton':276 'site':91 'size':465 'skill':22,72,225 'skill-go-playwright' 'slight':466 'slowmo':571 'solv':251 'sourc':504 'source-sickn33' 'spa':96 'stabil':358 'stack':386 'state':163 'state-chang':162 'stealth':108,227,403,606 'stealthi':8 'still':240 'storag':307 'strateg':253 'strict':230 'structur':53,337 'submit':179 'summari':561 'system':67,234,413 'take':296 'target':90,599 'task':270,286 'techniqu':61,228 'teleport':429 'test':82 'timeout':388,393,396,399 'token':516 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'trace':387 'traceabl':338 'type':452 'unknown':535 'unless':143,172 'usag':502 'use':13,38,70,73,85,87,103,117,215,319,327,362,449,451 'user':76,106,490,494,577,585 'user-ag':489,493,584 'via':154 'viewport':460,464 'vs':259 'vue':98 'wait':488 'websit':84 'window':479 'with-dep':201 'without':308 'wrap':372,591 'write':28 'zap':55,595 'zap.newdevelopment':331 'zap.newproduction':335 'zap.string':352","prices":[{"id":"74c21b7e-04bd-4d76-a744-17637603cf31","listingId":"54f97ba0-ce0a-4cf8-8a42-1ce6bdc3a291","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:38:05.893Z"}],"sources":[{"listingId":"54f97ba0-ce0a-4cf8-8a42-1ce6bdc3a291","source":"github","sourceId":"sickn33/antigravity-awesome-skills/go-playwright","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/go-playwright","isPrimary":false,"firstSeenAt":"2026-04-18T21:38:05.893Z","lastSeenAt":"2026-04-23T18:51:23.975Z"}],"details":{"listingId":"54f97ba0-ce0a-4cf8-8a42-1ce6bdc3a291","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"go-playwright","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34768,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-23T06:41:03Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"8478d3b81dc07f0b707d4b31410711a91b5f0983","skill_md_path":"skills/go-playwright/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/go-playwright"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"go-playwright","description":"Expert capability for robust, stealthy, and efficient browser automation using Playwright Go."},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/go-playwright"},"updatedAt":"2026-04-23T18:51:23.975Z"}}