Git
npx -y skills add xy23d/agent-skills --skill gitAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
複数のgit worktreeを一括操作するスキル。worktreeの状態確認や特定コミットの検索で複数回コマンドを叩いているときに使う。 `/git worktrees [dir]` で全worktreeのブランチ・ahead/behind・未追跡ファイルを一括表示。 `/git find <hash> [dir]` で特定コミットが各worktreeに含まれるか検索。 `/git untracked [dir]` でignoredを含むgit管理外ファイル・ディレクトリを一覧表示。 `/git rebase <parent> [child]` でrebase(コンフリクト時のルールあり)。 `/git remove-worktree <branch|path>` でworktreeを削除(失敗時は自己判断で突破せずユーザー報告)。 以下のときに必ず使うこと: 「worktreeの状態を確認したい」「各ブランチのリモートとの差分を見たい」→ `/git worktrees` 「このコミットがどのブランチに入っているか調べたい」→ `/git find` 「ignoredを含むgit管理外ファイルを確認したい」→ `/git untracked` 「rebaseして」→ `/git rebase` 「worktreeを削除して」→ `/git remove-worktree`
SKILL.md
2.9 KB, 620 tokens by cl100k_base, as published. Nobody here has run it
git: worktree一括操作
スクリプトは scripts/ に同梱済み。スキル起動時に示されるベースディレクトリ("Base directory for this skill: ...")を使って実行する。
/git worktrees [dir]
bash <base_dir>/scripts/worktrees.sh [dir]
dir省略時はカレントディレクトリ- clean(ahead:0 behind:0 untracked:0)は
✓で表示、それ以外は詳細を表示
/git find <hash> [dir]
bash <base_dir>/scripts/find-commit.sh <hash> [dir]
hashは前方一致(短縮形OK)dir省略時はカレントディレクトリ- 結果は
FOUND/noneで各worktreeごとに表示
/git untracked [dir]
bash <base_dir>/scripts/untracked.sh [dir]
dir省略時はカレントディレクトリ- ignoredを含むgit管理外ファイル・ディレクトリを一覧表示
- 対象は単一リポジトリ
- read-only
/git rebase <parent> [child]
child を parent にrebaseする。child 省略時はカレントブランチ。
手順
- 子ブランチのworktreeで
git rebase <parent>を実行 - コンフリクト発生時は
git rebase --abortしてユーザーに報告して終了する- コンフリクトしたファイル一覧と概要を報告する
- 自己判断での解決をしない
worktreeの場所
ブランチ名からworktreeパスを解決する:
git worktree list --porcelain | grep -B2 "branch refs/heads/<branch-name>" | head -1
/git remove-worktree <branch|path>
bash <base_dir>/scripts/remove-worktree.sh <branch|path>
branch指定時は worktree パスを自動解決- 失敗したらユーザーに報告し、作業を中断する
What ships with it: 6 files
3.1 KB alongside SKILL.md, 4 of them executable
scripts/
- find-commit.shruns508 B
- .gitignore78 B
- remove-worktree.shruns1.3 KB
- untracked.shruns429 B
- worktrees.shruns780 B
- .gitignore33 B