jpskill.com
🎨 デザイン コミュニティ

wp-test-analyzer

WordPressテーマのPHPファイルを解析し、E2Eテスト生成に必要なテスト可能な要素を抽出することで、WordPressサイトの品質向上に貢献するSkill。

📜 元の英語説明(参考)

Analyze WordPress theme PHP files to extract testable elements for E2E test generation.

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

一言でいうと

WordPressテーマのPHPファイルを解析し、E2Eテスト生成に必要なテスト可能な要素を抽出することで、WordPressサイトの品質向上に貢献するSkill。

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

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して wp-test-analyzer.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → wp-test-analyzer フォルダができる
  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-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

WordPress Test Analyzer Skill

WordPressテーマのPHPファイルを解析し、E2Eテスト生成のためにテスト可能な要素を抽出します。

使い方

E2EテストのためにWordPressテーマを解析する必要がある場合に、このスキルを呼び出します。

  • 「/path/to/theme にあるテーマを解析して、テスト可能な要素を抽出してください」
  • 「このWordPressテーマのテストケースを生成してください」
  • 「このWordPressサイトで何をテストすべきですか?」

引数

  • theme_path (必須): WordPressテーマディレクトリへのパス

ワークフロー

  1. テーマディレクトリ上でアナライザースクリプトを実行します。
  2. テスト可能な要素のJSON出力を確認します。
  3. 出力を使用してPlaywrightテストファイルを生成します。

抽出されるテスト可能な要素

フォーム

  • フォームのアクションURLとメソッド
  • 入力フィールド (name, type, required)
  • 送信ボタン
  • Nonceフィールド (WordPressのセキュリティ)
  • 成功/エラーメッセージのパターン

ナビゲーション

  • メニュー構造
  • 内部リンク
  • 外部リンク
  • アンカーリンク

動的コンテンツ

  • WP_Query ループ
  • 条件付き表示 (if/else)
  • 投稿メタフィールド
  • カスタム投稿タイプ

JavaScriptインタラクション

  • onclick ハンドラー
  • クラスの切り替え
  • データ属性
  • PHPで言及されているイベントリスナー

WordPress固有

  • カスタム投稿タイプ
  • メタボックス
  • テーマオプション
  • AJAXフック

出力例

{
  "forms": [
    {
      "file": "page-contact.php",
      "action": "POST to self",
      "fields": [
        {"name": "first_name", "type": "text", "required": true},
        {"name": "email", "type": "email", "required": true},
        {"name": "message", "type": "textarea", "required": true}
      ],
      "nonce": "csr_contact_nonce",
      "success_param": "?contact=success",
      "error_param": "?contact=error"
    }
  ],
  "pages": [
    {
      "file": "index.php",
      "template": "Home",
      "sections": ["hero", "philosophy", "featured_works"],
      "animations": ["initHomePage"]
    }
  ],
  "custom_post_types": ["property"],
  "navigation": {
    "primary": ["Home", "About", "Portfolio", "Contact"],
    "footer": ["Privacy Policy", "Terms of Service"]
  }
}

アナライザーの実行

python3 /root/.claude/skills/wp-test-analyzer/analyze.py /path/to/theme
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

WordPress Test Analyzer Skill

Analyze WordPress theme PHP files to extract testable elements for E2E test generation.

Usage

Invoke this skill when you need to analyze a WordPress theme for E2E testing:

  • "Analyze the theme at /path/to/theme for testable elements"
  • "Generate test cases for this WordPress theme"
  • "What should I test in this WordPress site?"

Arguments

  • theme_path (required): Path to the WordPress theme directory

Workflow

  1. Run the analyzer script on the theme directory
  2. Review the JSON output of testable elements
  3. Use the output to generate Playwright test files

Testable Elements Extracted

Forms

  • Form action URLs and methods
  • Input fields (name, type, required)
  • Submit buttons
  • Nonce fields (WordPress security)
  • Success/error message patterns

Navigation

  • Menu structures
  • Internal links
  • External links
  • Anchor links

Dynamic Content

  • WP_Query loops
  • Conditional displays (if/else)
  • Post meta fields
  • Custom post types

JavaScript Interactions

  • onclick handlers
  • Class toggles
  • Data attributes
  • Event listeners mentioned in PHP

WordPress-Specific

  • Custom post types
  • Meta boxes
  • Theme options
  • AJAX hooks

Example Output

{
  "forms": [
    {
      "file": "page-contact.php",
      "action": "POST to self",
      "fields": [
        {"name": "first_name", "type": "text", "required": true},
        {"name": "email", "type": "email", "required": true},
        {"name": "message", "type": "textarea", "required": true}
      ],
      "nonce": "csr_contact_nonce",
      "success_param": "?contact=success",
      "error_param": "?contact=error"
    }
  ],
  "pages": [
    {
      "file": "index.php",
      "template": "Home",
      "sections": ["hero", "philosophy", "featured_works"],
      "animations": ["initHomePage"]
    }
  ],
  "custom_post_types": ["property"],
  "navigation": {
    "primary": ["Home", "About", "Portfolio", "Contact"],
    "footer": ["Privacy Policy", "Terms of Service"]
  }
}

Running the Analyzer

python3 /root/.claude/skills/wp-test-analyzer/analyze.py /path/to/theme