openagent-using-git-worktrees

Create isolated Git worktrees with approval gates and automated project setup.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/SvenMarcus/.dotfiles --skill openagent-using-git-worktrees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openagent-using-git-worktrees
Source: https://github.com/SvenMarcus/.dotfiles/tree/main/opencode/.config/opencode/skills/custom/openagent-using-git-worktrees
Command: npx skills add https://github.com/SvenMarcus/.dotfiles --skill openagent-using-git-worktrees

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starting feature work with isolation can be error-prone without a repeatable, gated process. This skill creates isolated git worktrees with smart directory selection and approval gates to prevent accidental commits and ensure safety checks.

Core Features & Use Cases

  • Isolated workspaces via Git worktrees that share the same repository but keep feature work separate.
  • Approval gates at each phase: directory checks, .gitignore updates, worktree creation, and project setup.
  • Handles both project-local (.worktrees or worktrees) and global (~/.config/openagent/worktrees) locations with policy-driven resolution.
  • Auto-detects common project files (package.json, Cargo.toml, requirements.txt, pyproject.toml) and runs appropriate setup commands.

Quick Start

Set up an isolated Git worktree workspace with approval gates.

Frequently Asked Questions about openagent-using-git-worktrees

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

FAQPage Schema
How do I isolate feature work in Git worktrees without accidental commits?

Git worktree isolation separates feature work into a distinct directory while sharing the repository. This process applies approval gates at directory checks, .gitignore updates, worktree creation, and project setup to prevent accidental commits.

What's the best way to manage Git worktree locations across local and global directories?

Git worktree locations can be managed using policy-driven resolution between project-local directories like .worktrees or worktrees and global locations such as ~/.config/openagent/worktrees, with directory checks ensuring safe placement.

How do I set up a new Git worktree and automatically run the correct project build commands?

After creating a Git worktree, the setup process auto-detects common project files like package.json, Cargo.toml, requirements.txt, or pyproject.toml and runs the appropriate project setup commands with baseline checks.

Does Git worktree creation support approval gates for .gitignore updates and directory checks?

Yes, Git worktree creation enforces explicit approval gates at each phase, including directory checks, .gitignore updates, worktree creation, and project setup, ensuring safety checks are satisfied before proceeding.

Why use Git worktree isolation instead of creating a new branch in the main directory?

Git worktree isolation keeps feature work in a separate directory while sharing the same repository, preventing accidental commits to the main branch and allowing distinct baseline checks and project setup for each isolated workspace.

Can I use CLAUDE.md preferences to configure Git worktree workflows?

Yes, the Git worktree workflow reads CLAUDE.md preferences to configure project setup and baseline checks, applying them alongside directory checks and ignore rules during the isolated workspace creation process.