wp-playground
bởi wordpress
Các phiên bản WordPress nhanh, dùng một lần trong trình duyệt hoặc cục bộ qua CLI, với tính năng tự động gắn kết, chuyển đổi phiên bản và gỡ lỗi Xdebug. Khởi tạo các trang WordPress tạm thời trong WebAssembly với SQLite; hỗ trợ WordPress 6.9+ và PHP 7.2.24+, với khả năng chuyển đổi phiên bản nhanh để kiểm tra tương thích. Các lệnh CLI bao gồm server (tự động gắn kết plugin/chủ đề), run-blueprint (thiết lập theo kịch bản) và build-snapshot (xuất ZIP có thể chia sẻ) qua Node.js 20.18+. Tự động phát hiện và gắn kết mã plugin hoặc chủ đề cục bộ;...
npx skills add https://github.com/wordpress/agent-skills --skill wp-playgroundWordPress Playground
This is a thin routing wrapper. Use it to pick the right Playground workflow, then load only the focused reference or skill needed for the task.
Procedure
- Identify the user intent: Blueprint authoring/review, local CLI execution, browser-only website/share link workflow, Xdebug/stuck CLI run, or a mixed Playground request.
- Route to the focused source below, loading more than one only when the request has multiple distinct parts.
- For mixed requests, delegate Blueprint JSON work to
blueprint, then return here for runtime, CLI, debugging, or sharing guidance.
- Blueprint JSON, schema, steps, resources, bundles, or Blueprint review: use the
blueprintskill directly. Do not duplicate Blueprint schema details here. - Local CLI execution: read
references/cli.mdfor@wp-playground/cliserver,run-blueprint,build-snapshot, mounts, version switching, and local validation. - Xdebug or stuck CLI runs: read
references/debugging.mdfor Xdebug, runtime logs, worker flags, and stuck CLI runs. - Browser-only Playground website workflows: read
references/website.mdforplayground.wordpress.net, share URLs, Blueprint Editor, hosted bundles, and browser limitations.
Inputs required
- The intended workflow: Blueprint authoring, local CLI run, website/share link, snapshot, or debugging.
- Project or bundle path if local code must be mounted or packaged.
- Desired WordPress/PHP versions if compatibility matters.
- Port preference if a local server is needed.
- Whether browser-only sharing or local filesystem access is required.
Guardrails
- Playground instances are disposable, SQLite-backed environments; never point them at production data.
- Keep Blueprint JSON guidance in
blueprintso the schema and examples have one source of truth. - For local CLI work, verify Node.js 20.18+ and
npm/npxbefore running commands. - Browser-only Playground cannot read local filesystem paths; use public URLs, hosted ZIP bundles, or inline Blueprint JSON.
Verification
- For Blueprint content, validate against the published schema and follow the
blueprintskill verification. - For local CLI runs, verify the mounted plugin/theme or Blueprint side effects in the Playground instance.
- For share links, open the generated URL and confirm the expected landing page and installed assets load.
Failure modes
- Blueprint work routed here: stop and use the
blueprintskill for schema keys, steps, resources, bundles, validation, or Blueprint review. - Local filesystem needed in a browser-only workflow: use
references/cli.md;playground.wordpress.netcannot read local filesystem paths. - Shareable browser link requested from a local CLI workflow: use
references/website.md; local server URLs are not portable share links. - Debugging treated as a second-hop reference: read
references/debugging.mddirectly for Xdebug, logs, worker flags, and stuck CLI runs.
Escalation
- If the task needs PHP extensions, native database access, persistence, or production-like infrastructure that Playground cannot provide, use a full WordPress stack such as wp-env, Docker, or the project-provided environment.