本文へスキップ
Skillpedia
テスト33k · #9087

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/utilities/browser-automation/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#9087
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル