Back/Engineering/Claude/GitHub Copilot
IntermediateEngineering

Automate Daily Pull Request Reviews with a Claude Code Agent

Create an AI agent in Claude Code to automatically review aging pull requests, prompt your team for action via Slack, and even fix issues autonomously. This routine helps engineering teams ship code faster and reduce manual follow-up.

Automate Daily Pull Request Reviews with a Claude Code Agent

From 11:58 to 17:07, Claire builds a daily Claude Code routine that finds aging pull requests, checks their status, and sends the actionable ones to Slack. Clip range: 11:58 to 17:07.

Before you start

What you need

  • Claude Code account with Routines enabled
  • GitHub repository access for the chat PRD app
  • Slack workspace access to the product channel
  • Daily schedule decision for the routine run time
  • Permission for the agent to create PR threads and send Slack messages

What you’ll make

A scheduled Claude Code routine that reviews aging pull requests, opens monitoring threads for actionable PRs, and posts Slack alerts for PRs needing human review.

Tools used

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

3 steps

Step01

Create a New Routine

In Claude Code, go to the 'Routines' section and create a new routine. Give it a descriptive name, such as 'daily aging PR review', and set it to run daily at a specific time, like 10:15 a.m.

Step02

Define the Agent's Job with a Prompt

Write a prompt that defines the agent's job. Instruct it to find pull requests open for more than 12 hours and assess their merge readiness. Specify two outcomes: if the agent can advance the PR, it should create a new thread to monitor it. If the PR needs human review, it should send a Slack notification to the team.

Example prompt
Look at the prs open on the chat PRD app app. If there are any prs open more than 12 hours. Please review their merge readiness. If there is anything that you can babysit, spin up a thread to babysit that PR until all merge checks are green. Otherwise send a slack in the product channel to the team about the open prs that are ready for approval and merge be mean when you send the slack.
Step03

Activate and Monitor the Routine

Activate the routine after confirming its schedule and prompt. Before the first run, verify that required connectors like GitHub and Slack are enabled and available to the agent. The routine will now execute on its schedule, reviewing pull requests and sending notifications as defined in the prompt.

What good looks like

  • Routine appears as active in Claude Code with a daily schedule
  • PRs open longer than 12 hours are identified from the target repository
  • Merge check status is tracked in created PR threads
  • Slack notifications are posted only for PRs requiring human review

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

GitHub connector cannot read repository pull requests
Reauthorize the GitHub integration with repository read permissions
Slack notifications fail to send to the product channel
Verify the Slack bot is invited to the channel and has message posting permission
Agent marks blocked PRs as merge ready
Require validation against CI status checks and unresolved review comments before escalation

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready