← Back to list

worktree-check
by erikpr1994
⭐ 0🍴 0📅 Jan 22, 2026
SKILL.md
name: worktree-check description: "Use before git write operations (commit, push, merge, rebase) to verify you are in a git worktree. Guides worktree setup if missing. Keywords: worktree, isolation, git commit, git push."
Worktree Check
Ensure git write operations happen inside an isolated worktree.
When to Use
- Before
git commit,git push,git merge, orgit rebase - When unsure if you are in a worktree
Verify Worktree
# Worktree indicators
[ -f .git ] && echo "worktree"
git rev-parse --git-dir 2>/dev/null | grep -q "/worktrees/" && echo "worktree"
If neither check confirms a worktree, create one before proceeding.
Create Worktree (Recommended)
# Prefer .worktrees/ if present
ls -d .worktrees worktrees 2>/dev/null
# Ensure gitignored
git check-ignore -q .worktrees || echo ".worktrees/" >> .gitignore
# Create and enter worktree
branch="feature/your-branch"
git worktree add .worktrees/your-branch -b "$branch"
cd .worktrees/your-branch
Proceed Safely
Re-run the git command from inside the worktree once it is created.
Notes
- If the user asks to proceed without a worktree, confirm explicitly before running git write operations.
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon