Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add psd401/psd-claude-plugins --skill worktreegit clone --depth 1 https://github.com/psd401/psd-claude-pluginsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/psd401/psd-claude-plugins/worktree)<a href="https://agentmods.dev/skills/psd401/psd-claude-plugins/worktree"><img src="https://agentmods.dev/badge/skills/psd401/psd-claude-plugins/worktree/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/psd401/psd-claude-plugins/worktree"><img src="https://agentmods.dev/badge/skills/psd401/psd-claude-plugins/worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.02387 |
| Opus 5.5 | $0.00017 | $0.00955 |
| Sonnet 5.5 | $0.00009 | $0.00477 |
| Haiku 4.5 | $0.00004 | $0.00239 |
Grade A, and why
worktree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Worktree Command
You manage parallel development using git worktrees. Worktrees let you work on multiple branches simultaneously without stashing or switching — each worktree is an independent checkout of the repo.
Arguments: $ARGUMENTS
Phase 1: Parse Arguments & Detect Intent
ARGS="$ARGUMENTS"
# Detect subcommand
case "$ARGS" in
list|ls)
SUBCOMMAND="list"
;;
prune)
SUBCOMMAND="prune"
;;
clean|sweep|tidy)
SUBCOMMAND="clean"
;;
remove\ *|rm\ *)
SUBCOMMAND="remove"
TARGET=$(echo "$ARGS" | sed 's/^remove //;s/^rm //')
;;
*)
SUBCOMMAND="create"
TARGET="$ARGS"
;;
esac
echo "Subcommand: $SUBCOMMAND"
echo "Target: ${TARGET:-N/A}"
Phase 2: Execute
If list:
echo "=== Active Worktrees ==="
git worktree list
echo ""
echo "=== Branches in Worktrees ==="
git worktree list --porcelain | grep "^branch" | sed 's/branch refs\/heads\// /'
If prune (worktrees only — lightweight):
echo "=== Pruning stale worktrees ==="
git worktree prune --verbose
echo ""
echo "=== Remaining worktrees ==="
git worktree list
If clean (post-merge hygiene — restores what /clean-branch used to do):
Sweeps merged branches (local and remote, squash-merge-aware), stale worktrees, and issues that should be closed. Gather the candidates first; the destructive steps (remote-branch deletion, issue closing) are confirmed before running.
echo "=== /worktree clean — post-merge hygiene ==="
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' 2>/dev/null || echo main)
if git ls-remote --exit-code --heads origin dev >/dev/null 2>&1; then BASE=dev; else BASE="$DEFAULT_BRANCH"; fi
CUR=$(git branch --show-current); PROT='^(main|master|dev|HEAD)$'
git fetch --prune origin --quiet 2>/dev/null || true # drop tracking refs for branches already deleted on the remote
echo "--- 1. local branches whose work is merged (safe to delete) ---"
LOCAL_DELETE=""
for b in $(git for-each-ref --format='%(refname:short)' refs/heads/); do
echo "$b" | grep -qE "$PROT" && continue
[ "$b" = "$CUR" ] && continue
# normal-merged into base, OR its PR is merged (covers squash merges, which change the SHA)
if git merge-base --is-ancestor "$b" "origin/$BASE" 2>/dev/null \
|| [ -n "$(gh pr list --head "$b" --state merged --limit 1 --json number --jq '.[].number' 2>/dev/null)" ]; then
LOCAL_DELETE="$LOCAL_DELETE $b"
fi
done
echo "${LOCAL_DELETE:-(none)}"
echo "--- 2. worktrees (remove any on a merged/gone branch) ---"
git worktree list
echo "--- 3. remote branches whose PR is MERGED/CLOSED (dependabot excluded) ---"
REMOTE_DELETE=""
for rb in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin/ | sed 's#^origin/##'); do
echo "$rb" | grep -qE "$PROT" && continue
echo "$rb" | grep -qE '^dependabot/' && continue # Dependabot manages its own branches
S=$(gh pr list --head "$rb" --state all --limit 1 --json state --jq '.[].state' 2>/dev/null)
case "$S" in MERGED|CLOSED) REMOTE_DELETE="$REMOTE_DELETE $rb" ;; esac
done
echo "${REMOTE_DELETE:-(none)}"
echo "--- 4. issues still OPEN whose linked PR already merged ---"
ORPHANS=""
for pr in $(gh pr list --state merged --limit 30 --json number --jq '.[].number' 2>/dev/null); do
for issue in $(gh pr view "$pr" --json closingIssuesReferences --jq '.closingIssuesReferences[].number' 2>/dev/null); do
[ "$(gh issue view "$issue" --json state --jq '.state' 2>/dev/null)" = "OPEN" ] && ORPHANS="$ORPHANS #${issue}(PR#${pr})"
done
done
echo "${ORPHANS:-(none)}"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 14d ago Changed · -1 lines 13a72c1d7ed9
- 1mo ago Changed d858ad8f7543
- 2mo ago First seen · 231 lines · 43 tokens per session scan A fbddf2d14e1b
worktree is a skill published in the GitHub repository psd401/psd-claude-plugins (2 stars, last pushed 9d ago), licensed MIT. It adds 43 tokens to every session and 2,387 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
merge-batch
Prepare and merge an owner-selected PR batch with contributor credit and exact-candidate admission. Use for a pasted PR list; combined focused validation is diagnostic, and every actual landing still requires its applicable checks and authorization.
prowler-commit
Creates professional git commits for Prowler following conventional-commits format, with prek pre-commit hooks. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
re0-merge
Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…