wp-playground
Use for WordPress Playground workflows: fast disposable WP instances in the browser or locally via @wp-playground/cli (server, run-blueprint, build-snapshot), auto-mounting plugins/themes, switching WP/PHP versions, blueprints, and debugging (Xdebug).
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o wp-playground.zip https://jpskill.com/download/17349.zip && unzip -o wp-playground.zip && rm wp-playground.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17349.zip -OutFile "$d\wp-playground.zip"; Expand-Archive "$d\wp-playground.zip" -DestinationPath $d -Force; ri "$d\wp-playground.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
wp-playground.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
wp-playgroundフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 4
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
WordPress Playground
どのような時に使うか
- フルスタックのセットアップなしで、使い捨ての WordPress を起動して、プラグインやテーマをテストしたい場合。
- Playground Blueprint (JSON) をローカルで実行または反復処理したい場合。
- 共有または CI のために、サイトの再現可能なスナップショットを構築したい場合。
- WP/PHP のバージョンをすばやく切り替えて、問題を再現したい場合。
- 分離された Playground で Xdebug を使用してプラグイン/テーマのコードをデバッグしたい場合。
必要な入力
- ホストマシンの準備: Node.js ≥ 20.18、
npm/npxが利用可能。 - マウントするプロジェクトパス (
--auto-mountまたは明示的なマウントマッピング)。 - 必要な WP バージョン/PHP バージョン (オプション; デフォルトは最新の WP、PHP 8.3)。
- Blueprint を実行する場合の Blueprint の場所/URL。
- 9400 が競合する場合のポートの優先度。
- Xdebug が必要かどうか。
手順
0) 注意事項
- Playground インスタンスは一時的なものであり、SQLite でバックアップされます。決して本番データを指し示さないでください。
- CLI を実行する前に、Node ≥ 20.18 (
node -v) であることを確認してください。 - ローカルコードをマウントする場合は、シークレットが含まれていないことを確認してください。Playground はファイルをインメモリ FS にコピーします。
1) 簡単なローカル起動 (自動マウント)
cd <plugin-or-theme-root>
npx @wp-playground/cli@latest server --auto-mount
- デフォルトでは http://localhost:9400 で開きます。プラグイン/テーマを自動検出してインストールします。
- 必要に応じて
--wp=<version>/--php=<version>を追加します。 - 既に存在する従来のフルインストールの場合、
--skip-wordpress-setupを追加して、ツリー全体をマウントします。
2) 手動マウントまたは複数マウント
--mount=/host/path:/vfs/path(繰り返し可能) は、自動マウントでは不十分な場合 (複数プラグイン、mu-plugins、カスタムコンテンツ) に使用します。- インストーラーフローをブートストラップするために、
--mount-before-installでインストール前にマウントします。 - 参照:
references/cli-commands.md
3) Blueprint の実行 (サーバー不要)
npx @wp-playground/cli@latest run-blueprint --blueprint=<file-or-url>
- スクリプト化されたセットアップ/CI 検証に使用します。リモート URL とローカルファイルをサポートします。
- 必要に応じて、
--blueprint-may-read-adjacent-filesを使用して、ローカル Blueprint のバンドルされたアセットを許可します。 - 構造と一般的なフラグについては、
references/blueprints.mdを参照してください。
4) 共有用のスナップショットの構築
npx @wp-playground/cli@latest build-snapshot --blueprint=<file> --outfile=./site.zip
- Playground でロードしたり、バグレポートに添付したりできる ZIP を生成します。
5) Xdebug を使用したデバッグ
--xdebug(または CLI リリースによっては--enable-xdebug) で開始して IDE キーを公開し、CLI 出力に表示されるホスト/ポートに VS Code/PhpStorm を接続します。- プラグイン/テーマのデバッグのために
--auto-mountと組み合わせます。 - チェックリスト:
references/debugging.md
6) バージョンの切り替え
--wp=を使用して WP (例: 6.9.0) を固定し、--php=を使用して互換性をテストします。- 機能が Gutenberg trunk に依存する場合は、利用可能な場合は最新の WP リリースとプラグインを優先してください。Playground イメージは、安定版の WP とバンドルされた Gutenberg を追跡します。
7) ブラウザのみのワークフロー (CLI なし)
- URL フラグメントまたはクエリパラメータを使用して、クイックプレビューを起動します。
- フラグメント:
https://playground.wordpress.net/#<base64-or-json-blueprint> - クエリ:
https://playground.wordpress.net/?blueprint-url=<public-url-or-zip>
- フラグメント:
- ライブ Blueprint Editor (playground.wordpress.net) を使用して、スキーマヘルプを使用して Blueprint を作成します。JSON を貼り付けて、共有可能なリンクをコピーします。
検証
- マウントされたコードがアクティブであることを確認します (プラグインがリストされ、アクティブになっていること、テーマが選択されていること)。
- Blueprint/スナップショットの場合は、
--verbosity=debugを指定して再実行し、手順が実行されたことを確認します。 - ターゲットを絞ったスモークテスト (例: 公開されている場合はブラウザターミナルを介して Playground シェル内で
wp plugin list) または UI クリックパスを実行します。
失敗モード/デバッグ
- Node について不満を言う CLI が終了する: ≥ 20.18 にアップグレードします。
- マウントが適用されない: パスを確認し、絶対パスを使用し、
--verbosity=debugを追加します。 - Blueprint がローカルアセットを読み取れない:
--blueprint-may-read-adjacent-filesを追加します。 - ポートが既に使用されている:
--port=<free-port>。 - UI が遅い/ロックされている:
--experimental-multi-workerが有効になっている場合は無効にします。または、有効にして CPU バウンドの実行のスループットを向上させます。
エスカレーション
- PHP 拡張機能またはネイティブ DB アクセスが必要な場合、Playground は不適切な場合があります。フル WP スタックまたは wp-env/Docker にフォールバックします。
- ブラウザのみの埋め込みまたは VS Code 拡張機能の仕様については、アップストリームドキュメントを参照してください: https://wordpress.github.io/wordpress-playground/
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
WordPress Playground
When to use
- Spin up a disposable WordPress to test a plugin/theme without full stack setup.
- Run or iterate on Playground Blueprints (JSON) locally.
- Build a reproducible snapshot of a site for sharing or CI.
- Switch WP/PHP versions quickly to reproduce issues.
- Debug plugin/theme code with Xdebug in an isolated Playground.
Inputs required
- Host machine readiness: Node.js ≥ 20.18,
npm/npxavailable. - Project path to mount (
--auto-mountor explicit mount mapping). - Desired WP version/PHP version (optional; defaults to latest WP, PHP 8.3).
- Blueprint location/URL if running a blueprint.
- Port preference if 9400 conflicts.
- Whether Xdebug is needed.
Procedure
0) Guardrails
- Playground instances are ephemeral and SQLite-backed; never point at production data.
- Confirm Node ≥ 20.18 (
node -v) before running CLI. - If mounting local code, ensure it is clean of secrets; Playground copies files into an in-memory FS.
1) Quick local spin-up (auto-mount)
cd <plugin-or-theme-root>
npx @wp-playground/cli@latest server --auto-mount
- Opens on http://localhost:9400 by default. Auto-detects plugin/theme and installs it.
- Add
--wp=<version>/--php=<version>as needed. - For classic full installs already present, add
--skip-wordpress-setupand mount the whole tree.
2) Manual mounts or multiple mounts
- Use
--mount=/host/path:/vfs/path(repeatable) when auto-mount is insufficient (multi-plugin, mu-plugins, custom content). - Mount before install with
--mount-before-installfor bootstrapping installer flows. - Reference:
references/cli-commands.md
3) Run a Blueprint (no server needed)
npx @wp-playground/cli@latest run-blueprint --blueprint=<file-or-url>
- Use for scripted setup/CI validation. Supports remote URLs and local files.
- Allow bundled assets in local blueprints with
--blueprint-may-read-adjacent-fileswhen required. - See
references/blueprints.mdfor structure and common flags.
4) Build a snapshot for sharing
npx @wp-playground/cli@latest build-snapshot --blueprint=<file> --outfile=./site.zip
- Produces a ZIP you can load in Playground or attach to bug reports.
5) Debugging with Xdebug
- Start with
--xdebug(or--enable-xdebugdepending on CLI release) to expose an IDE key, then connect VS Code/PhpStorm to the host/port shown in CLI output. - Combine with
--auto-mountfor plugin/theme debugging. - Checklist:
references/debugging.md
6) Version switching
- Use
--wp=to pin WP (e.g., 6.9.0) and--php=to test compatibility. - If feature depends on Gutenberg trunk, prefer the latest WP release plus plugin if available; Playground images track stable WP plus bundled Gutenberg.
7) Browser-only workflows (no CLI)
- Launch quick previews with URL fragments or query params:
- Fragment:
https://playground.wordpress.net/#<base64-or-json-blueprint> - Query:
https://playground.wordpress.net/?blueprint-url=<public-url-or-zip>
- Fragment:
- Use the live Blueprint Editor (playground.wordpress.net) to author blueprints with schema help; paste JSON and copy a shareable link.
Verification
- Verify mounted code is active (plugin listed/active; theme selected).
- For blueprints/snapshots, re-run with
--verbosity=debugto confirm steps executed. - Run targeted smoke (e.g.,
wp plugin listinside Playground shell via browser terminal if exposed) or UI click-path.
Failure modes / debugging
- CLI exits complaining about Node: upgrade to ≥ 20.18.
- Mount not applied: check path, use absolute path, add
--verbosity=debug. - Blueprint cannot read local assets: add
--blueprint-may-read-adjacent-files. - Port already used:
--port=<free-port>. - Slow/locked UI: disable
--experimental-multi-workerif enabled; or enable it to improve throughput on CPU-bound runs.
Escalation
- If PHP extensions or native DB access are required, Playground may be unsuitable; fall back to full WP stack or wp-env/Docker.
- For browser-only embedding or VS Code extension specifics, consult the upstream docs: https://wordpress.github.io/wordpress-playground/
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,618 bytes)
- 📎 references/blueprints.md (1,508 bytes)
- 📎 references/cli-commands.md (1,563 bytes)
- 📎 references/debugging.md (822 bytes)