Build a pull request reviewer agent as code: it sizes every PR as trivial, moderate or large, approves only safe small changes and asks a person to review the rest, with instructions and tools you version like the rest of your repo: AI agent prompt

Teams that want an AI reviewer usually end up with a prompt in a dashboard that nobody can test or review. In late October 2026 Cursor released Agent SDK, which defines an agent as a project folder: an instructions.md file for its behavior, a tools folder of TypeScript actions, and built-in evals, deployable to Cursor-managed hosting or your own infrastructure; Cursor says it uses the same harness that powers Bugbot and Security Review. Its quickstart builds a PR reviewer that calls an inspect tool, rates each pull request trivial, moderate or large by lines and files changed, approves only safe changes, never approves drafts and requests a human review for anything large. The prompt below plans the same reviewer for your repository with any coding agent, before anything is allowed to post reviews.

CodingAgents as codeadvanced

The prompt

Help me build a pull request reviewer agent defined as code in my repository. Repo: [what it is, language, CI setup, who reviews today]. Our rules: [files or folders that always need a human (e.g. payments, auth, migrations), max size for auto-approval, labels we use]. 1) Write the reviewer's instructions file in plain Markdown: always inspect the PR first, rate it trivial / moderate / large by lines and files changed (suggest thresholds for our repo), approve only trivial changes that match the title and touch no sensitive paths, never approve drafts or PRs by the bot's own account, and otherwise comment asking for a human review that names the riskiest files. 2) Design two tools: one that fetches the PR title, files and capped patches, and one that posts the verdict, with input fields and failure handling. 3) Write 8 test cases (eval PRs) including tricky ones: a tiny change to an auth file, a large docs-only PR, a PR whose title doesn't match the diff. 4) Give me a rollout plan: run in comment-only mode for two weeks, compare its verdicts with human reviewers, then decide on approvals. Ask me before any step that posts on GitHub or deploys, and keep secrets out of the repo.
Open in ChatGPT Open in Claude Perplexity Download as agent skill (SKILL.md)

Fill in the blanks, then copy

This prompt has 1 [bracket] to fill in. Type your details below and the prompt updates as you go. Your answers stay in this browser and are reused on other prompts with the same blanks. Nothing is sent to us.

How to use it

  1. Copy the prompt above.
  2. Replace every [bracket] with your own details (use the fill-in-the-blanks box above, which remembers your answers for the next prompt).
  3. Paste it into Cursor Agent SDK, Cursor, GitHub and review the answer before you use it.

Works with: Cursor Agent SDK, Cursor, GitHub, TypeScript, Claude Code

Real-world example: cursor.com/docs/agent-sdk/quickstart

Before you use it: what to check

Already built into this prompt

Check yourself

Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.

Share:Post on XLinkedInFacebookRedditWhatsApp
</> Embed this prompt on your site

Paste this HTML into your blog or website. It's a plain card with no tracking scripts that links back to this prompt.

Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.

Get the free Solo Founder Stack pack

32 copy-paste agent prompts (PDF) plus 5 new prompts every week.

Get it free

More Coding prompts

Ship a small feature as a PRFeatures · intermediateBuild a simple internal toolNo-code apps · beginnerAutomation script for a boring taskScripts · beginnerCommit & PR assistantGit workflow · intermediateFix a failed pipelineCI fixes · intermediateCheckpointed long task setupLong-running tasks · intermediate

See all Coding prompts →