Skip to content
cccskills
FreePublished on GitHub

shiiman-git:worktree

gtr で worktree を一覧・削除・クリーンアップする(管理操作)。「worktree 一覧」「gtr list」「gtr rm」「worktree 削除」「worktree クリーンアップ」「マージ済み worktree 削除」などで起動。新規作成は shiiman-github:worktree-create を使う。

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

See how to install

Files included (1)

  • SKILL.md3.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Worktree Management with gtr

gtr (git-worktree-runner) を使用して git worktree を管理するスキル。

Help

$ARGUMENTS に --help が含まれる場合、以下を表示して終了:

/shiiman-git:worktree - Worktree Management with gtr

概要:
  gtr を使用して worktree の作成・一覧・削除・クリーンアップを行う。

使用方法:
  /shiiman-git:worktree [オプション]

オプション:
  --help  このヘルプを表示

対応コマンド:
  new     現在のブランチから worktree を作成
  list    worktree の一覧を表示
  rm      worktree をブランチごと削除
  clean   不要な worktree をクリーンアップ

前提条件

  • gtr (git-worktree-runner) がインストール済み
    • 未インストールの場合は git-worktree-setup スキルを案内する

機能

ユーザーの発話内容から以下の 3 パターンを判定して実行する。

1. worktree 作成

トリガー: 「worktree 作成」「gtr new」「新しい worktree」「ワークツリー作成」

現在のブランチをベースに worktree を作成する。

git gtr new <branch> --from-current

処理フロー:

  1. ブランチ名を確認(指定がない場合はユーザーに質問)
  2. git gtr new <branch> --from-current を実行
  3. 成功メッセージを表示

2. worktree 一覧

トリガー: 「worktree 一覧」「gtr list」「ワークツリー一覧」「worktree 確認」

git gtr list

結果をテーブル形式に整形して表示:

## Worktree 一覧

| ブランチ | パス |
|----------|------|
| main | /path/to/main |
| feature/A | /path/to/feature-A |

3. worktree 削除 + クリーンアップ

個別削除

トリガー: 「worktree 削除」「gtr rm」「ワークツリー削除」「worktree を消す」

ブランチごと複数 worktree をまとめて削除する。

git gtr rm <branch1> <branch2> --delete-branch

処理フロー:

  1. 削除対象のブランチ名を確認(git gtr list で一覧を提示)
  2. ユーザー確認後に --delete-branch 付きで削除実行
  3. 成功メッセージを表示

クリーンアップ

トリガー: 「クリーンアップ」「マージ済み削除」「不要な worktree を整理」

不要な worktree を一括削除する。

git gtr clean

処理フロー:

  1. まず git gtr clean --dry-run でプレビューを表示
  2. ユーザー確認後に git gtr clean を実行
  3. 成功メッセージを表示

エラーハンドリング

gtr がインストールされていない場合

gtr がインストールされていません。
`/shiiman-git:worktree-setup` でインストールと設定ができます。

worktree 削除時に未コミット変更がある場合

警告を表示し、--force オプションの使用を提案する。

関連リソース

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

プラグインに新しいフックを作成する。「フック作成」「新しいフック」「フックを作って」「フック追加」「hook 作成」「フックを追加したい」「新規フック」などで起動。ツール実行前後やセッションイベントで実行されるフックを生成。

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

shiiman/claude-code-plugins6Updated Jun 17, 2026

マーケットプレイスのソースを dev(directory)/ prd(git)に切り替える。「マーケットプレイス切替」「marketplace toggle」「dev モード」「prd モード」「ローカル開発モード」「開発モード切替」「マーケットプレイス dev」などで起動。

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

shiiman/claude-code-plugins6Updated Jun 17, 2026

新しい Claude Code プラグインを作成する。「プラグイン作成」「新しいプラグイン」「プラグインを作って」「プラグイン追加」「plugin 作成」「プラグイン一括作成」「フル作成」などで起動。プラグインのみ作成と、スキル/サブエージェント/フックを含む一括作成の両方に対応。

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

shiiman/claude-code-plugins6Updated Jun 17, 2026

MCP サーバーの一覧表示・追加・削除を一つのスキルで管理する。「MCP 管理」「MCP 一覧」「MCP を追加」「MCP を削除」「MCP サーバー管理」「MCP 設定」「MCP 操作」などで起動。引数があれば優先し、なければ発話内容から list/install/remove を判定。

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

shiiman/claude-code-plugins6Updated Jun 17, 2026

プロジェクトの Claude Code リソース一覧を表示する。「Claude リソース一覧」「スキル一覧」「エージェント一覧」「フック一覧」「プロジェクトリソース確認」「何があるか確認」「リソースを見せて」などで起動。表示対象(スキル/エージェント/フック)は発話から判断する。

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

shiiman/claude-code-plugins6Updated Jun 17, 2026

Claude Code 設定の表示・更新・ローカル更新を統合管理する。「Claude 設定管理」「設定を表示」「settings を更新」「local settings を更新」「権限設定を変更」「設定ファイル管理」「claude settings」などで起動。引数があれば優先し、なければ発話内容から view/update/local-update を判定。

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

shiiman/claude-code-plugins6Updated Jun 17, 2026

See all skills by shiiman

Report a problem with this skill