[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ANRVRCX5F5NXWHR94QCAPD":3,"skill-same:01M7ANRVRCX5F5NXWHR94QCAPD":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ANRVRCX5F5NXWHR94QCAPD","worktree-guide",null,"Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.","GongYuanCaiJi\u002Fdsh-claude-code-templates","GongYuanCaiJi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F129952120?v=4","01M7AK39Q4W3VPF7C1K8M58BFX","劉昱廷 Yu-Ting Liu","01M7AK39QPS2RAJKRQY0EPQJPZ",0,"MIT","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fworktree-guide\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: worktree-guide\ndescription: Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.\nlicense: MIT\nmetadata:\n  author: claude-code-templates\n  version: \"1.0\"\n---\n\nGuide the user through parallel development workflows using Ghostty terminal panels, git worktrees, and Lazygit. This is both a teaching experience and a practical reference.\n\n---\n\n## Preflight\n\nBefore starting, detect the user's environment:\n\n```bash\ngit rev-parse --is-inside-work-tree 2>&1 && echo \"GIT_OK\" || echo \"NOT_GIT\"\n```\n\n**If not a git repo:**\n> This isn't a git repository. Navigate to a git project first, then come back to `\u002Fworktree-guide`.\n\nCheck if we're in a worktree or main repo:\n```bash\ngit worktree list\npwd\n```\n\nNote the context for later guidance.\n\n---\n\n## Phase 1: Welcome & Context Detection\n\nDisplay based on environment:\n\n**If in main repo:**\n```\n## Worktree Parallel Development Guide\n\nWelcome! I'll guide you through setting up and using parallel worktrees for multi-task development.\n\n┌─────────────────────────────────────────────────────────────┐\n│  Ghostty Terminal                                           │\n│  ┌──────────────────────┬──────────────────────┐           │\n│  │                      │                      │           │\n│  │   Claude (Task 1)    │   Claude (Task 2)    │           │\n│  │   claude\u002Flogin-page   │   claude\u002Ffix-auth-bug │           │\n│  │                      │                      │           │\n│  ├──────────────────────┴──────────────────────┤           │\n│  │              Lazygit (monitoring)           │           │\n│  └─────────────────────────────────────────────┘           │\n└─────────────────────────────────────────────────────────────┘\n\n**Your workflow:**\n1. Create worktrees → `\u002Fworktree-init`\n2. Open Ghostty panels → `Cmd+D` \u002F `Cmd+Shift+D`\n3. Run Claude in each panel → `cd \u003Cworktree> && claude`\n4. Deliver when done → `\u002Fworktree-deliver`\n5. Clean up → `\u002Fworktree-cleanup`\n\nWhat would you like to do?\n```\n\nUse AskUserQuestion:\n- \"Learn the full workflow\" — Start from Phase 2\n- \"Just show keybindings\" — Jump to Quick Reference\n- \"Create worktrees now\" — Suggest `\u002Fworktree-init`\n- \"Something else\" — Ask what they need\n\n**If already in a worktree:**\n```\n## Worktree Status\n\nYou're already inside a worktree! Let me check your status.\n```\n\nThen run the equivalent of `\u002Fworktree-check` and provide contextual guidance.\n\n---\n\n## Phase 2: Ghostty Essentials\n\n**EXPLAIN:**\n```\n## Ghostty Panel Management\n\nGhostty's panel system is perfect for parallel development. Here are the essential keybindings:\n```\n\n**SHOW:**\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    GHOSTTY KEYBINDINGS                      │\n├─────────────────────────────────────────────────────────────┤\n│                                                             │\n│  SPLITTING                                                  │\n│  ─────────                                                  │\n│  Cmd+D           Split panel to the right                   │\n│  Cmd+Shift+D     Split panel below                          │\n│                                                             │\n│  NAVIGATION                                                 │\n│  ─────────                                                  │\n│  Cmd+Alt+←\u002F→\u002F↑\u002F↓ Move focus between panels                  │\n│  Cmd+[\u002F]         Cycle through panels                       │\n│                                                             │\n│  SIZING                                                     │\n│  ─────────                                                  │\n│  Cmd+Shift+E     Equalize all panel sizes                   │\n│  Cmd+Shift+F     Toggle zoom (fullscreen current panel)     │\n│                                                             │\n│  CLOSING                                                    │\n│  ─────────                                                  │\n│  Cmd+W           Close current panel                        │\n│                                                             │\n└─────────────────────────────────────────────────────────────┘\n\n**Pro tip:** Use Cmd+Shift+F to zoom into a panel when you need focus, then press it again to return to the multi-panel view.\n```\n\n**PAUSE** - \"Ready to learn about Lazygit? (Or skip to workflow)\"\n\n---\n\n## Phase 3: Lazygit Essentials\n\n**EXPLAIN:**\n```\n## Lazygit for Monitoring Worktrees\n\nLazygit gives you a visual overview of all your worktrees and their changes. Run it from your main repo to monitor everything.\n```\n\n**SHOW:**\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    LAZYGIT KEYBINDINGS                      │\n├─────────────────────────────────────────────────────────────┤\n│                                                             │\n│  WORKTREES (navigate to Worktrees panel)                    │\n│  ─────────                                                  │\n│  w              Switch to worktree panel (or create new)    │\n│  Enter          Switch to selected worktree                 │\n│  n              Create new worktree                         │\n│  d              Delete worktree (with confirmation)         │\n│                                                             │\n│  FILES & STAGING                                            │\n│  ─────────                                                  │\n│  Space          Stage\u002Funstage file                          │\n│  a              Stage all files                             │\n│  Enter          View file diff (with Delta highlighting)    │\n│                                                             │\n│  COMMITS                                                    │\n│  ─────────                                                  │\n│  c              Commit staged changes                       │\n│  C              Commit with editor                          │\n│  A              Amend last commit                           │\n│                                                             │\n│  SYNC                                                       │\n│  ─────────                                                  │\n│  P              Push                                        │\n│  p              Pull                                        │\n│  f              Fetch                                       │\n│                                                             │\n│  GENERAL                                                    │\n│  ─────────                                                  │\n│  ?              Help (context-sensitive)                    │\n│  q              Quit \u002F go back                              │\n│  Tab            Switch panels                               │\n│                                                             │\n└─────────────────────────────────────────────────────────────┘\n\n**Monitoring workflow:**\n1. Open lazygit in the main repo (or a dedicated Ghostty panel)\n2. Press `w` to see all worktrees\n3. Use Enter to dive into any worktree's changes\n4. Press `q` to go back to the worktree list\n```\n\n**PAUSE** - \"Ready for the full workflow walkthrough?\"\n\n---\n\n## Phase 4: Complete Workflow (Guided)\n\n**EXPLAIN:**\n```\n## Full Parallel Development Workflow\n\nLet me walk you through the complete cycle. We'll go step by step.\n```\n\n### Step 4.1: Create Worktrees\n\n**EXPLAIN:**\n```\n### Step 1: Create Worktrees\n\nFirst, define the tasks you want to work on in parallel. The `\u002Fworktree-init` command creates a worktree for each task.\n```\n\n**DO:** Show example command:\n```\nExample usage:\n\n\u002Fworktree-init add user authentication | fix login bug | improve dashboard performance\n\nThis creates:\n├── ..\u002Fworktrees\u002F\u003Crepo>\u002Fclaude-add-user-authentication\u002F\n├── ..\u002Fworktrees\u002F\u003Crepo>\u002Fclaude-fix-login-bug\u002F\n└── ..\u002Fworktrees\u002F\u003Crepo>\u002Fclaude-improve-dashboard-performance\u002F\n```\n\n### Step 4.2: Open Ghostty Panels\n\n**EXPLAIN:**\n```\n### Step 2: Open Ghostty Panels\n\nNow split your terminal into panels—one for each task, plus optionally one for Lazygit monitoring.\n```\n\n**DO:**\n```\n1. Press Cmd+D to split right (first worktree)\n2. Press Cmd+D again (second worktree)\n3. Optionally press Cmd+Shift+D on any panel for Lazygit below\n\nResulting layout:\n┌──────────┬──────────┬──────────┐\n│ Task 1   │ Task 2   │ Task 3   │\n│ claude   │ claude   │ claude   │\n├──────────┴──────────┴──────────┤\n│           lazygit              │\n└────────────────────────────────┘\n```\n\n### Step 4.3: Work in Each Panel\n\n**EXPLAIN:**\n```\n### Step 3: Work Independently\n\nIn each panel:\n1. cd to the worktree path (from the commands output)\n2. Run `claude` to start a Claude session\n3. Use `\u002Fworktree-check` anytime to verify which task you're working on\n4. Work normally—Claude doesn't know about other panels\n```\n\n### Step 4.4: Deliver Completed Work\n\n**EXPLAIN:**\n```\n### Step 4: Deliver When Done\n\nWhen you finish a task in any panel, use `\u002Fworktree-deliver` to:\n1. Review your changes\n2. Create a commit\n3. Push to remote\n4. Create a pull request\n```\n\n### Step 4.5: Clean Up\n\n**EXPLAIN:**\n```\n### Step 5: Clean Up After Merging\n\nAfter your PRs are merged on GitHub:\n1. Go back to the main repo (not a worktree)\n2. Run `\u002Fworktree-cleanup --all`\n3. It removes merged worktrees and branches\n```\n\n---\n\n## Phase 5: Troubleshooting\n\n**SHOW:**\n```\n## Troubleshooting\n\n### \"I'm not sure which worktree I'm in\"\n\nRun `\u002Fworktree-check` — it shows your branch, task, and status.\n\nAlternatively:\n$ git branch --show-current    # Shows claude\u002F\u003Cname>\n$ pwd                          # Shows the worktree path\n\n---\n\n### \"I have uncommitted changes and want to switch tasks\"\n\n**Option 1:** Commit work-in-progress\n$ git add . && git commit -m \"wip: progress on feature\"\n\n**Option 2:** Stash changes (temporary)\n$ git stash push -m \"wip: parking changes\"\n\nThen in the other panel, continue working. Come back later with:\n$ git stash pop\n\n---\n\n### \"I accidentally started working in the wrong worktree\"\n\n1. Stash your changes: `git stash push -m \"work done in wrong place\"`\n2. Navigate to the correct worktree\n3. Apply the stash: `git stash pop`\n\n---\n\n### \"My worktree has merge conflicts\"\n\n1. Run `git fetch origin` to get latest\n2. Run `git rebase origin\u002Fmain` (or merge if you prefer)\n3. Resolve conflicts in your editor\n4. `git add .` then `git rebase --continue`\n\n---\n\n### \"I want to abandon a worktree\"\n\nFrom the main repo:\n$ git worktree remove ..\u002Fworktrees\u002Frepo\u002Fclaude-\u003Cname> --force\n$ git branch -D claude\u002F\u003Cname>\n\nNote: Force is needed if there are uncommitted changes.\n\n---\n\n### \"\u002Fworktree-deliver failed on push\"\n\nUsually means the remote branch doesn't exist yet or there's a conflict.\n\nTry:\n$ git push -u origin HEAD\n\nIf there's a conflict with remote, pull first:\n$ git pull --rebase origin claude\u002F\u003Cname>\n\n---\n\n### \"The worktree path doesn't exist anymore\"\n\nThe worktree was probably deleted manually. Clean up the git state:\n$ git worktree prune\n```\n\n---\n\n## Phase 6: Quick Reference Card\n\n**SHOW:**\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                         WORKTREE QUICK REFERENCE                            │\n├─────────────────────────────────────────────────────────────────────────────┤\n│                                                                             │\n│  COMMANDS                                                                   │\n│  ─────────                                                                  │\n│  \u002Fworktree-init \u003Ctask1> | \u003Ctask2>    Create worktrees for parallel tasks    │\n│  \u002Fworktree-check                     Show current worktree status & task    │\n│  \u002Fworktree-deliver                   Commit, push, and create PR            │\n│  \u002Fworktree-cleanup --all             Remove merged worktrees and branches   │\n│  \u002Fworktree-cleanup --dry-run         Preview what would be cleaned up       │\n│                                                                             │\n│  GHOSTTY                                                                    │\n│  ─────────                                                                  │\n│  Cmd+D              Split right     │  Cmd+Shift+E    Equalize panels      │\n│  Cmd+Shift+D        Split down      │  Cmd+Shift+F    Zoom toggle          │\n│  Cmd+Alt+Arrows     Navigate        │  Cmd+W          Close panel          │\n│                                                                             │\n│  LAZYGIT                                                                    │\n│  ─────────                                                                  │\n│  w                  Worktrees panel │  Space          Stage\u002Funstage        │\n│  Enter              View diff       │  c              Commit               │\n│  P                  Push            │  ?              Help                 │\n│                                                                             │\n│  GIT (manual)                                                               │\n│  ─────────                                                                  │\n│  git worktree list                   List all worktrees                     │\n│  git worktree add -b claude\u002Fname path Create worktree manually               │\n│  git worktree remove path            Remove a worktree                      │\n│  git worktree prune                  Clean up stale worktree refs           │\n│                                                                             │\n│  WORKFLOW                                                                   │\n│  ─────────                                                                  │\n│  1. \u002Fworktree-init tasks...          Create worktrees                       │\n│  2. Cmd+D (split panels)             Open Ghostty panels                    │\n│  3. cd \u003Cpath> && claude              Start Claude in each                   │\n│  4. \u002Fworktree-deliver                PR when done                           │\n│  5. \u002Fworktree-cleanup                Clean up after merge                   │\n│                                                                             │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Guardrails\n\n- **Never execute destructive commands** without confirmation (worktree remove, branch delete)\n- **Always verify location** before suggesting worktree operations\n- **If user seems lost**, offer `\u002Fworktree-check` first\n- **Never force-delete** branches that aren't merged\n- **Don't assume tools are installed** — check for lazygit availability if suggesting it\n- **Respect user's pace** — don't rush through sections if they want to practice\n- **Keep the reference card available** — offer to show it whenever relevant\n","Guide the user through parallel development workflows using Ghostty terminal panels, git worktrees, and Lazygit. This is both a teaching experience and a practical reference.\n\n---\n\n## Preflight\n\nBefore starting, detect the user's environment:\n\n```bash\ngit rev-parse --is-inside-work-tree 2>&1 && echo \"GIT_OK\" || echo \"NOT_GIT\"\n```\n\n**If not a git repo:**\n> This isn't a git repository. Navigate to a git project first, then come back to `\u002Fworktree-guide`.\n\nCheck if we're in a worktree or main repo:\n```bash\ngit worktree list\npwd\n```\n\nNote the context for later guidance.\n\n---\n\n## Phase 1: Welcome & Context Detection\n\nDisplay based on environment:\n\n**If in main repo:**\n```\n## Worktree Parallel Development Guide\n\nWelcome! I'll guide you through setting up and using parallel worktrees for multi-task development.\n\n┌─────────────────────────────────────────────────────────────┐\n│  Ghostty Terminal                                           │\n│  ┌──────────────────────┬──────────────────────┐           │\n│  │                      │                      │           │\n│  │   Claude (Task 1)    │   Claude (Task 2)    │           │\n│  │   claude\u002Flogin-page   │   claude\u002Ffix-auth-bug │           │\n│  │                      │                      │           │\n│  ├──────────────────────┴──────────────────────┤           │\n│  │              Lazygit (monitoring)           │           │\n│  └─────────────────────────────────────────────┘           │\n└─────────────────────────────────────────────────────────────┘\n\n**Your workflow:**\n1. Create worktrees → `\u002Fworktree-init`\n2. Open Ghostty panels → `Cmd+D` \u002F `Cmd+Shift+D`\n3. Run Claude in each panel → `cd \u003Cworktree> && claude`\n4. Deliver when done → `\u002Fworktree-deliver`\n5. Clean up → `\u002Fworktree-cleanup`\n\nWhat would you like to do?\n```\n\nUse AskUserQuestion:\n- \"Learn the full workflow\" — Start from Phase 2\n- \"Just show keybindings\" — Jump to Quick Reference\n- \"Create worktrees now\" — Suggest `\u002Fworktree-init`\n- \"Something else\" — Ask what they need\n\n**If already in a worktree:**\n```\n## Worktree Status\n\nYou're already inside a worktree! Let me check your status.\n```\n\nThen run the equivalent of `\u002Fworktree-check` and provide contextual guidance.\n\n---\n\n## Phase 2: Ghostty Essentials\n\n**EXPLAIN:**\n```\n## Ghostty Panel Management\n\nGhostty's panel system is perfect for parallel development. Here are the essential keybindings:\n```\n\n**SHOW:**\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    GHOSTTY KEYBINDINGS                      │\n├─────────────────────────────────────────────────────────────┤\n│                                                             │\n│  SPLITTING                                                  │\n│  ─────────                                                  │\n│  Cmd+D           Split panel to the right                   │\n│  Cmd+Shift+D     Split panel below                          │\n│                                                             │\n│  NAVIGATION                                                 │\n│  ─────────                                                  │\n│  Cmd+Alt+←\u002F→\u002F↑\u002F↓ Move focus between panels                  │\n│  Cmd+[\u002F]         Cycle through panels                       │\n│                                                             │\n│  SIZING                                                     │\n│  ─────────                                                  │\n│  Cmd+Shift+E     Equalize all panel sizes                   │\n│  Cmd+Shift+F     Toggle zoom (fullscreen current panel)     │\n│                                                             │\n│  CLOSING                                                    │\n│  ─────────                                                  │\n│  Cmd+W           Close current panel                        │\n│                                                             │\n└─────────────────────────────────────────────────────────────┘\n\n**Pro tip:** Use Cmd+Shift+F to zoom into a panel when you need focus, then press it again to return to the multi-panel view.\n```\n\n**PAUSE** - \"Ready to learn about Lazygit? (Or skip to workflow)\"\n\n---\n\n## Phase 3: Lazygit Essentials\n\n**EXPLAIN:**\n```\n## Lazygit for Monitoring Worktrees\n\nLazygit gives you a visual overview of all your worktrees and their changes. Run it from your main repo to monitor everything.\n```\n\n**SHOW:**\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    LAZYGIT KEYBINDINGS                      │\n├─────────────────────────────────────────────────────────────┤\n│                                                             │\n│  WORKTREES (navigate to Worktrees panel)                    │\n│  ─────────                                                  │\n│  w              Switch to worktree panel (or create new)    │\n│  Enter          Switch to selected worktree                 │\n│  n              Create new worktree                         │\n│  d              Delete worktree (with confirmation)         │\n│                                                             │\n│  FILES & STAGING                                            │\n│  ─────────                                                  │\n│  Space          Stage\u002Funstage file                          │\n│  a              Stage all files                             │\n│  Enter          View file diff (with Delta highlighting)    │\n│                                                             │\n│  COMMITS                                                    │\n│  ─────────                                                  │\n│  c              Commit staged changes                       │\n│  C              Commit with editor                          │\n│  A              Amend last commit                           │\n│                                                             │\n│  SYNC                                                       │\n│  ─────────                                                  │\n│  P              Push                                        │\n│  p              Pull                                        │\n│  f              Fetch                                       │\n│                                                             │\n│  GENERAL                                                    │\n│  ─────────                                                  │\n│  ?              Help (context-sensitive)                    │\n│  q              Quit \u002F go back                              │\n│  Tab            Switch panels                               │\n│                                                             │\n└─────────────────────────────────────────────────────────────┘\n\n**Monitoring workflow:**\n1. Open lazygit in the main repo (or a dedicated Ghostty panel)\n2. Press `w` to see all worktrees\n3. Use Enter to dive into any worktree's changes\n4. Press `q` to go back to the worktree list\n```\n\n**PAUSE** - \"Ready for the full workflow walkthrough?\"\n\n---\n\n## Phase 4: Complete Workflow (Guided)\n\n**EXPLAIN:**\n```\n## Full Parallel Development Workflow\n\nLet me walk you through the complete cycle. We'll go step by step.\n```\n\n### Step 4.1: Create Worktrees\n\n**EXPLAIN:**\n```\n### Step 1: Create Worktrees\n\nFirst, define the tasks you want to work on in parallel. The `\u002Fworktree-init` command creates a worktree for each task.\n```\n\n**DO:** Show example command:\n```\nExample usage:\n\n\u002Fworktree-init add user authentication | fix login bug | improve dashboard performance\n\nThis creates:\n├── ..\u002Fworktrees\u002F\u003Crepo>\u002Fclaude-add-user-authentication\u002F\n├── ..\u002Fworktrees\u002F\u003Crepo>\u002Fclaude-fix-login-bug\u002F\n└── ..\u002Fworktrees\u002F\u003Crepo>\u002Fclaude-improve-dashboard-performance\u002F\n```\n\n### Step 4.2: Open Ghostty Panels\n\n**EXPLAIN:**\n```\n### Step 2: Open Ghostty Panels\n\nNow split your terminal into panels—one for each task, plus optionally one for Lazygit monitoring.\n```\n\n**DO:**\n```\n1. Press Cmd+D to split right (first worktree)\n2. Press Cmd+D again (second worktree)\n3. Optionally press Cmd+Shift+D on any panel for Lazygit below\n\nResulting layout:\n┌──────────┬──────────┬──────────┐\n│ Task 1   │ Task 2   │ Task 3   │\n│ claude   │ claude   │ claude   │\n├──────────┴──────────┴──────────┤\n│           lazygit              │\n└────────────────────────────────┘\n```\n\n### Step 4.3: Work in Each Panel\n\n**EXPLAIN:**\n```\n### Step 3: Work Independently\n\nIn each panel:\n1. cd to the worktree path (from the commands output)\n2. Run `claude` to start a Claude session\n3. Use `\u002Fworktree-check` anytime to verify which task you're working on\n4. Work normally—Claude doesn't know about other panels\n```\n\n### Step 4.4: Deliver Completed Work\n\n**EXPLAIN:**\n```\n### Step 4: Deliver When Done\n\nWhen you finish a task in any panel, use `\u002Fworktree-deliver` to:\n1. Review your changes\n2. Create a commit\n3. Push to remote\n4. Create a pull request\n```\n\n### Step 4.5: Clean Up\n\n**EXPLAIN:**\n```\n### Step 5: Clean Up After Merging\n\nAfter your PRs are merged on GitHub:\n1. Go back to the main repo (not a worktree)\n2. Run `\u002Fworktree-cleanup --all`\n3. It removes merged worktrees and branches\n```\n\n---\n\n## Phase 5: Troubleshooting\n\n**SHOW:**\n```\n## Troubleshooting\n\n### \"I'm not sure which worktree I'm in\"\n\nRun `\u002Fworktree-check` — it shows your branch, task, and status.\n\nAlternatively:\n$ git branch --show-current    # Shows claude\u002F\u003Cname>\n$ pwd                          # Shows the worktree path\n\n---\n\n### \"I have uncommitted changes and want to switch tasks\"\n\n**Option 1:** Commit work-in-progress\n$ git add . && git commit -m \"wip: progress on feature\"\n\n**Option 2:** Stash changes (temporary)\n$ git stash push -m \"wip: parking changes\"\n\nThen in the other panel, continue working. Come back later with:\n$ git stash pop\n\n---\n\n### \"I accidentally started working in the wrong worktree\"\n\n1. Stash your changes: `git stash push -m \"work done in wrong place\"`\n2. Navigate to the correct worktree\n3. Apply the stash: `git stash pop`\n\n---\n\n### \"My worktree has merge conflicts\"\n\n1. Run `git fetch origin` to get latest\n2. Run `git rebase origin\u002Fmain` (or merge if you prefer)\n3. Resolve conflicts in your editor\n4. `git add .` then `git rebase --continue`\n\n---\n\n### \"I want to abandon a worktree\"\n\nFrom the main repo:\n$ git worktree remove ..\u002Fworktrees\u002Frepo\u002Fclaude-\u003Cname> --force\n$ git branch -D claude\u002F\u003Cname>\n\nNote: Force is needed if there are uncommitted changes.\n\n---\n\n### \"\u002Fworktree-deliver failed on push\"\n\nUsually means the remote branch doesn't exist yet or there's a conflict.\n\nTry:\n$ git push -u origin HEAD\n\nIf there's a conflict with remote, pull first:\n$ git pull --rebase origin claude\u002F\u003Cname>\n\n---\n\n### \"The worktree path doesn't exist anymore\"\n\nThe worktree was probably deleted manually. Clean up the git state:\n$ git worktree prune\n```\n\n---\n\n## Phase 6: Quick Reference Card\n\n**SHOW:**\n```\n┌─────────────────────────────────────────────────────────────────────────────┐\n│                         WORKTREE QUICK REFERENCE                            │\n├─────────────────────────────────────────────────────────────────────────────┤\n│                                                                             │\n│  COMMANDS                                                                   │\n│  ─────────                                                                  │\n│  \u002Fworktree-init \u003Ctask1> | \u003Ctask2>    Create worktrees for parallel tasks    │\n│  \u002Fworktree-check                     Show current worktree status & task    │\n│  \u002Fworktree-deliver                   Commit, push, and create PR            │\n│  \u002Fworktree-cleanup --all             Remove merged worktrees and branches   │\n│  \u002Fworktree-cleanup --dry-run         Preview what would be cleaned up       │\n│                                                                             │\n│  GHOSTTY                                                                    │\n│  ─────────                                                                  │\n│  Cmd+D              Split right     │  Cmd+Shift+E    Equalize panels      │\n│  Cmd+Shift+D        Split down      │  Cmd+Shift+F    Zoom toggle          │\n│  Cmd+Alt+Arrows     Navigate        │  Cmd+W          Close panel          │\n│                                                                             │\n│  LAZYGIT                                                                    │\n│  ─────────                                                                  │\n│  w                  Worktrees panel │  Space          Stage\u002Funstage        │\n│  Enter              View diff       │  c              Commit               │\n│  P                  Push            │  ?              Help                 │\n│                                                                             │\n│  GIT (manual)                                                               │\n│  ─────────                                                                  │\n│  git worktree list                   List all worktrees                     │\n│  git worktree add -b claude\u002Fname path Create worktree manually               │\n│  git worktree remove path            Remove a worktree                      │\n│  git worktree prune                  Clean up stale worktree refs           │\n│                                                                             │\n│  WORKFLOW                                                                   │\n│  ─────────                                                                  │\n│  1. \u002Fworktree-init tasks...          Create worktrees                       │\n│  2. Cmd+D (split panels)             Open Ghostty panels                    │\n│  3. cd \u003Cpath> && claude              Start Claude in each                   │\n│  4. \u002Fworktree-deliver                PR when done                           │\n│  5. \u002Fworktree-cleanup                Clean up after merge                   │\n│                                                                             │\n└─────────────────────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Guardrails\n\n- **Never execute destructive commands** without confirmation (worktree remove, branch delete)\n- **Always verify location** before suggesting worktree operations\n- **If user seems lost**, offer `\u002Fworktree-check` first\n- **Never force-delete** branches that aren't merged\n- **Don't assume tools are installed** — check for lazygit availability if suggesting it\n- **Respect user's pace** — don't rush through sections if they want to practice\n- **Keep the reference card available** — offer to show it whenever relevant\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"claude-code-templates","1.0","main","51493f354fd03e3f941d4df7fd64c0b8c7a2632d","skills\u002Fdevelopment\u002Fworktree-guide","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi","漏洞研究、根因分析、黑箱測試｜做 AI agent 工具｜Vulnerability research, root-cause analysis, AI agent tooling","2026-08-16 02:24:07",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill worktree-guide",{"tool":40,"command":41},"bunx","bunx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill worktree-guide",{"tool":43,"command":44},"pnpm","pnpm dlx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill worktree-guide","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopment\u002Fworktree-guide\u002FSKILL.md",true,[],[49,56,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7ARMYTZ5D4B7N5SKFXV345V","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fzapier-make-patterns\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":60,"licenseFileUrl":61,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7ARMX1BVNEAR98SBANMDF2V","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7ARMPR4RQ417MG1HMPGNQHH","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fworkflow-automation\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7ARMHBERDMKGDMV7K6MQ6YP","trigger-dev","Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Ftrigger-dev\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7ARME0A7KFT330Q2H25HE2B","slack-automation","Automate Slack workspace operations including messaging, search, channel management, and reaction workflows through Composio's Slack toolkit.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fslack-automation\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7ARM8D87V18WDG0GEZS11ZT","planning-with-files","Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fplanning-with-files\u002FSKILL.md",[],[]]