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/shakestzd/contextune/ctx-cleanupgit clone --depth 1 https://github.com/shakestzd/contextuneWrote 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/shakestzd/contextune/ctx-cleanup)<a href="https://agentmods.dev/commands/shakestzd/contextune/ctx-cleanup"><img src="https://agentmods.dev/badge/commands/shakestzd/contextune/ctx-cleanup.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 | $0.00011 | $0.01455 |
| Opus 5 | $0.00005 | $0.00727 |
| Sonnet 5 | $0.00002 | $0.00291 |
| Haiku 4.5 | $0.00001 | $0.00145 |
Grade A, and why
ctx:cleanup 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 4d 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 — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Parallel Cleanup - Remove Completed Worktrees
You are performing cleanup of completed parallel development work.
Contextune Integration: This command can be triggered via /contextune:parallel:cleanup or natural language like "clean up parallel worktrees", "remove completed tasks".
Execution Workflow
Step 1: Identify Merged Branches
Check which parallel branches have been merged to main:
# List all feature branches that are fully merged
git branch --merged main | grep "feature/task-"
Expected output:
feature/task-0
feature/task-2
Interpret:
- Listed branches: Safe to delete (already in main) ✅
- Not listed: Still has unmerged commits ⚠️
Step 2: Show Cleanup Plan (Ask User)
Before deleting anything, show what will be removed:
🧹 Cleanup Plan
**Will remove:**
✅ Worktree: worktrees/task-0 (merged to main)
✅ Local branch: feature/task-0 (merged)
✅ Remote branch: origin/feature/task-0 (if exists)
✅ Worktree: worktrees/task-2 (merged to main)
✅ Local branch: feature/task-2 (merged)
✅ Remote branch: origin/feature/task-2 (if exists)
**Will keep:**
⏳ Worktree: worktrees/task-1 (not merged - has uncommitted work)
Proceed with cleanup? (yes/no)
Ask user for confirmation before proceeding.
Step 3: Remove Merged Worktrees
For each merged branch, remove its worktree:
# Remove worktree for task-0
git worktree remove worktrees/task-0
# Remove worktree for task-2
git worktree remove worktrees/task-2
Expected output per removal:
✅ Removed worktree 'worktrees/task-0'
If removal fails:
Error: worktree has uncommitted changes
→ Skip this worktree, warn user
Step 4: Delete Local Merged Branches
Delete the local branches that were merged:
# Delete local branch
git branch -d feature/task-0
# Delete local branch
git branch -d feature/task-2
Expected output:
Deleted branch feature/task-0 (was abc1234).
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.
- 4d ago First seen · 299 lines · 11 tokens per session scan A 7ebae007f348
ctx:cleanup is a command published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 11 tokens to every session and 1,455 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
security-review
CWE 기반 보안 검토 + STRIDE 위협 모델링 (v6 - effort:max 강제).
version
Display current guide and Claude Code versions.
diff-docs
Compare official Anthropic docs baseline vs current snapshot (no network — instant).
docs-review
Phase 4 of documenting-projects: Quality gate with 8 measurable criteria and iteration. Triggers: '/docs-review', invoked by documenting-projects orchestrator.
music-suno-prompt
Grounded Suno prompt synthesis from local knowledge corpus + persona canon + label canon. No vibes-prompting.
memcord-save-progress
Auto-summarize and save conversation progress.