worktree-check
Check current worktree status, branch, and assigned task
- Commands
- Git Workflow
- 21
What it does and how to use it
A /slash command, ready to use, that runs a git workflow workflow in a single step.
- Install the command (command above).
- In Claude Code, type "/" followed by the command name.
- Follow the instructions the command asks for and let it run.
Install (Claude Code)
mkdir -p .claude/commands && curl -fsSL https://doutorai.pt/data/lib/commands__worktree-check.md -o .claude/commands/worktree-check.mdPaste this command into the terminal, in your project folder, and the component installs automatically.
Content
---
allowed-tools: Bash(git:*), Bash(cat:*), Bash(pwd:*), Bash(ls:*)
description: Check current worktree status, branch, and assigned task
---
# Worktree Status Check
Verify the current worktree environment and show task details.
## Instructions
You are inside a worktree (or the main repo). Gather and display the current status clearly.
### Step 1: Detect Worktree
1. Get the current directory: `pwd`
2. List all worktrees: `git worktree list`
3. Determine if the current directory is a worktree (not the main working tree). The main working tree is listed first in `git worktree list` output
- 🔒 Full content on the Pro plan (€7.99/month) -Need help with Claude Code?
Ask Dr AI - it explains things simply.
Need a tailor-made solution?
Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.
Save hours every week with AI, no hassle
Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.