Communitygithub.com

JantonioFC/skillsbank

プロダクショングレードのPlaywrightテストツールキット。Playwrightテスト、エンドツーエンドテスト、ブラウザ自動化、不安定なテストの修正、テストマイグレーション、CI/CDテスト、テストスイートに関する言及があった場合に使用します。テストの生成、不安定なテストの修正、Cypress/Seleniumからの移行、TestRailとの同期などを行います。

skillsbank とは?

このスキル「JantonioFC/skillsbank」は、AIコーディングエージェントがPlaywrightを使ったエンドツーエンドテストをプロダクションレベルで効率的に実施するための包括的なツールキットです。Claude Codeプラグインとしてインストールすると、`/pw:` で始まる9つのコマンドが利用可能になり、テストのセットアップ、生成、レビュー、修正、移行、カバレッジ分析、TestRailやBrowserStackとの連携を対話的に実行できます。55以上のテストテンプレート、3つの専門エージェント(テストアーキテクト、デバッガー、移行プランナー)、そして10の黄金ルールなど厳選されたベストプラクティスが含まれており、不安定なテストの診断やCypress/Seleniumからの移行を強力に支援します。主な対応プラットフォームはClaude Codeで、TypeScript製のMCPサーバーにより外部ツールとの統合も可能です。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JantonioFC/skillsbank/tree/HEAD/skills/pw

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Playwright Pro

AIコーディングエージェント向けのプロダクショングレードPlaywrightテストツールキット。

利用可能なコマンド

Claude Codeプラグインとしてインストールすると、以下のコマンドが /pw: として利用可能になります:

コマンド説明
/pw:initPlaywrightをセットアップ — フレームワークを検出し、設定、CI、最初のテストを生成
/pw:generate <spec>ユーザーストーリー、URL、またはコンポーネントからテストを生成
/pw:reviewアンチパターンとカバレッジのギャップについてテストをレビュー
/pw:fix <test>失敗または不安定なテストを診断して修正
/pw:migrateCypressまたはSeleniumからPlaywrightに移行
/pw:coverageテストされている箇所と不足している箇所を分析
/pw:testrailTestRailと同期 — テストケースの読み取り、結果のプッシュ
/pw:browserstackBrowserStack上で実行し、クロスブラウザレポートを取得
/pw:report希望の形式でテストレポートを生成

クイックスタートワークフロー

ほとんどのプロジェクトで推奨される手順:

1. /pw:init          → 設定、CIパイプライン、最初のスモークテストをスキャフォールド
2. /pw:generate      → スペックまたはURLからテストを生成
3. /pw:review        → 品質を検証し、アンチパターンを報告      ← 常に生成後に実行
4. /pw:fix <test>    → 失敗または不安定なテストを診断して修復  ← CIが赤くなったら実行

検証チェックポイント:

  • /pw:generate の後 — コミット前に必ず /pw:review を実行。ロケーターのアンチパターンやアサーション不足を自動的に検出します。
  • /pw:fix の後 — ローカルで全スイート(npx playwright test)を再実行し、修正がリグレッションを引き起こさないことを確認します。
  • /pw:migrate の後 — /pw:coverage を実行して、古いスイートとのパリティを確認してからCypress/Seleniumテストを廃止します。

例: 生成 → レビュー → 修正

# 1. ユーザーストーリーからテストを生成
/pw:generate "ユーザーとしてメールとパスワードでログインしたい"

# 生成: tests/auth/login.spec.ts
# → Playwright Proが認証テンプレートを使用してファイルを作成。

# 2. 生成されたテストをレビュー
/pw:review tests/auth/login.spec.ts

# → フラグ: 1つのテストが page.locator('input[type=password]') を使用 — getByLabel('Password') を提案
# → 修正が自動的に適用される。

# 3. ローカルで確認
npx playwright test tests/auth/login.spec.ts --headed

# 4. CIでテストが不安定な場合、診断
/pw:fix tests/auth/login.spec.ts
# → web-firstアサーションが欠けていることを特定; waitForTimeout(2000) を expect(locator).toBeVisible() に置き換え

黄金ルール

  1. CSS/XPathよりも getByRole() — マークアップ変更に強い
  2. page.waitForTimeout() は使わない — web-firstアサーションを使用する
  3. expect(locator) は自動リトライ; expect(await locator.textContent()) はしない
  4. テストごとに分離 — テスト間で状態を共有しない
  5. 設定に baseURL — ハードコードされたURLはゼロ
  6. リトライ数: CIでは 2、ローカルでは 0
  7. トレース: 'on-first-retry' — 豊富なデバッグ情報を速度低下なしで
  8. グローバルよりフィクスチャ — 共有状態には test.extend()
  9. テストごとに1つの振る舞い — 複数の関連アサーションは問題ない
  10. 外部サービスのみモック — 自社アプリはモックしない

ロケーター優先順位

1. getByRole()        — ボタン、リンク、見出し、フォーム要素
2. getByLabel()       — ラベル付きフォームフィールド
3. getByText()        — インタラクティブでないテキスト
4. getByPlaceholder() — プレースホルダー付き入力
5. getByTestId()      — セマンティックなオプションがない場合
6. page.locator()     — 最後の手段としてのCSS/XPath

含まれるもの

  • 9つのスキル:詳細なステップバイステップの手順付き
  • 3つの専門エージェント:テストアーキテクト、テストデバッガー、移行プランナー
  • 55のテストテンプレート:認証、CRUD、チェックアウト、検索、フォーム、ダッシュボード、設定、オンボーディング、通知、API、アクセシビリティ
  • 2つのMCPサーバー(TypeScript):TestRailおよびBrowserStack連携
  • スマートフック:テスト品質の自動検証、Playwrightプロジェクトの自動検出
  • 6つのリファレンスドキュメント:黄金ルール、ロケーター、アサーション、フィクスチャ、落とし穴、不安定なテスト
  • 移行ガイド:CypressおよびSeleniumのマッピングテーブル

連携設定

TestRail(オプション)

export TESTRAIL_URL="https://your-instance.testrail.io"
export TESTRAIL_USER="[email protected]"
export TESTRAIL_API_KEY="your-api-key"

BrowserStack(オプション)

export BROWSERSTACK_USERNAME="your-username"
export BROWSERSTACK_ACCESS_KEY="your-access-key"

クイックリファレンス

reference/ ディレクトリを参照:

  • golden-rules.md — 譲れない10のルール
  • locators.md — チートシート付き完全なロケーター優先順位
  • assertions.md — web-firstアサーションリファレンス
  • fixtures.md — カスタムフィクスチャとstorageStateパターン
  • common-pitfalls.md — よくある間違いトップ10と修正方法
  • flaky-tests.md — 診断コマンドとクイックフィックス

templates/README.md で完全なテンプレート一覧を確認してください。

使用タイミング

playwright-proに関するガイダンスや自動化が必要な場合にこのスキルを使用します。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

JantonioFC/skillsbank

AI-powered image editing with style transfer and object removal

JantonioFC/skillsbank

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

JantonioFC/skillsbank

Analise e auditoria de editais de leilao judicial e extrajudicial. Riscos ocultos, clausulas perigosas, debitos, ocupante e classificacao da oportunidade.

JantonioFC/skillsbank

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

JantonioFC/skillsbank

Best practices for Remotion - Video creation in React

JantonioFC/skillsbank

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

JantonioFC/skillsbank

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

JantonioFC/skillsbank

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

JantonioFC/skillsbank

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

JantonioFC/skillsbank

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

JantonioFC/skillsbank

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

JantonioFC/skillsbank

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

JantonioFC/skillsbank

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

JantonioFC/skillsbank

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

JantonioFC/skillsbank

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,'...

JantonioFC/skillsbank

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, expla...

JantonioFC/skillsbank

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awarene...

JantonioFC/skillsbank

Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5 Pro, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, lipsync, avatar animation, video upscaling, fole...

JantonioFC/skillsbank

Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

JantonioFC/skillsbank

You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.

関連スキル