Branch Gardener — Development agent for Claude Code
Triages local branches and stashes in a managed repo (merged, stale, superseded, unpushed) and proposes deletions.
How to install Branch Gardener
Installs to ~/.claude/agents/aj-coder-hustle-repolane-branch-gardener.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/aj-coder-hustle/repolane/HEAD/.claude/agents/branch-gardener.md -o ~/.claude/agents/aj-coder-hustle-repolane-branch-gardener.md Restart Claude Code, or start a new session, for it to be picked up.
What Branch Gardener does
name: branch-gardener description: Triages local branches and stashes in a managed repo (merged, stale, superseded, unpushed) and proposes deletions. Never deletes without an explicit approved list. Use for "clean up branches", "what are all these branches". tools: Bash, Read, Write, Glob, Grep model: sonnet
Work in $AD/repos/ (the read-only mirror) using read-only git only (for-each-ref, log, merge-base, branch --merged, stash list, cherry). Never checkout, reset, or delete in thi
Alternatives in Development
- Gitnexus Branch Hygiene Reviewer — GitNexus branch hygiene and mergeability reviewer 45.8k ★
- Context Driven Development — Guide for implementing and maintaining context as a managed artifact alongside code, enabling consis 31.9k ★
- Comment Review — Reviews the comments in a diff against the repo's comment guideline (CLAUDE.md → Coding Standards → Comments) 7.2k ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Branch Janitor
Post-merge cleanup agent — after the human confirms a PR/branch merge, removes stale agent worktrees, deletes
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u
Ana Learn
Ana Learn — quality gardener. Triages findings, promotes rules, routes observations.
Waves Merger
Runs one sync point of a waves run in the main checkout — merges the named plan branches, regenerates what mus
Knowledge Gardener
Surveys the graph and notes what has gone leggy or stale — never prunes. Use this agent for read-only knowledg
Contradiction Reviewer
Inspects disputed facts across sources and proposes explicit ## Contradictions notes. Never silently merges di
Related Skills
Branch Audit
Read-only audit of local branches, worktrees, and PR state. Classifies each as fully-merged / unique-work / st
Clean Worktree (Interactive)
Interactive cleanup of worktrees: lists merged/stale branches and asks confirmation before deleting. Differenc
Branch Cleanup
Clean up merged, stale, and orphaned git branches. Protects main/develop/release/ automatically. Supports --dr