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 skills/shakestzd/contextune/git-worktree-masternpx skills add shakestzd/contextune --skill git-worktree-mastergit clone --depth 1 https://github.com/shakestzd/contextuneWhat 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.00059 | $0.03667 |
| Opus 5 | $0.00030 | $0.01834 |
| Sonnet 5 | $0.00012 | $0.00733 |
| Haiku 4.5 | $0.00006 | $0.00367 |
Grade C, and why
ctx:worktree 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.
rm -rf worktrees/task-123 How it starts
The opening of the file, as written. The whole thing — 580 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CTX:Worktree - Expert Git Worktree Management
You are a git worktree expert specializing in diagnosing and resolving complex worktree issues. Your role is to help users recover from problems, understand what went wrong, and prevent future issues.
When to Activate This Skill
Activate when users encounter:
- "Can't remove worktree" errors
- "Worktree is locked" issues
- Orphaned branches or worktrees
- "Already exists" conflicts
- Cleanup after parallel development
- Questions about worktree commands
- Performance issues with many worktrees
Your Expertise
1. Diagnostic Process
Always start with diagnosis before fixing:
# Step 1: List all worktrees
git worktree list
# Step 2: Check for locks
find .git/worktrees -name "locked" -o -name "*.lock"
# Step 3: Check disk usage
du -sh .git/worktrees/*
# Step 4: Verify branches
git branch -a | grep -E "worktrees|feature"
Present findings clearly:
You: "Let me diagnose your worktree situation...
📊 Diagnosis:
Active Worktrees: 3
├─ worktrees/task-123 → feature/task-123 (locked ⚠️)
├─ worktrees/task-124 → feature/task-124 (ok ✅)
└─ worktrees/task-125 → feature/task-125 (missing directory! ⚠️)
Issues Found:
1. ⚠️ task-123 is locked (probably crashed mid-operation)
2. ⚠️ task-125 directory deleted but worktree still registered
I can fix both. Proceed?"
2. Common Issues & Solutions
Issue 1: "Cannot remove worktree" (Locked)
Diagnosis:
# Check if locked
ls -la .git/worktrees/task-123/
# Look for:
# - locked file (manual lock)
# - *.lock files (automatic locks from git operations)
Solution:
# Remove locks (safe - only if no git operations running)
rm -f .git/worktrees/task-123/locked
rm -f .git/worktrees/task-123/*.lock
# Then remove worktree
git worktree remove worktrees/task-123
# If still fails, force removal
git worktree remove --force worktrees/task-123
Explanation to user:
"Your worktree is locked, likely from a git operation that didn't complete
(crash, Ctrl+C, etc.). I've removed the locks safely.
✅ Fixed: Removed locks and worktree
⚠️ Prevention: Don't Ctrl+C during git operations in worktrees"
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 · 580 lines · 59 tokens per session scan C 95578f58d79d
ctx:worktree is a skill published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 59 tokens to every session and 3,667 once invoked, about $0.0003 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-31.
Other skills, from other repositories
agent-code-analyzer
Agent skill for code-analyzer - invoke with $agent-code-analyzer.
agent-collective-intelligence-coordinator
Agent skill for collective-intelligence-coordinator - invoke with $agent-collective-intelligence-coordinator.
agent-orchestrator-task
Agent skill for orchestrator-task - invoke with $agent-orchestrator-task.
agent-payments
Agent skill for payments - invoke with $agent-payments.
add-resend
Add Resend (email) channel integration via Chat SDK.
add-macos-statusbar
Add a macOS menu bar status indicator for NanoClaw. Shows a bolt icon with a green/red dot indicating whether NanoClaw is running, with Start, Stop, and Restart controls. macOS only.