wp-env — Claude Code skill: what it does, how to install
Configures and manages Docker-based WordPress environments using @wordpress/env. Useful when you need a real MySQL database, WP-CLI, or PHPUnit testing.
npx skills add WordPress/agent-skills --skill wp-env -a claude-codeWhat wp-env does
The skill guides your agent through setting up and troubleshooting local WordPress environments via @wordpress/env. It detects plugins, themes, or core checkouts from the folder structure and handles configurations defined in .wp-env.json and .wp-env.override.json.
Commands execute inside dedicated containers such as cli, wordpress, or mysql. This approach keeps real MySQL data intact between restarts and provides shell access through wp-env run. Keep Docker running before triggering any commands, or the setup halts immediately.
You need Node.js 18.12.0 or newer alongside an active Docker installation. Bare plugin slugs from WordPress.org will fail in the configuration file; you must provide direct ZIP download URLs or GitHub paths instead.
What it helps with
- spin up a Docker-based WordPress instance for plugins or themes
- run PHPUnit test suites against a persistent MySQL database
- execute WP-CLI commands inside the environment container
- configure Xdebug on port 9003 for PHP troubleshooting
Example prompts for the agent
- Start a local WordPress environment with wp-env and enable Xdebug
- Run PHPUnit tests inside the wp-env container
- Reset the wp-env development database
How to install wp-env
1Skills CLI (Vercel)
npx skills add WordPress/agent-skills --skill wp-env -a claude-code2Manually: put the files in place
~/.claude/skills/wp-env/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/wp-env/
1Skills CLI (Vercel)
npx skills add WordPress/agent-skills --skill wp-env -a codex2Manually: put the files in place
.agents/skills/wp-env/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add WordPress/agent-skills --skill wp-env -a cursor2Manually: put the files in place
.cursor/skills/wp-env/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install WordPress/agent-skills wp-env2Manually: put the files in place
.github/skills/wp-env/SKILL.md1Skills CLI (Vercel)
npx skills add WordPress/agent-skills --skill wp-env -a gemini-cli2Platform CLI
gemini skills install https://github.com/WordPress/agent-skills --path skills/wp-envManually: put the files in place
.devin/skills/wp-env/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add WordPress/agent-skills --skill wp-env -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about wp-env
How do I install wp-env in Claude Code?
Run npx skills add WordPress/agent-skills --skill wp-env -a claude-code in your terminal.
What does the wp-env skill do?
It instructs the agent on managing Docker-based WordPress development, writing .wp-env.json configs, and running WP-CLI commands.
When should you pick wp-env over wp-playground?
Choose wp-env when your workflow requires a persistent MySQL database, arbitrary container execution via wp-env run, or full WP-CLI access.