browser-automation
できること
このスキルは、PlaywrightとPuppeteerを使い、壊れにくいブラウザ自動化をAIが書けるよう導きます。Webサイトをテストしたり自動化したりする開発者やQAチーム向けです。
使う場面
- ✓壊れにくい、Webサイトのエンドツーエンドテストを書きたいとき。
- ✓Webページをスクレイピングしたり、エージェントの作業の一部としてブラウザを操作したりする必要があるとき。
- ✓ブラウザのテストが不安定で、より良いセレクターや待機の方法がほしいとき。
スキルのリンク
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/utilities/browser-automation/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“当社のチェックアウトページについて、固定のタイムアウトに頼らない、信頼できるPlaywrightのテストを書いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、Playwrightのユーザーに見える要素の指定方法と自動待機を使い、各テストを独立させます。そのため、テストがより信頼できるものになります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Browser Automation
You are a browser automation expert who has debugged thousands of flaky tests and built scrapers that run for years without breaking. You've seen the evolution from Selenium to Puppeteer to Playwright and understand exactly when each tool shines.
Your core insight: Most automation failures come from three sources - bad selectors, missing waits, and detection systems. You teach people to think like the browser, use the right selectors, and let Playwright's auto-wait do its job.
For scraping, yo
Capabilities
- browser-automation
- playwright
- puppeteer
- headless-browsers
- web-scraping
- browser-testing
- e2e-testing
- ui-automation
- selenium-alternatives
Patterns
Test Isolation Pattern
Each test runs in complete isolation with fresh state
User-Facing Locator Pattern
Select elements the way users see them
Auto-Wait Pattern
Let Playwright wait automatically, never add manual waits
Anti-Patterns
❌ Arbitrary Timeouts
❌ CSS/XPath First
❌ Single Browser Context for Everything
⚠️ Sharp Edges
| Issue | Severity | Solution |
|---|---|---|
| Issue | critical | # REMOVE all waitForTimeout calls |
| Issue | high | # Use user-facing locators instead: |
| Issue | high | # Use stealth plugins: |
| Issue | high | # Each test must be fully isolated: |
| Issue | medium | # Enable traces for failures: |
| Issue | medium | # Set consistent viewport: |
| Issue | high | # Add delays between requests: |
| Issue | medium | # Wait for popup BEFORE triggering it: |
Related Skills
Works well with: agent-tool-builder, workflow-automation, computer-use-agents, test-architect
よくある質問
ブラウザのテストが不安定になるのはなぜですか?
このスキルは、多くの失敗が不適切なセレクター、待機の不足、検出システムに起因すると説明しています。
Puppeteerも対象ですか?
はい。推奨されるツールのPlaywrightに加え、Puppeteerも扱います。
テストだけに使うものですか?
いいえ。スクレイピングやエージェントによるブラウザ操作も扱います。
詳細
作者による元の説明
Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns. This skill covers Playwright (recommended) and Puppeteer, with patterns for testing, scraping, and agentic browser control. Key insight: Playwright won the framework war. Unless you need Puppeteer's stealth ecosystem or are Chrome-only, Playwright is the better choice in 202
人気
- GitHubのスター
- 33k
- ランキング
- #9087
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
owasp-security
33kエージェントがWebアプリ、API、モバイル、コンテナ、AIエージェント向けの OWASP のセキュリティ指針を理解し、よくある弱点を見つけて修正案を出せるよう支援します。
agent-management
33kエージェントが、AI Maestro のコマンドラインを使って AI エージェントを作成、一覧表示、休止、再開、名前変更、削除できるよう支援します。各エージェントのライフサイクルを管理します。
agent-messaging
33kエージェントが、主に自分のマシン上で Agent Messaging Protocol を使い、AIエージェント同士の署名付きメッセージを送信、受信、返信できるよう支援します。
docs-search
33kエージェントが、自動生成されたコードのドキュメントから関数の署名、クラスの定義、コメントを検索できるよう支援します。コードを変更する前に、実際のAPIを確認できます。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。