본문으로 건너뛰기
cccskills
무료GitHub에 공개

worktree

Git worktree management for working on multiple branches in parallel. Create, list, remove, and synchronize worktrees. Protects against direct pushes to master.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Command /worktree - Git Worktree Management

Manages Git worktrees for working on multiple branches in parallel across different Claude Code sessions.

Absolute Security Rules

NEVER push directly to `master`!
NEVER commit directly to `master`!
Only allowed action on `master`: git pull origin master
Always create a PR to merge into `master`

Configuration

ParameterValue
Worktrees directory.claude/worktrees/
Main branchmaster
Default --from branchmaster

Subcommands

/worktree or /worktree list

Lists all existing worktrees with their branch and status.

/worktree add <name> [--from <branch>]

Creates a new worktree with a "home-base" branch.

  • By default, based on master
  • Path: .claude/worktrees/<name>

/worktree remove <name>

Removes a worktree (asks for confirmation if not clean).

/worktree sync [name]

Synchronizes the worktree with master (pull only).

/worktree connect <name>

Changes the current session's working directory to the specified worktree.

  • Verifies the worktree exists
  • Moves into <worktree_path>
  • Displays the worktree's git status

Worktree Architecture

claude-review-automation/             <- Main worktree (master)
├── src/
├── .claude/
│   └── worktrees/
│       ├── refactor/                 <- Refactor worktree
│       │   ├── src/
│       │   └── ...
│       ├── debug/                    <- Debug worktree
│       │   ├── src/
│       │   └── ...
│       └── feature-x/               <- Feature worktree
│           ├── src/
│           └── ...
└── ...

Concept: "Home-Base" Branches

Each worktree has a "home-base" branch that serves as a starting point.

BranchRole
refactor, debug, etc.Worktree home-base (synced with master)
feat/xxx-*, fix/xxx-*Working branches

Workflow inside a worktree:

# 1. You are on the home-base (e.g., refactor)
git status  # On the refactor branch

# 2. Create a feature branch for your ticket
git checkout -b feat/xxx-description

# 3. Work, commit...
git add .
git commit -m "feat(scope): description"

# 4. Push the feature branch (NEVER the home-base)
git push origin feat/xxx-description

# 5. Create a PR to master (via gh CLI)

# 6. Once merged, return to home-base and sync
git checkout refactor
git pull origin master

Synchronization Commands

Sync a worktree with master

# Inside the relevant worktree
git checkout <home-base>  # refactor, debug...
git fetch origin
git reset --hard origin/master

WARNING: This command overwrites the local home-base branch. This is intentional because it should never contain direct work.


Output Templates

Worktree List

WORKTREES

Repo: claude-review-automation

| Usage | Path | Home-base | Current Branch |
|-------|------|-----------|----------------|
| main | .../claude-review-automation | - | master |
| refactor | .../.claude/worktrees/refactor | refactor | refactor |

Tip - Open a session:
   cd <path> && claude

Sync with master:
   git checkout <home-base> && git pull origin master

Worktree Creation

WORKTREE CREATED

Name      : <name>
Path      : <path>
Home-base : <name> (based on master)

Warning - Install dependencies:
   cd <path> && yarn install

Tip - Start a session:
   cd <path> && claude

Reminder: NEVER push to master, always create a PR!

Worktree Connection

CONNECTED TO WORKTREE

Worktree : <name>
Path     : <path>
Branch   : <current_branch>
Status   : <clean|modified>

You are now in the <name> worktree

Sync with master: git pull origin master
Reminder: NEVER push to master, always create a PR!

Rules

  • NEVER push directly to master
  • NEVER commit on master
  • ALWAYS create a PR to merge into master
  • ONLY allowed action on master: git pull origin master
  • ALWAYS create worktrees in .claude/worktrees/
  • ALWAYS use absolute paths in displayed commands
  • ALWAYS remind to run yarn install after creation
  • VERIFY that the branch is not already checked out in another worktree

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Guide for creating optimized Claude Code agents. Use to design a new specialized agent, a swarm sub-agent, or a multi-agent workflow. Follows the Skill → Agent (preloaded skills) → Skill orchestration pattern.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

DGouron/review-flow442026년 10월 18일 업데이트

Anti-overengineering guide based on YAGNI. Use before adding an architectural pattern, during code review, or to challenge an overly complex implementation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

DGouron/review-flow442026년 10월 18일 업데이트

Clean Architecture (Uncle Bob) guide for this project. Use when creating modules, entities, use cases, presenters, controllers, gateways, guards, services. Contains tactical patterns and structure conventions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

DGouron/review-flow442026년 10월 18일 업데이트

Audit documentation for duplication, staleness, language issues, and verbosity. Read-only — produces an actionable report.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

DGouron/review-flow442026년 10월 18일 업데이트

Local auto-review of modified code (no GitLab/GitHub). Runs 5 sequential audits and generates a local report. Ideal for validating code before creating a MR/PR.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

DGouron/review-flow442026년 10월 18일 업데이트

Clean Code (Robert C. Martin) guide to produce and challenge code that is readable, durable, simple, and consistent. Covers naming, functions, comments, smells, and refactor heuristics. Complements `/solid` (SOLID principles) and `/anti-overengineering` (YAGNI/KISS). Activate during the REFACTOR phase of the TDD cycle and during implementation self-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

DGouron/review-flow442026년 10월 18일 업데이트

DGouron의 스킬 모두 보기

이 스킬의 문제 신고