Files
wehub-resource-sync bb5c75ce05
Component Security Validation / Security Audit (push) Has been cancelled
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:58 +08:00

1 line
2.1 KiB
JSON

{"content": "---\nallowed-tools: Bash(git:*), Bash(cat:*), Bash(pwd:*), Bash(ls:*)\ndescription: Check current worktree status, branch, and assigned task\n---\n\n# Worktree Status Check\n\nVerify the current worktree environment and show task details.\n\n## Instructions\n\nYou are inside a worktree (or the main repo). Gather and display the current status clearly.\n\n### Step 1: Detect Worktree\n\n1. Get the current directory: `pwd`\n2. List all worktrees: `git worktree list`\n3. 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 — if the current path matches the first entry, this is the main repo, not a worktree.\n\nIf this is **not** a worktree, inform the user:\n> You're in the main repository, not a worktree. Use `/worktree-init` to create worktrees.\n\nThen list any existing worktrees and exit.\n\n### Step 2: Show Branch Info\n\n1. Get current branch: `git branch --show-current`\n2. Verify it follows the `claude/*`, `claude-daniel/*`, or `review/*` naming convention\n3. Show how many commits ahead of origin/main: `git rev-list --count origin/main..HEAD`\n\n### Step 3: Read Task\n\n1. Check if `.worktree-task.md` exists in the worktree root\n2. If it exists, read and display its contents\n3. If it doesn't exist, note that no task file was found (may have been created manually)\n\n### Step 4: Show Working Status\n\nRun and display:\n1. `git status --short` — show modified, staged, and untracked files\n2. `git diff --stat` — show a summary of unstaged changes\n\n### Step 5: Display Summary\n\nPresent a clean summary:\n\n```\nWorktree Status\n──────────────────────────────────\nBranch: claude/<name>\nTask: <task description from .worktree-task.md>\nCommits: <N> ahead of main\nModified: <N> files\nStaged: <N> files\nUntracked: <N> files\n──────────────────────────────────\n```\n\nIf there are changes ready to deliver, suggest: \"Run `/worktree-deliver` when you're ready to commit, push, and create a PR.\"\n"}