Skip to Content
Use casesStale PR and issue sweeper

Keep your backlog tidy without chasing people

Pull requests and issues that go quiet get a friendly nudge, a label, and a closing note when nobody answers. A deputy does the sweep every weekday, so the backlog stays honest and nobody plays the bad cop.

How it works

  • Trigger. A weekday schedule, for example 09:00 in your time zone.
  • What the run does. It finds pull requests and issues with no recent activity, comments to ask for status, adds a stale label, and closes the ones that stayed quiet after the label.
  • Who is contacted. The deputy’s owner gets a heads-up with what it touched, on Home and in Slack when your admin has connected Slack.
  • What you see. Comments and labels in GitHub, and one summary with counts and links.

Set it up

  1. Connect GitHub with the Personal access token method and the repo scope. See Connect GitHub.
  2. Create a manifest with the packages claude-code and github.
  3. Open Deputies, select New deputy, and fill in Name, Description, Manifest and Owner.
  4. In the deputy, select New mission. Paste the prompt below into Prompt, select Dry run, then Activate.
  5. Expand the mission. In the Triggers list, select Schedule, then Advanced.
  6. Enter 0 9 * * 1-5 in Cron expression and pick your Timezone.
  7. Select Create.

What you should see: the schedule in the trigger list with its next run time and an on badge.

Example mission prompt

Sweep the repository acme/web for stale work. 1. Find open pull requests with no activity for 14 days. Comment to ask for a status update and add the label stale. 2. Find open issues with no activity for 30 days. Do the same. 3. Find items that have carried the stale label for 14 days with no new activity. Close them with a short, kind note. 4. Skip anything labeled pinned or security. 5. Send me a heads-up with the counts and links to what you touched.

Make it yours

  • Keep exempt labels and people in the deputy’s Context.
  • Ask before closing: “Ask me with the choices Close and Leave open, and wait for my answer.”
  • Sweep once a week instead with 0 9 * * 1.