worktree-workflow

Create task-specific Git worktrees, initialize submodules, commit, and push changes.

63|8|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/different-ai/openwork-enterprise --skill worktree-workflow-different-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-workflow
Source: https://github.com/different-ai/openwork-enterprise/tree/main/.opencode/skills/worktree-workflow
Command: npx skills add https://github.com/different-ai/openwork-enterprise --skill worktree-workflow-different-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Enforce a worktree-per-task workflow to isolate work, keep changes compartmentalized, and ensure regular, traceable commits across tasks.

Core Features & Use Cases

  • Start a fresh, task-scoped worktree for each new task to prevent cross-task contamination.
  • Automatically initialize submodules in the new worktree to preserve repository state.
  • Commit after each meaningful chunk of work and push the branch to origin to keep history consistent.
  • Enforce a predictable branch naming convention (task/<safe-name>) and a reusable base branch workflow.
  • Facilitates first-time setup and provides guardrails against common misconfigurations.

Quick Start

Create a new task by running the start-task-worktree.sh script with a descriptive task name.

Frequently Asked Questions about worktree-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I isolate Git changes for separate tasks using worktrees?

Git worktrees allow you to maintain multiple working directories from a single repository. This workflow creates a dedicated worktree for each task, preventing cross-task contamination and compartmentalizing changes to keep your branch history clean and isolated.

How do I automate Git worktree creation and submodules initialization for new tasks?

You can automate worktree creation by running the start-task-worktree.sh script with a descriptive task name. This script creates a fresh task-scoped worktree and automatically initializes submodules to preserve the complete repository state for that task.

Does Git worktree workflow enforce regular commits and pushes to origin?

Yes, this workflow enforces commit-after-changes behavior to ensure regular, traceable commits across tasks. It automatically pushes the branch to origin after each meaningful chunk of work, keeping your remote repository history consistent and up to date.

What is the best way to manage branch naming conventions across local Git worktrees?

The best way to manage branch naming is to enforce a predictable convention like task/<safe-name> across all local worktrees. This workflow provides guardrails against common misconfigurations and maintains a reusable base branch workflow for consistent tracking.

Can I use a worktree-per-task workflow without disrupting my main Git branch?

Yes, using a worktree-per-task workflow isolates your changes in a separate directory without disrupting your main Git branch. It starts a fresh worktree from a reusable base branch, keeping your primary working directory clean and focused.