git-worktree

git-worktree is a skill for Claude Code, Codex from joonlab/joonlab-claudecode-setting-for-share. It costs 129 tokens per session (1,081 once invoked), scanned A, original, MIT.

A workflow for using Git worktrees to give multiple Claude Code sessions separate folders and branches. A worktree is an additional working directory linked to the same Git repository.

In plain words
What is it for?
Use it to create and manage branches and worktree folders for parallel feature work, frontend and backend tasks, or urgent fixes.
Why use it?
It keeps parallel tasks isolated so changes for one feature do not interfere with another, including when developing different parts of a monorepo, a repository containing several projects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ../worktrees/ ← worktree 모음 폴더.

Good fit Use it to create and manage branches and worktree folders for parallel feature work, frontend and backend tasks, or urgent fixes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/joonlab/joonlab-claudecode-setting-for-share
agentmods
npx agentmods add skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree/github.svg)](https://agentmods.dev/skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree)
Your own site
<a href="https://agentmods.dev/skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree"><img src="https://agentmods.dev/badge/skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree"><img src="https://agentmods.dev/badge/skills/joonlab/joonlab-claudecode-setting-for-share/git-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00129 $0.01081
Opus 5.5 $0.00052 $0.00432
Sonnet 5.5 $0.00026 $0.00216
Haiku 4.5 $0.00013 $0.00108

Measured 1mo ago against content hash 141876304f01, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-worktree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/worktree-helper.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/skills/git-worktree/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Worktree + Claude Code 병렬 개발

Git worktree를 활용하여 여러 Claude Code 세션을 동시에 실행하는 병렬 개발 환경을 구성한다.

핵심 개념

메인 프로젝트/          ← main 브랜치 (Claude 세션 1)
├── .git/              ← 공유되는 Git 데이터

../worktrees/          ← worktree 모음 폴더
├── feature-auth/      ← feature/auth 브랜치 (Claude 세션 2)
├── feature-api/       ← feature/api 브랜치 (Claude 세션 3)
└── hotfix-urgent/     ← hotfix/urgent 브랜치 (Claude 세션 4)

장점: 컨텍스트 격리, 디스크 절약, 개발 속도 4-5배 향상

워크플로우

1. Worktree 생성

사용자가 병렬 작업 환경을 요청하면:

# 현재 디렉토리 확인
pwd && git status

# worktrees 폴더 생성 (메인 프로젝트와 같은 레벨)
WORKTREE_BASE="$(dirname "$(pwd)")/worktrees"
mkdir -p "$WORKTREE_BASE"

# 새 브랜치와 함께 worktree 생성
git worktree add -b <브랜치명> "$WORKTREE_BASE/<폴더명>"

# 예시: feature/auth 브랜치로 auth-work worktree 생성
git worktree add -b feature/auth "$WORKTREE_BASE/auth-work"

2. 여러 Worktree 한번에 생성

병렬 개발 환경 전체 구성 시:

WORKTREE_BASE="$(dirname "$(pwd)")/worktrees"
mkdir -p "$WORKTREE_BASE"

# 프론트엔드/백엔드 분리 개발
git worktree add -b feature/frontend "$WORKTREE_BASE/frontend"
git worktree add -b feature/backend "$WORKTREE_BASE/backend"

# 또는 기능별 분리
git worktree add -b feature/auth "$WORKTREE_BASE/auth"
git worktree add -b feature/dashboard "$WORKTREE_BASE/dashboard"
git worktree add -b feature/api "$WORKTREE_BASE/api"

3. Worktree 목록 확인

git worktree list

4. Claude Code 병렬 실행 안내

worktree 생성 후 사용자에게 안내:

## 병렬 실행 방법

각 터미널에서 Claude Code를 실행하세요:

터미널 1 (메인):
  cd <메인프로젝트경로>
  claude

터미널 2:
  cd <worktree경로1>
  claude

터미널 3:
  cd <worktree경로2>
  claude

각 세션에서 독립적으로 작업하면 됩니다!

5. 작업 완료 후 병합

# 메인 프로젝트로 이동
cd <메인프로젝트경로>

# 각 브랜치 병합
git merge feature/frontend
git merge feature/backend

# worktree 정리
git worktree remove "$WORKTREE_BASE/frontend"
git worktree remove "$WORKTREE_BASE/backend"

# 브랜치 정리 (선택)
git branch -d feature/frontend
git branch -d feature/backend

6. Worktree 삭제

# 단일 삭제
git worktree remove <경로>

# 전체 정리
git worktree prune

빠른 명령어 참조

Read the full file on GitHub · 146 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 146 lines · 129 tokens per session scan A 141876304f01

Subscribe to this mod's changes

git-worktree is a skill published in the GitHub repository joonlab/joonlab-claudecode-setting-for-share (14 stars, last pushed 1mo ago), licensed MIT. It adds 129 tokens to every session and 1,081 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.