Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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-env start/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

  1. 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 info
    
  2. Install dependencies from the repository root only when dependencies are missing or stale:

    pnpm install
    
  3. Start the environment:

    pnpm wc:env
    
  4. Tell 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 by test:php:env*): http://localhost:8186/
  • E2E environment (.wp-env.e2e.json, used by wp-env:e2e and the Playwright BASE_URL default): 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, not pnpm wp-env, or pnpm's command echo corrupts the MCP stream.
  • Change --user to check the ability's permission callback.

The full workflow is

Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить woocommerce-local-env с