git-worktree-workflow

Use git worktrees for parallel Codex workflows. Run multiple Codex instances on different features simultaneously without merge conflicts. Use for parallel development, multi-branch testing, and subagent workflows.

5 stars

Best use case

git-worktree-workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use git worktrees for parallel Codex workflows. Run multiple Codex instances on different features simultaneously without merge conflicts. Use for parallel development, multi-branch testing, and subagent workflows.

Teams using git-worktree-workflow should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/git-worktree-workflow/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/development/git-worktree-workflow/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/git-worktree-workflow/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How git-worktree-workflow Compares

Feature / Agentgit-worktree-workflowStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use git worktrees for parallel Codex workflows. Run multiple Codex instances on different features simultaneously without merge conflicts. Use for parallel development, multi-branch testing, and subagent workflows.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Git Worktree Workflow

## Overview

Git worktrees allow you to have multiple working directories from a single repository, enabling parallel development workflows with Codex. This is essential for running multiple Codex instances on different tasks simultaneously.

## Quick Start

```bash
# 1. Create worktree for new feature branch
git worktree add -b feature-api ../project-api main

# 2. Run Codex in worktree
cd ../project-api && Codex "Implement the feature"

# 3. After completion, merge and cleanup
cd ../project
git merge feature-api
git worktree remove ../project-api
git branch -d feature-api
```

## When to Use

- Running multiple Codex agents on different features
- Testing changes while continuing development
- Code review with live comparison
- Parallel bug fixes across branches
- Subagent verification workflows
- A/B implementation comparisons
- CI/CD parallel job execution

## Related Skills

- [repo-sync](../repo-sync/SKILL.md) - Manage multiple repositories
- [sparc-workflow](../sparc-workflow/SKILL.md) - Systematic development process
- [agent-orchestration](../agent-orchestration/SKILL.md) - Multi-agent coordination

---

## Version History

- **1.1.0** (2026-01-02): Added Quick Start, Error Handling table, Metrics, Execution Checklist, Best Practices Do/Don't, updated frontmatter with version/category/related_skills
- **1.0.0** (2025-12-30): Initial release based on Codex best practices

## Sub-Skills

- [Best Practices](best-practices/SKILL.md)
- [Error Handling](error-handling/SKILL.md)
- [Execution Checklist](execution-checklist/SKILL.md)
- [Metrics](metrics/SKILL.md)

## Sub-Skills

- [What is a Worktree?](what-is-a-worktree/SKILL.md)
- [Create a Worktree (+2)](create-a-worktree/SKILL.md)
- [Pattern 1: Feature + Review (+3)](pattern-1-feature-review/SKILL.md)
- [AGENTS.md Configuration](claudemd-configuration/SKILL.md)
- [Headless Mode in Worktrees](headless-mode-in-worktrees/SKILL.md)
- [GitHub Actions Parallel Jobs](github-actions-parallel-jobs/SKILL.md)

Related Skills

digitalmodel-worktree-test-execution-with-shared-venv

5
from vamseeachanta/workspace-hub

Run digitalmodel tests from isolated worktrees without uv editable-dependency failures by using the main repo's existing virtualenv and PYTHONPATH.

digitalmodel-orcawave-orcaflex-proof-workflows

5
from vamseeachanta/workspace-hub

Class-level digitalmodel OrcaWave/OrcaFlex readiness, semantic-proof, fixture-proof, and closeout workflows.

blender-worktree-test-hardening

5
from vamseeachanta/workspace-hub

Recover and harden digitalmodel Blender automation work in isolated worktrees when uv/editable dependency paths break and local machines lack a Blender executable.

worktree-pre-push-bypass-for-tier1-checks

5
from vamseeachanta/workspace-hub

Handle workspace-hub integration-branch pushes from isolated git worktrees when the pre-push hook incorrectly assumes sibling tier-1 repos exist under the worktree path.

worktree-branch-sync-hygiene

5
from vamseeachanta/workspace-hub

Class-level branch, worktree, dirty-main, stash, sync, and hook hygiene for workspace-hub style multi-repo work.

portable-pattern-verification-workflow

5
from vamseeachanta/workspace-hub

Multi-package implementation with verification strategy for cross-platform configuration hardening

plan-gated-issue-validation-workflow

5
from vamseeachanta/workspace-hub

Systematic validation pattern for plan-approved GitHub issues with pre-existing deliverables

multi-year-tax-filing-verification-workflow

5
from vamseeachanta/workspace-hub

Verify and reconcile complex multi-form tax filings by cross-referencing source documents, identifying data dependencies, and validating line-by-line against authoritative records.

multi-file-tax-reconciliation-workflow

5
from vamseeachanta/workspace-hub

Systematic parallel review and reconciliation of multi-document tax filings with cross-reference validation

metadata-only-wiki-sweep-workflow

5
from vamseeachanta/workspace-hub

Disciplined inventory process for cataloging documents by filename/path without content claims, using parent-centric grouping to prevent stub proliferation

git-worktree-cleanup-at-scale

5
from vamseeachanta/workspace-hub

Identify and remove stale git worktrees blocking branch deletion in multi-repo environments

git-worktree-cleanup-and-branch-reconciliation

5
from vamseeachanta/workspace-hub

Systematic process for cleaning up stale git worktrees, resolving merge conflicts in diverged branches, and reconciling branch state across multiple repositories.