using-git-worktrees
Using Git Worktrees
Overview
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: systematic directory selection plus safety verification equals reliable isolation.
Inside the Soyio multi-repo workspace, prefer create-worktree for one repo at a time. Use this skill as the generic fallback when no repo-specific skill or command applies.
Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace."
Directory selection process
Follow this priority order.
1) Check existing directories
More from soyio-id/skills
commit-work
Review, organize, and commit pending changes. Split into logical commits, stage carefully, and write clear Conventional Commit messages. Use when the user asks to commit, stage changes, or organize work into commits.
10create-pr
Create a clear, review-ready pull request with gh CLI. Gather context from commits and diff, follow repository templates, push safely, and return the PR URL with merge guidance.
10create-worktree
Create an isolated worktree for a new branch, existing branch, or PR review. Prefer repo-local worktree commands when they exist, and fall back to vanilla git worktrees otherwise.
8prepare-security-prs
Triage and prepare automated dependency security PRs for merge with minimal risk. Identify bot PRs that need intervention, resolve required issues only, refresh stale branches safely, detect superseded PRs, and keep diffs dependency-focused.
8fix-vulnerabilities
Fix multiple dependency vulnerabilities across multiple repos. Parses Vanta-style vulnerability entries, groups by repo, creates a single fix branch per repo, applies all fixes, verifies compatibility, and creates PRs after user approval. Use when the user says '/fix-vulnerabilities' or asks to fix vulnerabilities across repos.
7create-production-pr
Create a production promotion PR from main/master to production in an allowed repo or the current repo. Use the repo PR template when available, list included PRs, and generate a date-based title with production-only version suffixes.
6