一键导入
worktree
Creates an isolated git worktree with its own WordPress test environment. Use when working on multi-day features or risky changes needing parallel testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates an isolated git worktree with its own WordPress test environment. Use when working on multi-day features or risky changes needing parallel testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adds changelog entries to readme.txt following keepachangelog format. Use when updating the Unreleased section or documenting changes for a release.
Reproducibly capture in-product UI screenshots (admin popovers, settings teasers, dashboard widgets) used as embedded images in premium upsell teasers. Use whenever a teaser image needs refreshing after the underlying UI changes.
Guides implementation of structured action links on log events. Use when adding get_action_links() to a logger or migrating from get_log_row_details_output().
Enforces active voice for logger messages and the Event Details API. Use when writing a new logger class or modifying message arrays in getInfo().
How to design and regenerate marketing screenshots for the wordpress.org plugin page (banner-1544x500.png, screenshot-1.png, etc). Covers the event mix that converts, the reproducible WordPress Playground pipeline that bakes it, and every non-obvious gotcha from previous shoots. Use when refreshing screenshot-1.png, banners, or any image showing the Simple History event log.
Guidance for writing and running tests in Simple History. Covers which framework to use, how to run existing tests, and how to create new ones (including the codegen recording workflow).
| name | worktree |
| description | Creates an isolated git worktree with its own WordPress test environment. Use when working on multi-day features or risky changes needing parallel testing. |
| allowed-tools | Bash, Read, Write, Edit, Glob |
| disable-model-invocation | true |
Use git worktrees for issues that require extended development (multiple days, risky changes, or parallel feature work). Each worktree gets its own branch, dependencies, and a WordPress test site.
size: 2-medium or 3-largecomplexity: branchUse the EnterWorktree Claude Code tool (not a bash command) with a descriptive name based on the issue:
EnterWorktree(name="issue-name-short")
This creates a worktree at .claude/worktrees/<name> on branch worktree-<name>.
npm install
npm run build
First generate a blueprint from the template, replacing the worktree name:
WORKTREE_NAME="<worktree-name>"
MAIN_REPO="$(dirname "$(git rev-parse --git-common-dir)")"
sed "s/WORKTREE_NAME/$WORKTREE_NAME/" "$MAIN_REPO/.claude/worktree-blueprint.json" > /tmp/wp-blueprint-$WORKTREE_NAME.json
Then start the server:
npx @wp-playground/cli@latest server \
--port=<unique-port> \
--mount=.:/wordpress/wp-content/plugins/simple-history \
--blueprint=/tmp/wp-blueprint-$WORKTREE_NAME.json &
The blueprint (/.claude/worktree-blueprint.json) automatically:
SIMPLE_HISTORY_DEV constant (enables dev mode badges and tools)If the issue involves network/multisite functionality, ask the user if they want a multisite install. If yes, add an enableMultisite step to the generated blueprint before starting:
# Add enableMultisite as the first step in the blueprint
jq '.steps = [{"step": "enableMultisite"}] + .steps' /tmp/wp-blueprint-$WORKTREE_NAME.json > /tmp/wp-blueprint-$WORKTREE_NAME-tmp.json && mv /tmp/wp-blueprint-$WORKTREE_NAME-tmp.json /tmp/wp-blueprint-$WORKTREE_NAME.json
Port assignment: Find the next available port automatically:
PORT=9400; while lsof -i :$PORT >/dev/null 2>&1; do PORT=$((PORT+1)); done; echo $PORT
Ports start at 9400 and increment for each active worktree.
Tell the user:
http://localhost:9400)--login)If the user has uncommitted changes in the main repo that should be in the worktree:
# From the main repo, list changed/untracked files
git -C "$(git rev-parse --show-toplevel)" status --short
# Copy specific files to the worktree
cp path/to/file ./path/to/file
Important: Also copy any untracked files that are imported by modified files (e.g., new components).
git -C "$(git rev-parse --show-toplevel)" worktree list
Just cd to its path. All git and npm commands work as usual.
# Find the process
lsof -i :<port> | grep LISTEN
# Kill it
kill <pid>
# Stop any running Playground server first
# Then from the main repo:
git -C "$(git rev-parse --show-toplevel)" worktree remove .claude/worktrees/<name>
Or use the ExitWorktree tool if in a Claude Code session.
When the feature is complete and tested:
cd "$(git rev-parse --show-toplevel)"
git merge worktree-<name>
.git is a file in worktrees (not a directory) — this is how you can tell you're in a worktreenode_modules is not shared — each worktree needs its own npm installnpm run build after setuplocalhost:<port>