/agentic-tools:teardownfrom agentic-tools
Cleans up completed builds by removing merged worktrees and branches, archiving plan files, and resetting factory state. Useful after merging feature branches.
Ships in agentic-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an orchestrator cleaning up after builds complete. Worktrees accumulate, branches linger, plan files scatter. This skill removes everything that's been merged and archives what should be preserved.
Gather the full state without modifying anything:
# All worktrees
git worktree list
# All local branches
git branch
# All remote tracking branches
git branch -r
# Branches merged into main
git branch --merged main
# Branches NOT merged into main
git branch --no-merged main
Also scan for:
.claude/worktrees/ directory contents../worktrees/ directory contentsPLAN-*.md files in any worktreePRD-*.md files in project rootSHARED_CONTEXT.md entries referencing completed tasksFor each worktree/branch, determine status:
For each MERGED item, in order:
# 1. Remove worktree
git worktree remove .claude/worktrees/tNN-description
# 2. Delete local branch
git branch -d build/tNN-description
# 3. Delete remote branch (if exists)
git push origin --delete build/tNN-description
PLAN-*.md to .claude/archive/plans/ (create if needed)PRD-*.md in project root (they're reference docs, not ephemeral)For each ORPHANED item:
# Check if branch has unmerged work
git log main..build/tNN-description --oneline
# If no unmerged commits → safe to delete
git branch -D build/tNN-description
# If unmerged commits exist → report to human
echo "Branch build/tNN-description has N unmerged commits. Keep or delete?"
For orphaned worktrees with no branch:
git worktree prune # Git's built-in cleanup for broken worktree references
Do NOT auto-delete stale items. Report them:
Stale items (require human decision):
⚠ build/t05-payments: last commit 3 days ago, 4 uncommitted files
→ Keep working? Or abandon?
⚠ .claude/worktrees/t07-compliance: no branch found, has 12 modified files
→ Orphaned worktree. Review changes before deleting?
Factory Cleanup Complete:
Removed:
✓ 3 worktrees (.claude/worktrees/t01, t02, t03)
✓ 3 local branches (build/t01, build/t02, build/t03)
✓ 3 remote branches
✓ 3 plan files archived to .claude/archive/plans/
Kept (active):
• build/t04-api-routes (worker in progress, 6/10 steps done)
Needs attention:
⚠ build/t05-payments: stale 3 days, human decision needed
⚠ Orphaned worktree: .claude/worktrees/t07-compliance
Disk space recovered: ~45 MB
Remaining worktrees: 1 active, 1 stale
git worktree prune before listing to clean broken references first.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub kurtlehnardt/agentic-tools --plugin agentic-tools29 skills in this plugin
/architect-reviewFull architectural review of the codebase by a senior architect subagent. Finds and fixes CRITICAL/HIGH issues, reports MEDIUM/LOW. Trigger: architect review, architecture review, full review, code review./babysitCron supervisor that checks on worker subagents every ~5 minutes, compares their progress against the original plan, and writes NUDGE.md into drifting worktrees. Trigger: babysit, supervise workers, watch agents./buildOrchestrate a spec-driven implementation pipeline: spec intake, requirements ledger, plan, architect gate, product gate, task decomposition with model tiering, parallel one-shot workers, a deterministic mechanical gate plus an opus judge, and verified merge. Trigger on "build this", "implement this", "orchestrate this", "build from this spec/contract/PRD", or whenever the user drops a spec, OpenAPI file, or requirements doc and asks for an implementation. Pass --quickly for a low-token variant that keeps subagent workers but replaces all per-phase and per-task reviews with one final opus review on a PR.