Manages git worktrees for isolated worker environments in ralph-loop++.
Creates isolated git worktrees for parallel workers with environment files and node_modules symlinks. Used when spawning workers to ensure clean, reproducible environments.
/plugin marketplace add ponderingBGI/ralph-loop-pp/plugin install ponderingbgi-ralph-loop-pp-plugin@ponderingBGI/ralph-loop-ppThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Manages git worktrees for isolated worker environments in ralph-loop++.
Create a new isolated worktree for a worker:
# Generate unique branch name
SESSION_ID="$1"
WORKER_NUM="$2"
WORKTREE_BASE="/var/tmp/ralph-plus-worktrees"
WORKTREE_PATH="${WORKTREE_BASE}/${SESSION_ID}/worker-${WORKER_NUM}"
BRANCH_NAME="ralph-plus/${SESSION_ID}/worker-${WORKER_NUM}"
# Create base directory
mkdir -p "$(dirname "$WORKTREE_PATH")"
# Create worktree with new branch
git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH"
# Copy environment files
for env_file in .env .env.local .env.development .env.development.local; do
if [[ -f "$env_file" ]]; then
cp "$env_file" "$WORKTREE_PATH/"
fi
done
# Copy node_modules symlink (faster than npm install)
if [[ -d "node_modules" ]]; then
ln -s "$(pwd)/node_modules" "$WORKTREE_PATH/node_modules"
fi
echo "$WORKTREE_PATH"
List all ralph-loop++ worktrees:
git worktree list | grep "ralph-plus"
Clean up a specific worktree:
WORKTREE_PATH="$1"
BRANCH_NAME=$(git -C "$WORKTREE_PATH" rev-parse --abbrev-ref HEAD)
# Remove the worktree
git worktree remove "$WORKTREE_PATH" --force
# Delete the branch
git branch -D "$BRANCH_NAME" 2>/dev/null || true
Remove all worktrees for a session:
SESSION_ID="$1"
WORKTREE_BASE="/var/tmp/ralph-plus-worktrees/${SESSION_ID}"
# Remove each worktree
for worktree in "$WORKTREE_BASE"/worker-*; do
if [[ -d "$worktree" ]]; then
git worktree remove "$worktree" --force 2>/dev/null || true
fi
done
# Remove base directory
rm -rf "$WORKTREE_BASE"
# Clean up branches
git branch | grep "ralph-plus/${SESSION_ID}" | xargs -I {} git branch -D {} 2>/dev/null || true
/var/tmp/ralph-plus-worktrees//var/tmp/ralph-plus-worktrees/{session_id}//var/tmp/ralph-plus-worktrees/{session_id}/worker-{n}/ralph-plus/{session_id}/worker-{n}ralph-plus/rp-1704567890123/worker-1When creating a worktree, copy:
.env - Production/default environment.env.local - Local overrides.env.development - Development settings.env.development.local - Local dev overrides.env.test - Test environment (if running tests)For Node.js projects, there are two strategies:
ln -s "$(pwd)/node_modules" "$WORKTREE_PATH/node_modules"
cd "$WORKTREE_PATH" && npm install
if [[ -d "$WORKTREE_PATH" ]]; then
echo "Worktree already exists, removing first"
git worktree remove "$WORKTREE_PATH" --force
fi
if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME"; then
echo "Branch already exists, deleting first"
git branch -D "$BRANCH_NAME"
fi
# Force removal even with uncommitted changes
git worktree remove "$WORKTREE_PATH" --force
The orchestrator uses this skill to:
Another worktree has the same branch. Use unique branch names per session/worker.
Trying to remove the main repository. Check path is correct.
If worktrees exist but aren't in git worktree list:
git worktree prune
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.