woocommerce-local-env
БесплатноБез исполняемых скриптовНе проверенSet up, start, stop, restart, verify, and troubleshoot the WooCommerce Core local development environment with wp-env and asset build watchers. Use when Codex…
от woocommerce★ 10 616 звёзд на GitHubОб этом скилле
WooCommerce Local Environment
Overview
Use this skill to get WooCommerce Core running locally without re-reading plugins/woocommerce/README.md and .wp-env.json.
Prefer short root scripts when present. Fall back to filtered package commands if the aliases are not available.
Process Ownership
Use this ownership model when deciding whether to run a command or tell the user what to run:
- Run setup checks, dependency installs, one-shot builds, and
wp-envstart/stop commands from the agent when useful for the task. These commands should complete and return control. - Treat
watch:*commands as user-owned long-running processes. Tell the user to run the relevant watcher in a separate terminal unless a short, temporary watcher session is explicitly needed for active verification. - Reuse an already-running environment when possible.
- Stop or clean up any agent-owned long-running session before finishing.
Quick Commands
Run these from the repository root:
# Start the wp-env development environment at http://localhost:8888/.
pnpm wc:env
# Stop or restart wp-env.
pnpm wc:env:stop
pnpm wc:env:restart
# Watch all WooCommerce Core build outputs.
pnpm wc:watch
# Watch targeted build outputs.
pnpm wc:watch:admin
pnpm wc:watch:blocks
pnpm wc:watch:classic-assets
# Build all or targeted outputs once.
pnpm wc:build
pnpm wc:build:admin
pnpm wc:build:blocks
pnpm wc:build:classic-assets
pnpm wc:env:restart destroys and recreates the wp-env containers, so use it only when a clean restart is intended.
Fallback commands from the WooCommerce package:
pnpm --filter='@woocommerce/plugin-woocommerce' env:dev
pnpm --filter='@woocommerce/plugin-woocommerce' env:stop
pnpm --filter='@woocommerce/plugin-woocommerce' env:restart
pnpm --filter='@woocommerce/plugin-woocommerce' build
pnpm --filter='@woocommerce/plugin-woocommerce' watch:build
pnpm --filter='@woocommerce/plugin-woocommerce' watch:build:admin
pnpm --filter='@woocommerce/plugin-woocommerce' watch:build:blocks
pnpm --filter='@woocommerce/plugin-woocommerce' watch:build:classic-assets
From plugins/woocommerce/, run the package scripts directly, for example pnpm env:dev or pnpm watch:build.
Setup Workflow
Check prerequisites when setup fails or when the user asks for first-time setup:
node --version pnpm --version php --version composer --version docker --version docker infoInstall dependencies from the repository root only when dependencies are missing or stale:
pnpm installStart the environment:
pnpm wc:envTell the user to start a watcher in a separate terminal if frontend or asset changes need live rebuilds:
pnpm wc:watch
Recommend targeted watchers for focused work to reduce noise and startup time:
- Admin client:
pnpm wc:watch:admin - Blocks client:
pnpm wc:watch:blocks - Classic assets:
pnpm wc:watch:classic-assets
Environment Details
- Development URL:
http://localhost:8888/ - PHP test environment (
.wp-env.test.json, used bytest:php:env*):http://localhost:8186/ - E2E environment (
.wp-env.e2e.json, used bywp-env:e2eand the PlaywrightBASE_URLdefault):http://localhost:8086/ - wp-env config:
plugins/woocommerce/.wp-env.json - wp-env PHP version:
8.1 - WooCommerce package:
@woocommerce/plugin-woocommerce - Source README:
plugins/woocommerce/README.md
Verification
After starting wp-env, verify the site responds:
curl -I http://localhost:8888/
For browser-based verification, open http://localhost:8888/ with the Browser plugin when the user asks to inspect or test the local site.
Testing Abilities over MCP
When a change touches a WooCommerce ability, call it through MCP the way an AI client does. The MCP Adapter is not bundled, so add it with a gitignored plugins/woocommerce/.wp-env.override.json like the one below, then run pnpm env:dev:start from plugins/woocommerce/. If that file already exists, merge into it instead of replacing it: add the adapter URL to its plugins array, keeping its existing entries and ".", and add the config keys.
{
"plugins": [ ".", "https://downloads.wordpress.org/plugin/mcp-adapter.zip" ],
"config": {
"WP_MEMORY_LIMIT": "1G",
"WP_DEBUG_DISPLAY": false
}
}
Call one ability headlessly from plugins/woocommerce/:
npx @modelcontextprotocol/inspector --cli \
--method tools/call --tool-name mcp-adapter-execute-ability \
--tool-arg ability_name=woocommerce/products-query --tool-arg 'parameters={}' \
-- pnpm exec wp-env run cli wp mcp-adapter serve --server=mcp-adapter-default-server --user=admin
- Keep the
--; without it Inspector consumes--server. - Use
pnpm exec wp-env, notpnpm wp-env, or pnpm's command echo corrupts the MCP stream. - Change
--userto check the ability's permission callback.
The full workflow is
Установить woocommerce-local-env в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл woocommerce-local-env?
Set up, start, stop, restart, verify, and troubleshoot the WooCommerce Core local development environment with wp-env and asset build watchers. Use when Codex is asked to run WooCommerce locally, prepare wp-env, watch WooCommerce builds, choose between full and targeted build/watch commands, diagnose localhost:8888, explain local environment setup commands, or test WooCommerce abilities over MCP against wp-env.
Как установить скилл woocommerce-local-env?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл woocommerce-local-env запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic