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

worktree

Git worktree lifecycle management. Use when team needs parallel isolated workspaces for multi-stream development, or when an experiment must not touch the main working tree. Creates isolated workspaces, manages branches, handles cleanup. Called by team and cook.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.3 KB

SKILL.md(원문)

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

worktree

Purpose

Reusable git worktree lifecycle management. Creates isolated workspaces for parallel agent development, manages branch naming, handles cleanup after merge or abort. Extracted from team to be usable by any skill that needs workspace isolation.

Triggers

  • Called by team (L1) for parallel stream isolation
  • Called by cook (L1) when user explicitly requests worktree isolation
  • /rune worktree create <name> — manual creation
  • /rune worktree cleanup — manual cleanup of stale worktrees

Calls (outbound)

None — pure git operations via Bash.

Called By (inbound)

  • team (L1): Phase 2 ASSIGN — create worktrees for parallel streams
  • cook (L1): optional isolation for complex features
  • User: direct invocation for manual worktree management

Operations

Create Worktree

Input: { name: string, base_branch?: string }
Default base: current HEAD

Steps:
1. Bash: git worktree add .claude/worktrees/<name> -b rune/<name> [base_branch]
2. Verify: Bash: git worktree list | grep <name>
3. Return: { path: ".claude/worktrees/<name>", branch: "rune/<name>" }

Naming convention:
  - Branch: rune/<name> (e.g., rune/stream-a, rune/auth-feature)
  - Path: .claude/worktrees/<name>
  - Max 3 active worktrees (enforced)

List Worktrees

Bash: git worktree list
→ Parse output into: [{ path, branch, commit }]
→ Filter: only rune/* branches (skip main worktree)

Cleanup Worktree

Input: { name: string, force?: boolean }

Steps:
1. Check if branch is merged: Bash: git branch --merged main | grep rune/<name>
2. If merged OR force:
   Bash: git worktree remove .claude/worktrees/<name> --force
   Bash: git branch -d rune/<name>  (or -D if force)
3. If NOT merged AND NOT force:
   WARN: "Branch rune/<name> has unmerged changes. Use force=true to remove."

Cleanup All Stale

Bash: git worktree list --porcelain
→ For each rune/* worktree:
  → Check if branch exists: git branch --list rune/<name>
  → If branch deleted: git worktree prune
  → If branch merged: cleanup (see above)
→ Report: removed [N] stale worktrees

Safety Rules

1. NEVER delete a worktree with uncommitted changes without user confirmation
2. NEVER force-delete an unmerged branch without user confirmation
3. MAX 3 active rune/* worktrees — refuse creation if limit reached
4. ALWAYS use .claude/worktrees/ directory — not project root
5. ALWAYS prefix branches with rune/ — easy identification and cleanup

Output Format

## Worktree Report
- **Action**: create | cleanup | list
- **Worktrees**: [count active]

### Active Worktrees
| Name | Branch | Path | Status |
|------|--------|------|--------|
| stream-a | rune/stream-a | .claude/worktrees/stream-a | active |
| stream-b | rune/stream-b | .claude/worktrees/stream-b | merged |

Constraints

  1. MUST use .claude/worktrees/ directory for all worktrees
  2. MUST prefix branches with rune/ namespace
  3. MUST NOT exceed 3 active worktrees
  4. MUST check for uncommitted changes before cleanup
  5. MUST NOT force-delete unmerged branches without explicit user confirmation

Sharp Edges

Failure ModeSeverityMitigation
Worktree left behind after failed mergeMEDIUMCleanup All Stale operation + pre-team-merge tag for recovery
Branch name collision with existing branchLOWCheck branch existence before creation, append timestamp if collision
Worktree path on Windows with long pathMEDIUMUse short names, keep under .claude/worktrees/ to minimize path length
Deleting worktree with uncommitted agent workHIGHSafety Rule 1: always check for uncommitted changes first

Done When

  • Worktree created/listed/cleaned up as requested
  • Branch naming follows rune/ convention
  • Active worktree count ≤ 3
  • No stale worktrees left behind
  • Worktree Report emitted

Cost Profile

~200-500 tokens. Haiku + Bash commands. Fast and cheap.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

adversary

무료

Pre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation).

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

Rune-kit/rune862026년 8월 16일 업데이트

Creates code-based visual assets — SVG icons, OG image HTML templates, social banners, and icon sets. Use when generating visuals as code (vector/HTML), NOT raster images — for raster generation see @rune-pro/media. Outputs files with usage instructions.

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

Rune-kit/rune862026년 8월 16일 업데이트

audit

무료

Comprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.).

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

Rune-kit/rune862026년 8월 16일 업데이트

autopsy

무료

Full codebase health assessment. Use when diagnosing project health or starting a rescue workflow on legacy code — OR when evaluating an external GitHub repo for dependency / fork / contribution decisions (--external mode). Analyzes complexity, dependencies, dead code, tech debt, and git hotspots. Produces a health score and rescue plan.

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

Rune-kit/rune862026년 8월 16일 업데이트

ba

무료

Business Analyst agent. Use when starting a new feature requiring requirements elicitation BEFORE plan or cook. Asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document that plan and cook consume.

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

Rune-kit/rune862026년 8월 16일 업데이트

Creative ideation and solution exploration. Generates multiple approaches with trade-offs, uses structured frameworks (SCAMPER, First Principles), and hands off to plan for structuring.

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

Rune-kit/rune862026년 8월 16일 업데이트

Rune-kit의 스킬 모두 보기

이 스킬의 문제 신고