git-worktree-find

Resolve a git branch's worktree path or create one via git-worktree-prepare.

5|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/f4irline/bbqparty-ai --skill git-worktree-find
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-find
Source: https://github.com/f4irline/bbqparty-ai/tree/main/packages/opencode/.opencode/skills/git-worktree-find
Command: npx skills add https://github.com/f4irline/bbqparty-ai --skill git-worktree-find

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resolve and locate the filesystem path for a git branch's worktree and ensure a usable worktree exists for development; this removes manual searching, duplicate worktree creation, and confusion when switching contexts across ticket branches.

Core Features & Use Cases

  • Detect existing worktrees by parsing git worktree list --porcelain and matching branch refs to return the absolute path when present.
  • Create missing worktrees by invoking the prepare workflow (git-worktree-prepare) and applying local-file synchronization when needed, returning whether the worktree was created or reused.
  • Verification and error guidance by confirming the branch in the resolved worktree and providing actionable errors when the branch name is invalid or git commands fail.
  • Use Case: When a developer needs to work on a Linear ticket branch, run this Skill to either reuse an existing worktree or create a new one and receive the exact path and state.

Quick Start

Run git-worktree-find with the branch name to get the absolute worktree path and whether it was created or reused.

Frequently Asked Questions about git-worktree-find

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

FAQPage Schema
How do I find the filesystem path for a git worktree by branch name?

To find a git worktree path, this Skill parses the output of git worktree list --porcelain and matches branch refs to return the absolute filesystem path for the specified branch.

Can I automatically create a git worktree if one doesn't exist for my branch?

Yes, you can automatically create a git worktree. When no existing worktree is found for the branch, this Skill invokes a prepare workflow to create one and returns whether the worktree was created or reused.

What's the best way to manage isolated git worktrees for feature branches?

The best way to manage isolated git worktrees for feature branches is to resolve the branch path and ensure a usable worktree exists, removing manual searching and duplicate creation when switching ticket contexts.

Does this worktree resolution method handle invalid branch names or git errors?

This worktree resolution method verifies the branch in the resolved worktree and provides actionable error guidance when the branch name is invalid or underlying git commands fail.

Do I need a local git repository to use this worktree locator?

Yes, you need a local git repository. This Skill applies to local repositories managing ticket or feature branches where developers need isolated worktrees for implementation and testing.