Stale branch cleanup report
Lists merged and abandoned branches safe to delete.
RunsMonthly on the 1st at 10 AM
Cron
0 10 1 * *Works withAny agent, any stack
List all remote branches. For each, report last commit date, author, and whether it is fully merged into main. Produce two lists: (1) merged branches safe to delete, (2) unmerged branches with no commits in 60+ days, with the last commit message. Do not delete anything; just output the commands I would run.
Replace anything in <ANGLE BRACKETS> with your own details. Review outputs before letting an agent send, buy or delete anything.
How to run this
Works with any agent
⏱TriggerMonthly on the 1st at 10 AM
✦Any agentRuns the prompt
✓OutputResult for you to review
Steps
- Copy the prompt and fill in the parts in angle brackets.
- Paste it into whatever agent you already use: a chat assistant, a coding agent, an automation tool, or a script that calls any model API.
- Schedule it (monthly on the 1st at 10 am). Use the agent's own scheduler if it has one, otherwise run it from cron with the expression below.
- Give it only the access it needs (inbox, calendar, repo, sheet) and keep sends, purchases and deletes behind your approval.
- Review the first two runs, tweak the prompt, then let it run.