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 agentmods add commands/florianbruniaux/claude-code-plugins/git-worktree-removegit clone --depth 1 https://github.com/FlorianBruniaux/claude-code-pluginsWhat 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 | $0.00018 | $0.01455 |
| Opus 5 | $0.00009 | $0.00727 |
| Sonnet 5 | $0.00004 | $0.00291 |
| Haiku 4.5 | $0.00002 | $0.00145 |
Grade C, and why
git-worktree-remove scanned grade C with 1 finding 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 2d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
**Using `rm -rf` instead of `git worktree remove`** How it starts
The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktree Remove
Safely remove a single git worktree with branch cleanup, merge verification, and database branch teardown.
Core principle: Safety checks first, then clean removal of worktree + branch + DB resources.
Part of: Worktree Lifecycle Suite | /git-worktree | /git-worktree-status | /git-worktree-clean
Process
- Validate Target: Identify worktree to remove
- Safety Check: Protect main/develop branches
- Check Merge Status: Warn if branch has unmerged changes
- Check Uncommitted Changes: Warn if worktree has dirty state
- Remove Worktree:
git worktree remove - Delete Local Branch:
git branch -d(or-Dwith confirmation) - Delete Remote Branch:
git push origin --delete(with confirmation) - Database Cleanup Reminder: Suggest DB branch deletion if applicable
- Prune References:
git worktree prune
Safety Checks
Protected Branches
# Never remove worktrees for these branches (configurable)
PROTECTED_BRANCHES="main master develop staging production"
if echo "$PROTECTED_BRANCHES" | grep -qw "$BRANCH"; then
echo "BLOCKED: Cannot remove worktree for protected branch '$BRANCH'"
echo "Protected branches: $PROTECTED_BRANCHES"
exit 1
fi
Uncommitted Changes
cd "$WORKTREE_PATH"
if [ -n "$(git status --porcelain)" ]; then
echo "WARNING: Worktree has uncommitted changes:"
git status --short
echo ""
echo "Options:"
echo " 1. Commit changes first"
echo " 2. Force remove (--force)"
echo " 3. Cancel"
# Wait for user decision
fi
Merge Status
# Check if branch is merged into main
MAIN_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
if git merge-base --is-ancestor "$BRANCH" "$MAIN_BRANCH" 2>/dev/null; then
echo "Branch '$BRANCH' is merged into $MAIN_BRANCH. Safe to delete."
MERGED=true
else
echo "WARNING: Branch '$BRANCH' is NOT merged into $MAIN_BRANCH."
echo "You may lose work if you delete this branch."
MERGED=false
fi
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.
- 2d ago First seen · 190 lines · 18 tokens per session scan C fa7c10769584
git-worktree-remove is a command published in the GitHub repository FlorianBruniaux/claude-code-plugins (40 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 1,455 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
content-generate
Social media content generation command. Produces ready-to-use posts, captions, visual briefs, and hashtags for the given platform and type.
api-doc
API documentation generation. Scans route definitions and produces structured API docs.
aso
App Store Optimization command. iOS app listing analysis via the iTunes API, keyword optimization, and competitor comparison.
changelog
Automatic changelog generation. Produces a structured changelog from commit history.
coach
Coaching analysis command. Performs data-driven work-pattern analysis and offers personal improvement suggestions.
competitive-intel
Competitive analysis command. Analyzes the market, competitors, and opportunities with a comprehensive competitive-intelligence framework.