Skip to content
cccskills
FreePublished on GitHub

create-worktree

Creates a git worktree for parallel feature development. Use after planning to prepare an isolated development environment with all necessary environment files.

The English summary is being prepared. Showing the original description.

See how to install

Files included (3)

  • SKILL.md2.2 KB
  • REFERENCE.md3.9 KB
  • scripts/create_worktree.sh4.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Git Worktree Creator

planモード終了後、feature開発用の独立したworktree環境を自動作成します。

概要

このSkillは以下を自動で実行します:

  1. .worktrees/<feature-name>/ ディレクトリにworktreeを作成
  2. feature/<feature-name> ブランチを新規作成
  3. 環境変数ファイル(.env, .envrc など)を自動コピー
  4. make setup で開発環境をセットアップ

使用方法

基本的な使い方

# スクリプトを実行
bash .claude/skills/create-worktree/scripts/create_worktree.sh <feature-name>

# 例: user-auth 機能を開発する場合
bash .claude/skills/create-worktree/scripts/create_worktree.sh user-auth

実行結果

.worktrees/user-auth/     # worktreeディレクトリ
├── .env                  # ルートからコピー
├── .envrc                # ルートからコピー
├── modules/
│   ├── frontend/.env*    # frontendの環境変数
│   ├── backend/.env      # backendの環境変数
│   └── agent/.env        # agentの環境変数(あれば)
└── ...(その他のファイル)

コピーされる環境変数ファイル

  • ルート: .env, .envrc
  • frontend: .env, .env.local, .env.dev, .env.prd, .env.test
  • backend: .env
  • agent: .env(存在する場合)

作業完了後

PR作成とworktree削除を同時に行う(推奨)

pr-and-cleanup スキルを使用すると、PR作成とworktree削除を自動で行えます:

cd .worktrees/<feature-name>
bash ../../.claude/skills/pr-and-cleanup/scripts/pr_and_cleanup.sh

詳細は pr-and-cleanup スキル を参照してください。

手動でworktreeを削除する場合

git worktree remove .worktrees/<feature-name>

詳細

詳細については REFERENCE.md を参照してください。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Create a PR and automatically cleanup the worktree. Keeps local and remote branches intact.

The English summary is being prepared. Showing the original description.

shikajiro/claude-code-skill-example64Updated Jan 8, 2026

See all skills by shikajiro

Report a problem with this skill