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

git-worktree-manager

Manage parallel development with Git worktrees: creation with port allocation, environment sync, branch isolation, and cleanup. Use when working multiple branches at once, running parallel CI validations, or isolating agent workspaces.

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

연동 도구Docker
설치 방법 보기

포함된 파일(7)

  • SKILL.md6.3 KB
  • references/cleanup-and-workflows.md3.6 KB
  • references/operations-playbook.md3.9 KB
  • references/setup-and-ports.md5.0 KB
  • scripts/port_allocator.py15.0 KB
  • scripts/worktree_manager.py13.5 KB
  • scripts/worktree_validator.py16.2 KB

SKILL.md(원문)

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

Git Worktree Manager

Manage parallel development workflows using Git worktrees with deterministic naming, automatic port allocation, environment file synchronization, dependency installation, and cleanup automation. Optimized for multi-agent workflows where each agent or terminal session owns an isolated worktree with its own ports, environment, and running services.

Core Capabilities

  • Worktree lifecycle — create worktrees from new or existing branches with deterministic naming, copy .env files, install dependencies by lockfile detection, list with clean/dirty + ahead/behind status, and safely remove with uncommitted-change detection.
  • Port allocation — deterministic per-worktree assignment (base + index * stride), collision detection against running processes, persistent map in .worktree-ports.json, and Docker Compose override generation.
  • Multi-agent isolation — one branch per worktree, one agent per worktree, no shared state, conflict-free parallel execution, task-ID mapping for traceability.
  • Cleanup automation — stale detection by age, merged-branch detection for safe removal, dirty-state warnings, and bulk cleanup with safety confirmations.

When to Use

  • You need 2+ concurrent branches open with running dev servers.
  • You want isolated environments for feature work, hotfixes, and PR review.
  • Multiple AI agents need separate workspaces that do not interfere.
  • Your current branch is blocked but a hotfix is urgent.
  • You want automated cleanup instead of manual rm -rf operations.

Clarify First

Before managing worktrees, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • Operation — create, list, remove, or clean up worktrees (selects the worktree_manager.py action vs port_allocator.py vs worktree_validator.py)
  • Branch & base — which branch(es) the worktree(s) track and from what base (drives worktree naming and isolation)
  • Port/service needs — whether dev servers or Docker need allocated ports (drives the deterministic port block and the Docker Compose override generated)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Tools

ToolPurposeCommand
worktree_manager.pyList, create, remove, and clean up worktreespython scripts/worktree_manager.py list
port_allocator.pyAssign/check/release deterministic port blocks; sync registrypython scripts/port_allocator.py status
worktree_validator.pyValidate worktree health (stale, missing branch, env parity, port conflicts, lockfile)python scripts/worktree_validator.py --stale-days 14

References

Load the reference that matches the task — keep this file lean and pull detail on demand:

  • references/setup-and-ports.md — quick-start git worktree commands, the deterministic port-allocation strategy and .worktree-ports.json format, collision-detection snippet, the full setup-worktree.sh script, and the Docker Compose per-worktree override. Read when creating a worktree or wiring up ports/services.
  • references/cleanup-and-workflows.md — the cleanup-worktrees.sh safe-cleanup script, the multi-agent assignment pattern and rules, the scenario→action decision matrix, and the post-creation validation checklist. Read when automating cleanup or coordinating agents.
  • references/operations-playbook.md — common pitfalls, best practices, the troubleshooting table, and the success-criteria bar. Read before shipping a workflow or when diagnosing problems.

Scope & Limitations

This skill covers:

  • Git worktree lifecycle: creation, listing, status inspection, and removal
  • Deterministic port allocation and collision avoidance for parallel dev servers
  • Environment file synchronization and Docker Compose override patterns
  • Multi-agent workspace isolation strategies and cleanup automation

This skill does NOT cover:

  • Git branching strategies or merge conflict resolution (see pr-review-expert and release-manager)
  • Secret rotation, vault integration, or credential management (see env-secrets-manager)
  • CI/CD pipeline configuration or automated test orchestration (see ci-cd-pipeline-builder)
  • Monorepo package management, workspace linking, or cross-package dependency resolution (see monorepo-navigator)

Integration Points

SkillIntegrationData Flow
env-secrets-managerWorktree setup copies .env files that contain secrets managed by this skill.env files flow from main repo to each worktree; secret references remain consistent across all copies
ci-cd-pipeline-builderCI pipelines can spin up worktrees for parallel test matrix executionPipeline config triggers setup-worktree.sh per matrix job; port allocation prevents service collisions
release-managerRelease branches get dedicated worktrees for stabilization while feature work continuesRelease worktree is created from the release branch; merged status drives cleanup automation
monorepo-navigatorIn monorepo setups, worktrees must respect package boundaries and shared dependenciesWorktree creation inherits the monorepo root lockfile; package-level dev servers use allocated port blocks
pr-review-expertPR reviews can be performed in isolated worktrees with running code for manual validationReviewer creates a worktree at the PR branch, runs the dev server on allocated ports, and removes after review
tech-debt-trackerStale worktrees and abandoned branches surface as tech debt indicatorsCleanup script output feeds into debt tracking; worktree age and merge status inform priority scores

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

This skill should be used when the user asks to "check accessibility", "audit WCAG compliance", "scan HTML for a11y issues", "check color contrast", or "find accessibility violations in web pages".

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

borghei/Claude-Skills9532026년 10월 7일 업데이트

Design and run statistically rigorous A/B tests and experiments. Use when planning experiments, calculating sample sizes, designing test variants, selecting metrics, analyzing results, or when someone says "let's test that."

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

borghei/Claude-Skills9532026년 10월 7일 업데이트

Design and analyze A/B tests: sample size, test duration, and statistical significance for conversion experiments. Use when setting up an A/B test, calculating sample size, designing an experiment, or analyzing results.

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

borghei/Claude-Skills9532026년 10월 7일 업데이트

Sales execution across pipeline, discovery, demos, negotiation, and closing. Use when qualifying opportunities, running MEDDIC discovery, building account plans, handling objections, structuring proposals, or forecasting pipeline.

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

borghei/Claude-Skills9532026년 10월 7일 업데이트

Design ad creative across Google, Meta, LinkedIn, Twitter/X, and TikTok with platform format specs, headline formulas, and A/B testing. Use when writing ad copy, generating headline variations, creating ad sets, or validating creative.

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

borghei/Claude-Skills9532026년 10월 7일 업데이트

aeo

무료

Answer Engine Optimization (AEO): optimize content to be cited by LLMs (ChatGPT, Claude, Perplexity, Gemini) in their answers. Use when designing content for LLM citation, auditing citability, or structuring Q&A schema.

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

borghei/Claude-Skills9532026년 10월 7일 업데이트

borghei의 스킬 모두 보기

이 스킬의 문제 신고