Detected country: US
logo
Sign InGet Early Access
GuideRecipesDeveloper
‌
‌
‌
logo

Powered by

  • Home
  • Playbook Recipes
  • Engineering Ops recipes
  • Recipe: AI code review on pull requests with Cursor

Recipe: AI code review on pull requests with Cursor

1min read

Share

TL;DR: When a pull request is opened, this playbook runs a Cursor-powered review of the diff, posts inline comments and a summary on the PR, and notifies the team in Slack. Trigger is a GitHub webhook; outputs are PR review comments and a Slack message.

Who this is for

Engineering teams that want a consistent first-pass review on every PR.

What you'll need

  • Connectors: GitHub, Cursor (first-party integration), Slack.
  • Secrets: GitHub token, Cursor API key, Slack token.
  • Trigger: Webhook on pull request opened/synchronized.

How to build it with Ask Ballet

  1. Open the Console on Home.
  2. Paste the prompt below; set repos and review focus.
  3. Review the plan and confirm.
  4. Connect GitHub, Cursor, and Slack, then add the PR webhook.
Build a playbook that triggers when a GitHub pull request is opened. Fetch the diff and
changed files, run a Cursor review focused on bugs, security, and missing tests, and
post a summary comment on the PR plus inline comments for specific issues. Add a label
"needs-changes" or "looks-good" based on the result, and post a short summary to
#code-reviews in Slack with the PR link and verdict.

What the playbook does

  1. Webhook trigger — receives the PR event.
  2. HTTP step (fetch diff) — gets the changed files and diff from GitHub.
  3. Code step (Cursor review) — runs the review and structures findings.
  4. HTTP step (comment + label) — posts PR comments and sets a label.
  5. HTTP step (Slack) — posts the verdict summary.

Variations and tips

  • Skip draft PRs and dependency-bump PRs with a filter in the trigger/Code step.
  • Keep the review advisory — require human approval before merge.
  • Route review findings that look like real bugs into Error triage.

Related articles

  • Error triage
  • How do first-party integrations (Cursor, Freshdesk) work?
  • How do I edit steps (Code and HTTP)?
  • What are Allow vs Ask permission modes?

Share