smithery.ai

create-worktree

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

First seen Mar 21, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash(git:*), Bash(mkdir:*), Bash(cp:*), Bash(chmod:*), Bash(bash:*), Bash(make:*)
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,271 B
  • docs SUMMARY.md 183 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

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 スキル](../pr-and-cleanup/SKILL.md) を参照してください。

手動でworktreeを削除する場合

git worktree remove .worktrees/<feature-name>

詳細

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