git-worktree-agent-workflow

Enforce isolated git worktree workflows for agent code modifications.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/gooftroop/Armoury --skill git-worktree-agent-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-agent-workflow
Source: https://github.com/gooftroop/Armoury/tree/main/.opencode/skills/git-worktree-agent-workflow
Command: npx skills add https://github.com/gooftroop/Armoury --skill git-worktree-agent-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill enforces a mandatory workflow for all agent code changes, ensuring that modifications are isolated within dedicated git worktrees, preventing contamination of the main working directory.

Core Features & Use Cases

  • Mandatory Worktree Usage: Guarantees all code modifications occur in isolated worktrees under .worktrees/.
  • Parallel Agent Coordination: Enables multiple agents to work concurrently on different tasks without conflict.
  • Patch Management & Integration: Provides a structured process for creating, applying, and integrating code changes via patches and pull requests.
  • Use Case: When an agent needs to fix a bug and implement a new feature simultaneously, it creates two separate worktrees, one for each task, ensuring the main branch remains clean and stable.

Quick Start

Use the git-worktree-agent-workflow skill to create a new worktree for the issue 'AST-1234' and begin development.

Frequently Asked Questions about git-worktree-agent-workflow

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

FAQPage Schema
How do I isolate agent code changes from my main git repository?

Git worktree isolation enforces a mandatory workflow where all agent code modifications occur within dedicated worktree directories under `.worktrees/`, preventing direct changes and contamination of the main repository working directory.

What is the best way to run parallel agents on the same codebase without conflicts?

Git worktree coordination enables multiple agents to work concurrently on different tasks by creating separate worktree directories for each task, ensuring isolated development and preventing conflicts across parallel agent operations.

How do I create a git worktree for a specific issue and start development?

To create a git worktree for a specific issue, invoke the workflow to generate a designated worktree directory under `.worktrees/` for that issue, allowing the agent to operate exclusively within that directory and begin development immediately without affecting the main branch.

How are patches applied and integrated when using git worktrees for development?

Patch management in a git worktree workflow provides a structured process for creating, applying, and sequentially integrating code changes via patches and pull requests, ensuring orderly integration back into the main codebase.

Does this worktree workflow require agents to operate exclusively in designated directories?

Yes, this worktree workflow requires agents to operate exclusively within designated worktree directories, maintaining the integrity of the primary codebase by preventing direct modifications to the main branch.

What limitations should I expect when enforcing mandatory worktree usage for agents?

Limitations of mandatory worktree usage include the strict enforcement that agents cannot make direct changes to the main repository, meaning all modifications must undergo the structured patch application, sequential integration, and cleanup process.