Agent skill

Git Worktree

by Terry-Mao in Terry-Mao/AICodingFlow

Create an isolated Git worktree for parallel development with minimal safety checks.

MITAuto-check passedDevelopment

Install Git Worktree

skills CLI
$ npx skills add Terry-Mao/AICodingFlow --skill git-worktree -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Terry-Mao/AICodingFlow git-worktree --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Terry-Mao/AICodingFlow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/git-worktree .claude/skills/git-worktree && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-worktree
GitHub stars
167
Token cost
~470 tokens
SKILL.md length
245 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

Create an isolated Git worktree for parallel development with minimal safety checks.

  • Tasks that involve Git worktrees
  • SKILL.md covers Naming and base and Create
  • Calls git and gh

What it does

Git Worktree is an agent skill from Terry-Mao/AICodingFlow. Create an isolated Git worktree for parallel development with minimal safety checks.

Its SKILL.md is about 470 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: Setup a AI Coding Flow. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/git-worktree”

What it can do on your machine

Read from SKILL.md and the folder at commit 7703e16. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Worktree loads about 470 tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 245 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~24
When it runs · the whole SKILL.md, loaded when a task matches
~470

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Terry-Mao/AICodingFlow at commit 7703e16, republished under its MIT licence (© Terry-Mao). 245 words, ~470 tokens.

Download SKILL.mdSave it as .claude/skills/git-worktree/SKILL.md (or your agent's skills folder).
name
git-worktree
description
Create an isolated Git worktree for parallel development with minimal safety checks.

git-worktree

Use this when work should not disturb the current worktree. The new worktree does not copy uncommitted changes, and it does not change the user's shell directory.

Naming and base

Use the git-branch naming rules: issue work is <type>/<short-desc>-<issueID>, other work uses a user-provided name, and no issue ID is invented. When an issue ID is provided, use one gh issue view call for naming context and continue from the request if it fails. Store the worktree at .worktrees/<branch-name> so branch path segments are preserved. The repository should ignore .worktrees/.

Default the base to main; same-repository work prefers origin/<base>, then local <base>, and uses upstream only for fork workflows or explicit guidance. Fetch/check freshness only when it affects the result. If the local base is stale, confirm before using it or create from a fetched remote base and report that the local base was unchanged.

Create

Before creating, check current status, existing worktrees/branches, and the target path. Stop if any target already exists or dirty-work intent is unclear. Validate the branch with git check-ref-format --branch <branch-name>, create parent directories as needed, then run the equivalent of:

bash
git worktree add --no-track -b <branch-name> .worktrees/<branch-name> <base-ref>

Verify the new worktree's branch, status, and pwd. Report its path, base, whether dirty changes were excluded, and the user's next step: cd .worktrees/<branch-name>.

Do not remove, prune, overwrite, reset, stash, push, or force anything unless explicitly asked. Do not create protected/shared base branches as targets. Subsequent agent work uses the new worktree unless the user says otherwise.

© Terry-Mao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/git-worktree of Terry-Mao/AICodingFlow.

Open the folder on GitHubat commit 7703e16

Compare with similar skills

Git Worktree next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Worktree compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Worktree this skillTerry-Mao/AICodingFlow167—~470Automated safety check: PassMIT
Build Px4 macOSPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
WorktreeAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone

Similar skills

  • Build Px4 macOS

    PX4/PX4-Autopilot

    Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

    13k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Worktree

    AgentsMesh/AgentsMesh

    Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

    2.4k GitHub stars~553 tokensUpdated 15 days ago
    DevelopmentAuto-check: notes
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • New Feature

    michaelshimeles/skills

    Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts.

    1.3k GitHub starsUsed in 1 repo~699 tokens
    DevelopmentAuto-check passed

More from Terry-Mao/AICodingFlow

All 30 skills in this repo
  • PR Walkthrough

    Terry-Mao/AICodingFlow

    Generate a local static interactive D3 walkthrough of a pull request.

    167 GitHub stars~2.1k tokensUpdated 4 days ago
    Auto-check passed
  • Update PR Review

    Terry-Mao/AICodingFlow

    Improve repo-local PR review companion skills from human feedback on bot reviews.

    167 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • Implement Issue

    Terry-Mao/AICodingFlow

    Implement a GitHub issue in this repository by applying the local shared implement-specs workflow with repository-specific issue, spec-context, and summary-file handling.

    167 GitHub stars~2.3k tokensUpdated 4 days ago
    Auto-check passed
  • Implement Specs

    Terry-Mao/AICodingFlow

    Implement an approved feature from the repository's product and tech specs, keeping specs and code aligned in the same change as implementation evolves.

    167 GitHub stars~1.7k tokensUpdated 4 days ago
    Auto-check passed
  • Review PR

    Terry-Mao/AICodingFlow

    Review a GitHub pull request from pinned prdescription.txt, prdiff.txt, and optional speccontext.md snapshots, then write and validate review.json.

    167 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • Update Dedupe

    Terry-Mao/AICodingFlow

    Learn repo-local duplicate issue guidance from recent maintainer duplicate closures and propose updates to the dedupe companion skill.

    167 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about Git Worktree

What does Git Worktree do?

Create an isolated Git worktree for parallel development with minimal safety checks. Git Worktree is an agent skill from Terry-Mao/AICodingFlow. Create an isolated Git worktree for parallel development with minimal safety checks.

When should I use Git Worktree?

Git Worktree fits situations like: tasks that involve Git worktrees.

How do I install Git Worktree in Claude Code?

Run `npx skills add Terry-Mao/AICodingFlow --skill git-worktree -a claude-code`. Or copy the skill folder (.agents/skills/git-worktree in Terry-Mao/AICodingFlow) into .claude/skills/git-worktree in your project. Claude Code loads it when a task matches its description.

How do I install Git Worktree in Codex?

Run `npx skills add Terry-Mao/AICodingFlow --skill git-worktree -a codex`. Or copy the skill folder (.agents/skills/git-worktree in Terry-Mao/AICodingFlow) into .agents/skills/git-worktree in your project. Codex loads it when a task matches its description.

Can I use Git Worktree in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Terry-Mao/AICodingFlow --skill git-worktree -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-worktree, .gemini/skills/git-worktree, .github/skills/git-worktree and .opencode/skills/git-worktree in your project.

What does Git Worktree need to run?

Going by SKILL.md and its folder, Git Worktree needs the command-line tools its instructions call (git and gh).

Does Git Worktree access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Worktree safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Worktree use?

Git Worktree is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Worktree use?

About 470 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Worktree?

Skills that share tags, products or a category with Git Worktree: Build Px4 macOS (PX4/PX4-Autopilot, 13k stars), Worktree (AgentsMesh/AgentsMesh, 2.4k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars) and Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Worktree?

Terry-Mao (a GitHub user) maintains it in Terry-Mao/AICodingFlow, which has 167 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 3, 2026.

Source: Terry-Mao/AICodingFlow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.