Skip to content

Add studio and studio-xdebug skills#32

Open
dknauss wants to merge 3 commits intoWordPress:trunkfrom
dknauss:add/studio-skills
Open

Add studio and studio-xdebug skills#32
dknauss wants to merge 3 commits intoWordPress:trunkfrom
dknauss:add/studio-skills

Conversation

@dknauss
Copy link
Copy Markdown

@dknauss dknauss commented Mar 20, 2026

Summary

Two new skills for developing and debugging in WordPress Studio developed with Claude Code:

  • studio — Working in Studio day-to-day: site creation, WP-CLI access via Studio's bundled PHP, SQLite database queries, plugin/theme symlink development, Playwright E2E testing, and environment troubleshooting (port conflicts, stale DNS entries, competing global configs).

  • studio-xdebug — Xdebug step debugging in Studio's WASM PHP environment: VS Code launch.json with /wordpress/ path mappings, reading enhanced stack traces from debug.log and HTTP responses, temporary diagnostic mu-plugins, and resolving port 9003 contention.

Why these are separate skills

Not all Studio users will use Xdebug, and Studio's Xdebug behavior is different enough from general Studio usage to warrant a dedicated skill for those who do use it.

Studio runs WASM PHP (not native), uses /wordpress/ as its internal document root, injects WP_DEBUG constants at the WASM bootstrap (not wp-config.php), and only allows one site to have Xdebug active at a time. These details are relevant when debugging but clutter the general Studio workflow.

What they cover

studio:

  • Site management in ~/Library/Application Support/com.wordpress.studio/
  • WP-CLI via /Applications/WordPress Studio.app/Contents/Resources/wp-cli.phar
  • SQLite database inspection
  • Plugin/theme symlink workflows
  • Playwright E2E config with reuseExistingServer
  • Port conflict diagnosis and resolution
  • Stale /etc/hosts entry cleanup
  • Global ~/.wp-cli/config.yml conflict detection

studio-xdebug:

  • Pre-flight checklist (Xdebug loaded, port 9003 clear, no competing PHP processes)
  • VS Code launch.json template with WASM path mappings
  • Stack trace reading from debug.log and HTTP responses
  • Diagnostic mu-plugin (with cleanup rules)
  • appdata-v1.json trust model (Studio overrides wp-config.php)
  • Conflict resolution for system-wide Xdebug configs in conf.d/

Test plan

  • Verify studio/SKILL.md covers the standard Studio workflow without referencing other dev environment tools
  • Verify studio-xdebug/SKILL.md path mappings use /wordpress/ (WASM internal root)
  • Confirm both skills follow the existing structure (SKILL.md, agents/, references/)
  • Test with Claude Code: ask to "set up a plugin in Studio" — should activate studio skill
  • Test with Claude Code: ask to "debug PHP in Studio with Xdebug" — should activate studio-xdebug skill

dknauss and others added 2 commits March 20, 2026 17:35
Two new skills for developing and debugging in WordPress Studio:

studio — Covers site creation, WP-CLI via Studio's bundled PHP, SQLite
database access, plugin/theme symlink workflows, Playwright E2E testing,
and environment troubleshooting. Includes defensive checks for common
conflicts: port collisions, stale /etc/hosts entries, global WP-CLI
configs, and rogue processes on development ports.

studio-xdebug — Covers Xdebug step debugging in Studio's WASM PHP
environment: VS Code launch.json with /wordpress/ path mappings, reading
enhanced stack traces, diagnostic mu-plugins, and resolving port 9003
contention. Documents Studio-specific behaviors (appdata-v1.json trust
over wp-config.php, single-site Xdebug constraint, WASM internal paths).

Both skills include agents/ configs (Claude and OpenAI) and references/
with canonical source links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CI runner (eval/harness/run.mjs) requires a 'compatibility' field in
each SKILL.md frontmatter. Both studio and studio-xdebug were missing it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dknauss dknauss marked this pull request as ready for review March 21, 2026 00:05
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dknauss <dpknauss@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Corrections and additions based on actual Studio + Local coexistence testing:

- Fix site path: ~/Studio/<site-name>/, not ~/Library/Application Support/
- Document appdata-v1.json as authoritative config: customDomain and
  enableHttps override wp-config.php and database at WASM bootstrap
- Document that appdata changes require full Studio quit/reopen
- Document custom domain conflicts with other web servers on ports 80/443
- Expand troubleshooting checklist with HTTPS redirect loop, custom domain
  routing, and appdata-specific debugging steps
- Remove redundant Xdebug section (defers to studio-xdebug skill)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant