jpskill.com
💬 コミュニケーション コミュニティ 🟢 非エンジニアでもOK 👤 管理職・人事・カスタマー対応

💬 Fix

fix

Webサイトやアプリケーションの動作確認を自動で行う

⏱ Slack絵文字GIF制作 1時間 → 5分

📺 まず動画で見る(YouTube)

▶ 【最新版】Claude(クロード)完全解説!20以上の便利機能をこの動画1本で全て解説 ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Fix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "intermittent failure".

🇯🇵 日本人クリエイター向け解説

一言でいうと

Webサイトやアプリケーションの動作確認を自動で行う

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fix.zip https://jpskill.com/download/4672.zip && unzip -o fix.zip && rm fix.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4672.zip -OutFile "$d\fix.zip"; Expand-Archive "$d\fix.zip" -DestinationPath $d -Force; ri "$d\fix.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して fix.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → fix フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

💬 こう話しかけるだけ — サンプルプロンプト

  • Fix で、お客様への返信文を作って
  • Fix を使って、社内向けアナウンスを書いて
  • Fix で、メールテンプレートを整備して

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

Fix Failing or Flaky Tests

Diagnose and fix a Playwright test that fails or passes intermittently using a systematic taxonomy.

Input

$ARGUMENTS contains:

  • A test file path: e2e/login.spec.ts
  • A test name: ""should redirect after login"`
  • A description: "the checkout test fails in CI but passes locally"

Steps

1. Reproduce the Failure

Run the test to capture the error:

npx playwright test <file> --reporter=list

If the test passes, it's likely flaky. Run burn-in:

npx playwright test <file> --repeat-each=10 --reporter=list

If it still passes, try with parallel workers:

npx playwright test --fully-parallel --workers=4 --repeat-each=5

2. Capture Trace

Run with full tracing:

npx playwright test <file> --trace=on --retries=0

Read the trace output. Use /debug to analyze trace files if available.

3. Categorize the Failure

Load flaky-taxonomy.md from this skill directory.

Every failing test falls into one of four categories:

Category Symptom Diagnosis
Timing/Async Fails intermittently everywhere --repeat-each=20 reproduces locally
Test Isolation Fails in suite, passes alone --workers=1 --grep "test name" passes
Environment Fails in CI, passes locally Compare CI vs local screenshots/traces
Infrastructure Random, no pattern Error references browser internals

4. Apply Targeted Fix

Timing/Async:

  • Replace waitForTimeout() with web-first assertions
  • Add await to missing Playwright calls
  • Wait for specific network responses before asserting
  • Use toBeVisible() before interacting with elements

Test Isolation:

  • Remove shared mutable state between tests
  • Create test data per-test via API or fixtures
  • Use unique identifiers (timestamps, random strings) for test data
  • Check for database state leaks

Environment:

  • Match viewport sizes between local and CI
  • Account for font rendering differences in screenshots
  • Use docker locally to match CI environment
  • Check for timezone-dependent assertions

Infrastructure:

  • Increase timeout for slow CI runners
  • Add retries in CI config (retries: 2)
  • Check for browser OOM (reduce parallel workers)
  • Ensure browser dependencies are installed

5. Verify the Fix

Run the test 10 times to confirm stability:

npx playwright test <file> --repeat-each=10 --reporter=list

All 10 must pass. If any fail, go back to step 3.

6. Prevent Recurrence

Suggest:

  • Add to CI with retries: 2 if not already
  • Enable trace: 'on-first-retry' in config
  • Add the fix pattern to project's test conventions doc

Output

  • Root cause category and specific issue
  • The fix applied (with diff)
  • Verification result (10/10 passes)
  • Prevention recommendation