一键导入
worktree-pr
Manage git worktrees with PR workflow and multi-agent review (Claude + Codex). Use when developing features in isolation with easy rollback.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage git worktrees with PR workflow and multi-agent review (Claude + Codex). Use when developing features in isolation with easy rollback.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | worktree-pr |
| description | Manage git worktrees with PR workflow and multi-agent review (Claude + Codex). Use when developing features in isolation with easy rollback. |
| triggers | ["worktree","parallel development","pr review","isolated feature","git isolation"] |
~/.claude/settings.json or CLI/env varsANTHROPIC_DEFAULT_*_MODEL env varsultrathink - Take a deep breath. We're not here to write code. We're here to make a dent in the universe.
Isolation should make every change safer and more inevitable.
This skill enables isolated feature development using git worktrees with a PR-based merge workflow and multi-agent code review.
Key Principles:
AskUserQuestion for isolation decisionsbrew install max-sixty/worktrunk/wtbrew install gh| Command | Description |
|---|---|
ralph worktree <task> | Create isolated worktree + launch Claude |
ralph worktree-pr <branch> | Create PR with Claude + Codex review |
ralph worktree-merge <pr> | Approve and merge PR |
ralph worktree-fix <pr> | Apply fixes from review comments |
ralph worktree-close <pr> | Close PR and cleanup without merge |
ralph worktree-status | Show all worktrees and PR status |
ralph worktree-cleanup | Clean up merged worktrees |
ralph worktree "implement oauth authentication"
# Creates: .worktrees/ai-ralph-20260103-implement-oauth-authentication/
# Branch: ai/ralph/20260103-implement-oauth-authentication
All subagents work in the same worktree:
src/api/oauth.tssrc/ui/login.tsxtests/oauth.test.tsdocs/oauth.mdEach subagent makes local commits but does NOT push.
ralph worktree-pr ai/ralph/20260103-implement-oauth-authentication
This will:
If reviews pass:
ralph worktree-merge <pr-number>
# Squash merges, deletes branch, cleans up worktree
If reviews find issues:
ralph worktree-fix <pr-number>
# Opens Claude in worktree with review comments as context
If you want to abandon:
ralph worktree-close <pr-number>
# Closes PR, deletes branch, cleans up worktree
The orchestrator automatically asks about worktree isolation (Step 2b):
AskUserQuestion:
questions:
- question: "¿Este cambio requiere un worktree aislado?"
header: "Isolation"
multiSelect: false
options:
- label: "Sí, crear worktree"
description: "Feature nueva, refactor grande, cambio experimental"
- label: "No, branch actual"
description: "Hotfix, cambio menor, ajuste simple"
When working in a worktree, subagents receive:
WORKTREE_CONTEXT:
path: .worktrees/ai-ralph-YYYYMMDD-feature/
branch: ai/ralph/YYYYMMDD-feature
isolated: true
Subagent rules:
SUBAGENT_COMPLETE: [description]Each worktree has hardened security:
core.hooksPath → .git-hooks-disabled)current branch only# User request: "Add OAuth authentication"
# Orchestrator asks about worktree
> ¿Este cambio requiere un worktree aislado?
> [Sí, crear worktree] ← User selects
# Create worktree
$ ralph worktree "oauth-authentication"
✓ Created worktree: .worktrees/ai-ralph-20260103-oauth-authentication
✓ Branch: ai/ralph/20260103-oauth-authentication
✓ Security hardening applied
# Subagents work in parallel in SAME worktree
# ... backend, frontend, tests, docs ...
# All subagents complete
# Orchestrator creates PR with review
$ ralph worktree-pr ai/ralph/20260103-oauth-authentication
✓ Pushed to origin
✓ Created PR #42
✓ Claude review: APPROVED
✓ Codex review: APPROVED with suggestions
# User decides to merge
$ ralph worktree-merge 42
✓ PR #42 merged (squash)
✓ Branch deleted
✓ Worktree cleaned up
brew install max-sixty/worktrunk/wt
wt config shell install
source ~/.zshrc
gh auth status # Verify GitHub auth
gh auth login # Re-authenticate if needed
git worktree prune # Clean orphaned metadata
ralph worktree-status # Check current state
Full orchestration workflow with swarm mode: evaluate -> clarify -> classify -> persist -> plan mode -> spawn teammates -> execute -> validate -> retrospective. Use when: (1) implementing features, (2) complex refactoring, (3) multi-file changes, (4) tasks requiring coordination. Triggers: /orchestrator, /orch, 'orchestrate', 'full workflow', 'implement feature'.
Comprehensive research skill using Zai MCP web search and native Claude Code tools
Smart Forking - Find and fork from relevant historical sessions using parallel memory search across vault, handoffs, and ledgers
Apply adversarial opposite-analysis to plans, specs, architecture, code changes, and claims. Use when the user asks for adversarial review, opposing analysis, contrarian review, red-team reasoning, or Z.ai and MiniMax cross-checks through the Ralph MCP router.
Test case mutation and variation generator for adversarial testing
Patterns for using Context7 MCP for library documentation (v2.25)