Agent Playground
Recipe: PR reviewer
Checks out a pull request, lints and tests it, drafts review notes, and asks a person before posting them. What it does, when to use it, how to make it yours, and what a run costs.
Checks out a pull request, lints it, runs its tests, drafts review notes, and asks a person before anything is posted. If there's nothing to say, it finishes quietly.
| At a glance | Notes |
|---|---|
| Category | Coding |
| Shape | A branch, then a person |
| Plan | Free and up |
| Needs a Claude key | No |
| Limits it comes with | 1 loop, 900 seconds, $0.05 |
When to use it
- Every pull request should get the same first look: lint, tests, a short note on what to fix.
- You want an AI to draft reviews, but a person to decide what gets posted.
- A GitHub trigger should review every new pull request without anyone pressing Run.
Run it
- Open Agent Playground in the dashboard and find PR reviewer under Start from a recipe. In the builder, Recipes in the toolbar lists them too.
- Choose Use this recipe. It becomes a flow of your own, so changing it never changes the recipe.
- Choose Simulate to see the forecast, then Run.
- When the run waits for a person, approve or deny it from the banner, from Approvals, or from the approval email.
What you'll see: The lint finds an unused import, a bare except and a TODO. The tests pass. Write review notes turns that into a draft, Anything to say? answers Yes, and the run waits at Post review?. Approve and the review is saved; deny and the run ends at Not posted. In the recipe, nothing is sent to GitHub.
Make it yours
- Change Check out PR to fetch a real pull request:
git clone https://github.com/you/app repo && cd repo && git fetch origin pull/42/head && git checkout FETCH_HEAD. - Use your own linters in Lint, like
ruff check .ornpx eslint .. Keep the arrow to Run tests on Either way, so a failing lint still gets reviewed. - Replace Write review notes with an Ask AI step that writes the review from the lint and test output, using Insert… to add each step's output.
- Make Post review call your code host's API, with a token saved under Policies → Secrets. Your organization's rules hold outgoing web calls for a person anyway, until you allow them.
- Add a GitHub trigger for pull_request events so it runs on every new pull request. See Tutorial 6.
What a run costs
These are the builder's own forecast for the recipe as it comes, with its limits, rounded. Simulate shows the same numbers for your version, and they change as you change the flow.
| Notes | Typical | 1 in 10 runs | At most |
|---|---|---|---|
| Sandbox time | $0.0015 | $0.0023 | $0.01 |
| How long it takes | about 2 minutes | about 3 minutes | 900 seconds |
A typical run uses $0.0015 of sandbox time, so about 650 runs cost $1, and every plan includes $5 of usage a month. The time includes a person taking a minute or two to answer the approval. The clock, and the sandbox, keep running while the run waits. At most is the most a run could cost with these limits: it stops at $0.05 or 900 seconds, whichever comes first.