/empire-git:worktree-list [--stale]from empire-git
Lists active git worktrees with branch, status, sync state, and staleness detection. Useful for parallel work overview.
Ships in empire-git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
List all active worktrees with rich context: branch, status, sync state, and staleness detection.
User input: $ARGUMENTS
git worktree list --porcelain
Parse the output to extract for each worktree:
worktree <path>)HEAD <sha>)branch refs/heads/<name>) or (detached HEAD)Identify the main working tree (first entry) and label it as such.
If there are no worktrees beyond the main working tree, report:
No additional worktrees found. Use
/empire-git:worktree-opento create one.
Then stop.
For each worktree, gather the following:
git -C "<path>" status --porcelain 2>/dev/null | wc -l | tr -d ' '
0 → "clean">0 → report count of modified filesgit -C "<path>" rev-list --left-right --count @{upstream}...HEAD 2>/dev/null
Output format: <behind>\t<ahead>. If no upstream is set, note "no remote".
git -C "<path>" log -1 --format="%cr|%s" 2>/dev/null
This gives relative time and subject (e.g., 2 hours ago|add JWT validation).
git -C "<path>" log -1 --format="%ct" 2>/dev/null
Compare the commit timestamp to now. Flag as stale if the last commit is 3 or more days old. This is the informational threshold; worktree-cleanup uses a stricter 7-day threshold for actual removal. The two thresholds differ on purpose: list is a soft warning, cleanup is the action.
printf '%s' "<absolute-worktree-path>" | cksum | awk '{print $1 % 100}'
worktree-setup.sh derives the offset from the worktree's absolute path with this exact formula. Feed the raw absolute path straight from the worktree <path> porcelain line (Step 1), not the shortened relative path shown in the Step 3 examples, and don't run it through realpath or append a trailing slash. Any difference in the string changes the cksum and yields a wrong offset; match it exactly and the recompute is deterministic. Show it in the listing and use it for the collision check in Step 4.
Present each worktree as a block, for example:
Active worktrees:
main (main working tree)
/path/to/repo
Clean | Last commit: 1h ago "update deps"
feat/auth
.claude/worktrees/feat-auth-1a2b3c4d
Clean | 2 ahead | Last commit: 2h ago "add JWT validation"
Ports: offset 17
feat/billing
.claude/worktrees/feat-billing-5e6f7a8b
1 modified file | 0 ahead | Last commit: 20m ago "wip: invoice model"
Ports: offset 42
fix/typo-header
.claude/worktrees/fix-typo-header-9c0d1e2f
Clean | 1 ahead | Last commit: 3d ago "fix typo in header"
Ports: offset 91
⚠ Stale (no commits in 3+ days)
If $ARGUMENTS contains --stale, only show worktrees flagged as stale.
After the listing, add actionable suggestions for any issues found:
/empire-git:worktree-close <branch> to keep your workspace tidy."<branch> has uncommitted changes. Consider committing with /commit."<branch> is behind its remote. Consider pulling."This is a read-only command — it reports state but never changes it. The user is asking "what do I have?" not "fix things for me." If a worktree is in a broken state (missing on disk, detached HEAD, etc.), report what you can and skip what you can't rather than erroring out. Suggest git worktree prune for missing directories so the user can clean up on their own terms.
What SKILL.md sets; muted values are Claude Code's defaults
haikuOther plugins' skills for the same job
npx claudepluginhub marcoskichel/empire --plugin empire-git12 skills in this plugin
/activity-reportGenerate a concise activity report of the user's GitHub work over a period, grouped by area or feature instead of PR by PR. Use when user says "activity report", "weekly report", "what did I do this week", "what did I ship", "work summary", "summarize my week", "status update for my manager", "what did <user> ship", or `/empire-git:activity-report [start-date] [end-date] [author]`.
/pr-comment-replyRender the canonical reply text for a PR review comment. Use when drafting, writing, or posting a "PR comment reply", "review comment reply", "reply to this comment", "respond to this review comment", "answer the reviewer", "reply on the PR thread", or any text bound for `gh api` review-thread replies, `gh pr comment`, or a GitHub review comment box. Triggers on "reply to the comment", "answer this review comment", "respond to the reviewer", "draft a reply", "post a reply on the PR". Outputs plain text for the caller to post unchanged.
/pr-descriptionRender the canonical PR description body. Use when drafting, writing, updating, or regenerating a "PR description", "PR body", "pull request description", "pull request body", "PR summary", "PR template", "GitHub PR body", or any text bound for `gh pr create --body`, `gh pr create --body-file`, `gh pr edit --body`, `gh pr edit --body-file`, or a GitHub PR template. Triggers on "draft a PR", "write the PR", "summarize this branch for review", "regenerate PR body". MUST be invoked before any `gh pr create --body*` or `gh pr edit --body*` per empire-git rules. Outputs markdown for stdin.
/pr-mergeGate then merge a single pull request safely. Use when the user says "merge this PR", "merge the PR", "land this", "ship this PR", "merge when green". Verifies CI is green (investigates and attempts a fix when red), rebases and resolves conflicts when the branch is behind, triages unresolved review threads intelligently (resolve, fix, or ask — never blindly block), then merges and deletes the branch. Fast-forwards the local base checkout (e.g. updates `master`) when it is checked out.
/pr-merge-stackMerge an entire stack of dependent PRs bottom-up: merge the base PR, pull the base branch, rebase the next PR onto it, wait for CI, merge, repeat until the stack is empty. Use when the user says "merge the stack", "merge pr stack", "land the stack", "merge all these PRs", "merge the chain", "ship the whole stack", or names several stacked PRs to merge in order. Infers the stack from conversation; asks when it can't. Offers admin merge (skip review requirements) up front — CI must still pass either way.
/pr-review-postPost a GitHub PR review (verdict + inline comments) in one API call. Use when posting, submitting, or publishing a "PR review", "code review", "review with inline comments", "approve the PR", "request changes", or any payload bound for `gh api repos/*/pulls/*/reviews`. Triggers on "post the review", "submit the review", "publish the review comments", "approve this PR", "request changes on the PR", "leave a review". MUST be used for any review POST so comments and verdict land atomically. Never posts without the caller's confirmed verdict.