worktree-workflow

Manage Git worktrees to isolate multi-file changes and automate feature branches.

1|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/DammianMiller/universal-agent-memory --skill worktree-workflow-dammianmiller
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-workflow
Source: https://github.com/DammianMiller/universal-agent-memory/tree/main/skills/worktree-workflow
Command: npx skills add https://github.com/DammianMiller/universal-agent-memory --skill worktree-workflow-dammianmiller

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill manages Git worktrees for AI agents, ensuring that multi-file changes are isolated, preventing conflicts and accidental commits to main branches.

Core Features & Use Cases

  • Isolated Worktrees: Create separate, temporary directories for agent tasks that modify multiple files.
  • Automated Branching: Automatically creates feature branches for each worktree.
  • Conflict Detection: Helps coordinate work among multiple agents.
  • Automated PRs & Cleanup: Streamlines the process of creating pull requests and cleaning up worktrees after merging.
  • Use Case: When an AI agent needs to refactor a core module involving 5 files, this Skill ensures the changes are contained, tested, and merged without disrupting ongoing work on other parts of the project.

Quick Start

Use the worktree-workflow skill to create a new worktree for a feature called 'user-profile-update'.

Frequently Asked Questions about worktree-workflow

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

FAQPage Schema
How do I isolate AI agent changes across multiple files using git worktrees?

Git worktrees isolate AI agent changes by creating separate, temporary directories for tasks modifying multiple files. This prevents conflicts and accidental commits to main branches, ensuring contained modifications during development.

What is the best way to automate feature branch creation for AI coding agents?

Automating feature branch creation for AI coding agents is handled by creating a new worktree for each specific task. This workflow automatically generates a feature branch, isolating multi-file changes safely without disrupting ongoing project work.

How do I manage multiple AI agents modifying the same codebase without conflicts?

Managing multiple AI agents modifying the same codebase requires isolated worktrees for each task. This workflow coordinates parallel development by containing modifications in separate directories, preventing conflicts before pull request generation.

Can I automate pull request generation and worktree cleanup after merging code?

Yes, you can automate pull request generation and worktree cleanup after merging code. This workflow streamlines the process of creating pull requests for isolated changes and automatically cleans up temporary worktrees post-merge.

When do I need to use a git worktree workflow for code management?

You need a git worktree workflow for code management when an AI agent must refactor a core module involving multiple files. It ensures changes are contained, tested, and merged safely without disrupting ongoing work on other project parts.

Does this worktree workflow support multi-file changes without affecting the main branch?

Yes, this worktree workflow supports multi-file changes without affecting the main branch. It creates separate worktrees and automated feature branches, ensuring all modifications are contained and tested before any code integration occurs.