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/vishnu2kmohan/mcp-server-langgraph/cleanup-worktreesgit clone --depth 1 https://github.com/vishnu2kmohan/mcp-server-langgraphWrote 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/commands/vishnu2kmohan/mcp-server-langgraph/cleanup-worktrees)<a href="https://agentmods.dev/commands/vishnu2kmohan/mcp-server-langgraph/cleanup-worktrees"><img src="https://agentmods.dev/badge/commands/vishnu2kmohan/mcp-server-langgraph/cleanup-worktrees.svg" alt="Measured on agentmods" 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.00012 | $0.00971 |
| Opus 5 | $0.00006 | $0.00485 |
| Sonnet 5 | $0.00002 | $0.00194 |
| Haiku 4.5 | $0.00001 | $0.00097 |
Grade A, and why
cleanup-worktrees 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 5d 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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cleanup Git Worktrees
Purpose: Manage and cleanup git worktrees created for Claude Code sessions.
When to use: After ending a Claude Code session to clean up old worktrees.
Instructions
You are helping the user cleanup git worktrees created by the start-worktree-session.sh script.
Phase 1: List Worktrees
-
Run the cleanup script in dry-run mode to show what would be deleted:
./scripts/cleanup-worktrees.sh --dry-run -
Show the user:
- Total number of worktrees
- How many are clean (no uncommitted changes)
- How many are dirty (have uncommitted changes)
- Details about each worktree (branch, commit, creation date)
Phase 2: Ask User Preference
Ask the user how they want to proceed:
- Option 1: Delete all clean worktrees automatically
- Option 2: Interactively choose which worktrees to delete
- Option 3: Delete ALL worktrees (even with uncommitted changes) - DANGEROUS!
- Option 4: Keep all worktrees (no deletion)
Phase 3: Execute Cleanup
Based on user's choice:
Option 1 - Auto-delete clean:
./scripts/cleanup-worktrees.sh --auto
Option 2 - Interactive:
./scripts/cleanup-worktrees.sh
Option 3 - Delete all (DANGEROUS):
./scripts/cleanup-worktrees.sh --all --auto
Option 4 - No deletion: Skip execution and inform user that worktrees are preserved.
Phase 4: Summary
After cleanup, show:
- Number of worktrees deleted
- Number of worktrees kept
- Remaining worktrees (if any)
- Disk space reclaimed (optional)
Important Notes
- Clean worktrees: No uncommitted changes, safe to delete
- Dirty worktrees: Have uncommitted changes, should preserve unless user explicitly requests deletion
- Session worktrees: Only manages worktrees created by
start-worktree-session.sh(matching patternmcp-server-langgraph-session-*) - Main repository: Never deletes the main repository
Examples
Example 1: User wants to cleanup after ending session
User: Cleanup my worktrees
Assistant: I'll check your worktrees and show what can be cleaned up.
[Runs: ./scripts/cleanup-worktrees.sh --dry-run]
[Shows: 3 clean worktrees, 1 dirty worktree]
[Asks: How would you like to proceed?]
[User chooses: Auto-delete clean worktrees]
[Runs: ./scripts/cleanup-worktrees.sh --auto]
[Shows: Deleted 3 worktrees, kept 1 dirty worktree]
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.
- 5d ago First seen · 138 lines · 12 tokens per session scan A e9868a5a3e86
cleanup-worktrees is a command published in the GitHub repository vishnu2kmohan/mcp-server-langgraph (4 stars, last pushed 5d ago), licensed MIT. It adds 12 tokens to every session and 971 once invoked, about $0.0001 per session on Opus 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 commands, from other repositories
hal-voice-toggle
Toggle HAL 9000 voice clips on or off.
deps-age
Analyze dependency freshness and maintenance activity.
OPSX: Bulk Archive
Archive multiple completed changes at once.
designer
UI/UX design with Memory coordination for consistent experiences.
reviewer
Code review using batch file analysis for comprehensive reviews.
pipeline-generate
You are a senior DevOps & Cloud Infrastructure specialist. The user needs help with pipeline generate in the context of ci/cd pipelines, container orchestration, iac, monitoring and incident response.