worktree-start

worktree-start is a command for coding agents from sangrokjung/claude-forge. It costs 20 tokens per session (1,739 once invoked), scanned D, original, MIT.

A command that creates separate Git worktrees for parallel development. A Git worktree is another working folder connected to the same repository, so separate tasks can be worked on at the same time.

In plain words
What is it for?
For preparing a repository for parallel feature, bug-fix, or refactoring work, including checking branches, worktrees, and ignore rules.
Why use it?
It helps prevent parallel tasks from interfering with each other and checks whether Claude Code files could cause merge conflicts. It stops for confirmation when repository setup needs attention.

Command

Part of the claude-forge plugin — 33 skills, 39 commands, 17 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sangrokjung/claude-forge/worktree-start
Clone the repo
git clone --depth 1 https://github.com/sangrokjung/claude-forge

Or install claude-forge, the plugin that ships this one along with the rest of its 33 skills, 39 commands, 17 agents.

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 worktree-start

README.md
[![agentmods](https://agentmods.dev/badge/commands/sangrokjung/claude-forge/worktree-start.svg)](https://agentmods.dev/commands/sangrokjung/claude-forge/worktree-start)
Your own site
<a href="https://agentmods.dev/commands/sangrokjung/claude-forge/worktree-start"><img src="https://agentmods.dev/badge/commands/sangrokjung/claude-forge/worktree-start.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,739 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. Scan, not verified.
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.00020 $0.01739
Opus 5 $0.00010 $0.00870
Sonnet 5 $0.00004 $0.00348
Haiku 4.5 $0.00002 $0.00174

Measured 6d ago against content hash f99114aa7e34, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade D, and why

worktree-start scanned grade D with 2 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 6d ago.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

grep -E "\.claude/context/|\.claude/settings" .gitignore 2>/dev/null

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

2. 삭제 후 재생성: rm -rf [경로] && /worktree-start [브랜치]
commands/worktree-start.md · 227 lines

How it starts

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

Task

0단계: 환경 확인

git rev-parse --git-dir
git worktree list
git branch -a

git 레포 아니면:

❌ git 레포가 아닙니다.
git init 먼저 실행하세요.

→ 중단

0.5단계: 충돌 방지 확인

# .gitignore에 Claude Code 자동 생성 파일이 있는지 확인
grep -E "\.claude/context/|\.claude/settings" .gitignore 2>/dev/null

# 추적 중인 Claude Code 파일 확인
git ls-files | grep "^\.claude/"

Claude Code 파일이 .gitignore에 없으면:

⚠️ 충돌 방지 설정 필요
════════════════════════════════════════

병렬 워크트리에서 Claude Code 자동 생성 파일로 인한
병합 충돌이 발생할 수 있습니다.

.gitignore에 추가 필요:
  .claude/context/
  .claude/settings.json
  .claude/settings.local.json

자동 추가 명령어:
  cat >> .gitignore << 'EOF'
  # Claude Code 자동 생성 파일 (충돌 방지)
  .claude/context/
  .claude/settings.json
  .claude/settings.local.json
  EOF
  git add .gitignore
  git commit -m "chore: .gitignore에 Claude Code 자동 생성 파일 추가"

계속 진행하시겠습니까? [y/N]
════════════════════════════════════════

→ 사용자 응답 대기

Claude Code 파일이 Git에 추적 중이면:

⚠️ Claude Code 파일이 Git에 추적 중입니다
════════════════════════════════════════

다음 파일이 추적 중이어서 병합 충돌이 발생할 수 있습니다:
[git ls-files 결과]

추적 해제 명령어:
  git rm -r --cached .claude/context/
  git add .gitignore
  git commit -m "chore: Claude Code 자동 생성 파일 추적 해제"

계속 진행하시겠습니까? [y/N]
════════════════════════════════════════

→ 사용자 응답 대기

1단계: 인자 파싱

$ARGUMENTS에서 옵션 추출:

  • --type feature → 워크플로우 타입: feature (기본값)
  • --type bugfix → 워크플로우 타입: bugfix
  • --type refactor → 워크플로우 타입: refactor
  • 나머지 → 브랜치명

브랜치명 결정:

브랜치명 있으면:

  • feature/, fix/, refactor/ 접두사 없으면 타입에 따라 자동 추가:
    • --type feature (기본) → feature/ 접두사
    • --type bugfixfix/ 접두사
    • --type refactorrefactor/ 접두사
  • 예: auth --type bugfixfix/auth

브랜치명 없으면:

❓ 브랜치명을 입력하세요.

사용법: /worktree-start auth
        /worktree-start feature/payment
        /worktree-start fix/login-bug
        /worktree-start refactor/utils --type refactor

→ 중단

2단계: 워크트리 생성

# 현재 디렉토리명 기준 상위에 생성
# 예: /Users/dev/myproject + feature/auth → /Users/dev/myproject-auth
BRANCH_NAME="[결정된 브랜치명]"
WORKTREE_DIR="../$(basename $(pwd))-${BRANCH_NAME##*/}"

# 브랜치 존재 여부 확인
git show-ref --verify --quiet refs/heads/$BRANCH_NAME

Read the full file on GitHub · 227 lines

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. 6d ago First seen · 227 lines · 20 tokens per session scan D f99114aa7e34

Subscribe to this mod's changes

worktree-start is a command published in the GitHub repository sangrokjung/claude-forge (825 stars, last pushed 2d ago), licensed MIT. It adds 20 tokens to every session and 1,739 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.