git-coworker

Create isolated git worktrees for parallel agent branches.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/hotung1027/dev.conf --skill git-coworker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-coworker
Source: https://github.com/hotung1027/dev.conf/tree/main/agents/skills/coworker
Command: npx skills add https://github.com/hotung1027/dev.conf --skill git-coworker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AI agents often edit code in the user's active workspace, causing interruptions and conflicts. This Skill enables AI agents to work alongside human developers by using git worktrees to host isolated agent branches, so changes can be made in parallel without disturbing the human's working tree.

Core Features & Use Cases

  • Isolated agent worktrees on dedicated branches (agent/*) to enable parallel development.
  • Safe lifecycle guidance: create, work, commit, push, signal, and cleanup without touching the user's branch.
  • Submodule-aware strategies and comprehensive safety guardrails for monorepos.
  • Clear integration options for when to merge, PR, squash, or rebase.

Use cases include: background task automation across multiple files, code changes that require multiple commits, or long-running tasks that should not disrupt the developer’s current work.

Quick Start

  • Navigate to the repository root.
  • Ensure a .worktrees directory is available and .worktrees/ is ignored by git.
  • Create a new agent worktree: git worktree add -b agent/feat/<description> .worktrees/agent-<description> main
  • Move into the new worktree: cd .worktrees/agent-<description>
  • Perform work, then commit and push: git add -A git commit -m "feat(agent): initial parallel work" git push -u origin agent/feat/<description>
  • Report status to the human and propose merge options.

Frequently Asked Questions about git-coworker

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

FAQPage Schema
How do I run an AI agent in parallel without disrupting my current git working tree?

Using isolated git worktrees allows an AI agent to work in parallel on a dedicated agent/* branch without touching your active working tree, preventing interruptions and conflicts while the agent makes multiple commits.

How do I create an isolated git worktree for an AI agent?

To create an isolated git worktree, run git worktree add -b agent/feat/<description> .worktrees/agent-<description> main from the repository root, then move into the new directory to start working safely without touching the human's branch.

What is the best way to manage an AI agent's branch lifecycle in a shared repository?

The best way to manage an AI agent's branch lifecycle is to follow safe worktree protocols: create, work, commit, push, signal, and cleanup. This ensures safe, auditable integration and clear merge options without disrupting the developer.

Does isolated git worktree branching work with monorepos and submodules?

Isolated git worktree branching works with monorepos by utilizing submodule-aware strategies and comprehensive safety guardrails. This ensures parallel agent development remains safe and auditable within complex repository structures.

When should I use isolated git worktrees for AI coding tasks?

You should use isolated git worktrees for background task automation across multiple files, code changes requiring multiple commits, or long-running tasks that should not disrupt the developer's current work session.

Related Skills