worktrees
하는 일
이 스킬은 복잡하거나 위험한 코딩 작업을 위해 Git 워크트리를 별도의 격리된 작업 흐름으로 관리합니다. 여러 작업을 동시에 다루는 개발자와 AI 오케스트레이터를 위한 스킬입니다.
사용하는 경우
- ✓여러 코딩 작업이 같은 파일을 건드리지 않고 병렬로 실행되어야 할 때.
- ✓위험한 실험을 메인 프로젝트와 분리해 두고 싶을 때.
- ✓여러 작업 흐름의 결과를 검토해 하나의 브랜치로 되돌려야 할 때.
스킬 링크
https://github.com/alvinunreal/oh-my-opencode-slim/blob/master/src/skills/worktrees/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 위험한 리팩터링이 메인 브랜치를 건드리지 않도록 별도의 워크트리를 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 각 작업 흐름을 프로젝트의 .slim 폴더 아래 자체 폴더에 두고, 자체 브랜치와 명확한 담당자를 줍니다. 작업 흐름의 상태를 추적하고 마지막에 정리를 처리합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Worktrees Orchestration Protocol
The worktrees skill provides an opinionated, safe orchestration protocol for
managing Git worktrees as isolated coding lanes. Its value is giving the Orchestrator a consistent OMO workflow for parallel agents, risky experiments, integration review, and cleanup.
Core Contract
This is an orchestrator-only workflow. Other specialists such as @fixer
or @designer can be assigned tasks inside a worktree lane, but the
Orchestrator owns lane planning, branch/path selection, file ownership,
delegation, diff validation, integration, and cleanup.
All worktrees reside under the default path:
.slim/worktrees/<slug>/
Do not create worktrees as sibling directories of the main repository.
State Tracking (.slim/worktrees.json)
Use the optional local metadata manifest .slim/worktrees.json to maintain
structural tracking:
{
"version": "1.0.0",
"updatedAt": "2026-06-14T00:00:00.000Z",
"lanes": [
{
"slug": "feature-auth-v2",
"branch": "omos/feature-auth-v2",
"path": ".slim/worktrees/feature-auth-v2",
"base": "main",
"purpose": "refactor authentication flow to use OAuth2",
"owner": "orchestrator",
"status": "active",
"areas": ["src/auth", "src/config"],
"createdAt": "2026-06-14T12:00:00.000Z"
}
]
}
If .slim/worktrees.json does not exist, create it when initializing a lane,
and keep it updated as lanes are transitioned, integrated, or pruned. Treat it
as local workflow metadata by default; ask before making it part of a committed
project convention.
Safety Guidelines
Before executing any Git mutation command, the Orchestrator must observe the following guards:
1. Pre-Flight Checklist
- Confirm the current directory is inside a Git repository.
- Check the current branch, base branch, and dirty/uncommitted state.
- Inspect the output of
git worktree listto avoid path or branch conflicts. - Ensure the branch name (e.g.
omos/<slug>or custom project convention) does not already exist locally or on remote. - Ensure
.slim/worktrees/is ignored by Git before creating nested worktrees.
2. Mandatory User Confirmation
You must seek explicit user confirmation before executing:
git worktree addorgit worktree remove- Branch creation, deletion, or renaming
- Merges, rebases, or cherry-picks
git pruneorgit worktree prune- Destructive commands (e.g.,
git reset --hard,git clean,git push --force, or removing a dirty worktree directory).
Never execute destructive commands, delete branches, remove dirty worktrees, or clean uncommitted changes without explicit user confirmation for that exact operation.
3. Ignore File Setup
Before creating or cleaning lanes, inspect existing .gitignore and .ignore.
Update the managed block in place when present; otherwise append it. Add only
the missing exact lines below, never duplicate entries or modify unrelated
rules. These blocks keep lane artifacts git-local while the .ignore allowlist
keeps them readable to OpenCode.
.gitignore:
# BEGIN oh-my-opencode-slim worktrees
.slim/worktrees/
.slim/worktrees.json
# END oh-my-opencode-slim worktrees
.ignore:
# BEGIN oh-my-opencode-slim worktrees
!.slim/
!.slim/worktrees.json
!.slim/worktrees/
!.slim/worktrees/**
# END oh-my-opencode-slim worktrees
Workflow Guide
Phase 1: Planning & Setup
- Identify the task scope and determine a short
<slug>for the worktree. - Formulate a branch name. Default to
omos/<slug>unless project/user conventions dictate otherwise. - Validate repository safety. Ask the user for confirmation to initialize the lane.
- Before creating the lane, ensure the managed ignore blocks are present using the Ignore File Setup rules above.
- Run:
git worktree add -b <branch-name> .slim/worktrees/<slug> <base-commit/branch> - Register the metadata in
.slim/worktrees.json.
Phase 2: Execution & Delegation
- Run all sub-agents with their working directory set strictly to the worktree
path, such as
.slim/worktrees/<slug>. - Do not modify the main checkout for lane work. Keep build, test, and edit operations isolated inside the lane.
- Track file or folder ownership per lane to avoid merge conflicts between parallel agents.
- Commit progress within the worktree only when the user asked for commits or approved local checkpoint commits.
자주 묻는 질문
워크트리는 어디에 보관되나요?
Git 저장소 옆이 아니라 프로젝트 안의 .slim/worktrees 폴더 아래에 보관됩니다.
작업 흐름을 추적하나요?
네. 각 작업 흐름의 브랜치, 목적, 상태를 적은 선택적 매니페스트 파일을 둘 수 있습니다.
작업 흐름은 누가 통제하나요?
오케스트레이터가 계획, 위임, 점검, 정리를 맡고, 전문가는 작업 흐름 안에서 일할 수 있습니다.
상세 정보
작성자의 원본 설명
Manage Git worktrees as OMO safe isolated coding lanes for complex, risky, or parallel work.
인기도
- GitHub 스타
- 10k
- 순위
- #12020
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
cli-review
10k에이전트가 풀 리퀘스트를 열기 전에 현재 브랜치에서 Greptile 코드 리뷰를 실행하고, 결과를 쉬운 말로 요약하도록 돕습니다.
ai-estimates
10k에이전트가 사람이 AI와 함께 일할 때 작업 시간을 추정하도록 돕습니다. 빠른 AI 작업과 사람 또는 외부의 지연을 나눠 계산합니다.
clonedeps
10k에이전트가 프로젝트의 핵심 의존성 소스 코드를 로컬 폴더에 복사해, 그 라이브러리가 내부에서 어떻게 작동하는지 읽을 수 있게 합니다.
codemap
10k낯선 코드 프로젝트의 구조화된 지도를 만들어, 에이전트가 주요 부분을 빠르게 찾도록 돕습니다. 코드베이스 지도를 요청할 때 가장 잘 쓰입니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.