worktree-guide
Interactive guide for parallel development with Ghostty, git worktrees, and Lazygit. Use when setting up multi-task workflows or learning the worktree system.
What this skill does
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. --- ## Preflight Before starting, detect the user's environment: ```bash git rev-parse --is-inside-work-tree 2>&1 && echo "GIT_OK" || echo "NOT_GIT" ``` **If not a git repo:** > This isn't a git repository. Navigate to a git project first, then come back to `/worktree-guide`. Check if we're in a worktree or main repo: ```bash git worktree list pwd ``` Note the context for later guidance. --- ## Phase 1: Welcome & Context Detection Display based on environment: **If in main repo:** ``` ## Worktree Parallel Development Guide Welcome! I'll guide you through setting up and using parallel worktrees for multi-task development. ┌─────────────────────────────────────────────────────────────┐ │ Ghostty Terminal │ │ ┌──────────────────────┬──────────────────────┐ │ │ │ │ │ │ │ │ Claude (Task 1) │ Claude (Task 2) │ │ │ │ claude/login-page │ claude/fix-auth-bug │ │ │ │ │ │ │ │ ├──────────────────────┴──────────────────────┤ │ │ │ Lazygit (monitoring) │ │ │ └─────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────────┘ **Your workflow:** 1. Create worktrees → `/worktree-init` 2. Open Ghostty panels → `Cmd+D` / `Cmd+Shift+D` 3. Run Claude in each panel → `cd <worktree> && claude` 4. Deliver when done → `/worktree-deliver` 5. Clean up → `/worktree-cleanup` What would you like to do? ``` Use AskUserQuestion: - "Learn the full workflow" — Start from Phase 2 - "Just show keybindings" — Jump to Quick Reference - "Create worktrees now" — Suggest `/worktree-init` - "Something else" — Ask what they need **If already in a worktree:** ``` ## Worktree Status You're already inside a worktree! Let me check your status. ``` Then run the equivalent of `/worktree-check` and provide contextual guidance. --- ## Phase 2: Ghostty Essentials **EXPLAIN:** ``` ## Ghostty Panel Management Ghostty's panel system is perfect for parallel development. Here are the essential keybindings: ``` **SHOW:** ``` ┌─────────────────────────────────────────────────────────────┐ │ GHOSTTY KEYBINDINGS │ ├─────────────────────────────────────────────────────────────┤ │ │ │ SPLITTING │ │ ───────── │ │ Cmd+D Split panel to the right │ │ Cmd+Shift+D Split panel below │ │ │ │ NAVIGATION │ │ ───────── │ │ Cmd+Alt+←/→/↑/↓ Move focus between panels │ │ Cmd+[/] Cycle through panels │ │ │ │ SIZING │ │ ───────── │ │ Cmd+Shift+E Equalize all panel sizes │ │ Cmd+Shift+F Toggle zoom (fullscreen current panel) │ │ │ │ CLOSING │ │ ───────── │ │ Cmd+W Close current panel │ │ │ └─────────────────────────────────────────────────────────────┘ **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. ``` **PAUSE** - "Ready to learn about Lazygit? (Or skip to workflow)" --- ## Phase 3: Lazygit Essentials **EXPLAIN:** ``` ## Lazygit for Monitoring Worktrees Lazygit gives you a visual overview of all your worktrees and their changes. Run it from your main repo to monitor everything. ``` **SHOW:** ``` ┌─────────────────────────────────────────────────────────────┐ │ LAZYGIT KEYBINDINGS │ ├─────────────────────────────────────────────────────────────┤ │ │ │ WORKTREES (navigate to Worktrees panel) │ │ ───────── │ │ w Switch to worktree panel (or create new) │ │ Enter Switch to selected worktree │ │ n Create new worktree │ │ d Delete worktree (with confirmation) │ │ │ │ FILES & STAGING │ │ ───────── │ │ Space Stage/unstage file │ │ a Stage all files │ │ Enter View file diff (with Delta highlighting) │ │ │ │ COMMITS │ │ ───────── │ │ c Commit staged changes │ │ C Commit with editor │ │ A Amend last commit │ │ │ │ SYNC │ │ ───────── │ │ P Push │ │ p Pull │ │ f Fetch │ │ │ │ GENERAL │ │ ───────── │ │ ? Help (context-sensitive) │ │ q Quit / go back │ │ Tab Switch panels │ │ │ └─────────────────────────────────────────────────────────────┘ **Monitoring workflow:** 1. Open lazygit in the main repo (or a dedicated Ghostty panel) 2. Press `w` to see all worktrees 3. Use Enter to dive into any worktree's changes 4. Press `q` to go back to the worktree list ``` **PAUSE** - "Ready for the full workflow walkthrough?" --- ## Phase 4: Complete Workflow (Guided) **EXPLAIN:** ``` ## Full Parallel Development Workflow Let me walk you through the complete cycle. We'll go step by step. ``` ### Step 4.1: Create Worktrees **EXPLAIN:** ``` ### Step 1: Create Worktrees First, define the tasks you want to work on in parallel. The `/worktree-init` command creates a worktree for each task. ``` **DO:** Show example command: ``` Example usage: /worktree-init add user authentication | fix login bug | improve dashboard performance This creates: ├── ../worktrees/<repo>/claude-add-user-authentication/ ├── ../worktrees/<repo>/claude-fix-login-bug/ └── ../worktrees/<repo>/claude-improve-dashboard-performance/ ``` ### Step 4.2: Open Ghostty Panels **EXPLAIN:** ``` ### Step 2: Open Ghostty Panels Now split your terminal into panels—one for each task, plus optionally one for Lazygit monitoring. ``` **DO:** ``` 1. Press Cmd+D to split right (first worktree) 2. Press Cmd+D again (second worktree) 3. Optionally press Cmd+Shift+D on any panel for Lazygit be
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.