← Back to library

Delegate a small API integration as a reviewed pull request

Pratik Patel gave Devin a three-line brief: build a backend route that obtains access tokens from a third-party service, put it in a named microservice, and reuse the existing CDK secrets handling. Devin laid out its plan before opening a pull request. Review caught a missing API key, style drift and misplaced logic; a few comment rounds resolved them.

  • OutcomeGet a new endpoint built from vendor docs while you review it like a colleague's PR instead of writing it yourself.
  • SetupUnder an hour
  • LevelIntermediate
  • CreditPratik Patel
View original
Works with
Custom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • You can describe the task in three lines with a docs link
  • Your team already reviews PRs carefully
  • You want to learn how an agent handles your codebase

Not for: Urgent fixes you could finish faster yourself; Security-sensitive code without an expert reviewer

What do you need, and what do you get?

You need

  • Link to the vendor's API documentation
  • Target service name
  • Where your existing secrets logic lives

You get

  • A plan before any code
  • A pull request with the new endpoint
  • Follow-up commits responding to review comments

How does it work, step by step?

  1. Write a tight briefName the docs, the target service and the existing pattern to reuse.
  2. Approve the plan firstRead the agent's outline and correct it before it writes code.
  3. Review like a colleagueLeave PR comments on missing auth, style and where shared logic should live.
  4. Iterate in the PRLet the agent push fixes and repeat until tests and style pass.
  5. Measure honestlyNote how long it took versus doing it yourself to decide what to delegate next time.

The prompt

Our own prompt, inspired by Pratik Patel and written to work in Custom agent. Values in lime are placeholders.

Prompt0 variables
Implement a backend endpoint that requests an access token from [third-party service] using the docs at [link]. Place it in the [service name] codebase. Reuse our existing secrets pattern in [path] to store the API key; never hard-code it. Keep the code that calls the vendor inside our shared client package. Before writing code, post a short plan for me to approve. Open a pull request with tests, follow our style guide, and address review comments in new commits.

Inspired by Pratik Patel: A Real-World Coding Story: Devin AI as My Co-Pilot. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • The first draft omitted the API key, the kind of detail a human would never skip.
  • For a fifteen-minute task, the author found the agent route took about an hour.

Our take

Pratik Patel's write-up is refreshingly honest about time. For a small task he knew well, the agent took longer than doing it himself, and that is useful data rather than a failure. The value appears when your attention is the scarce resource, for example when you can review three delegated pull requests while working on something harder. His brief is a good template: what to build, where it lives and which existing code to reuse, in three lines. Asking for a plan before code let him correct direction cheaply. The review findings show why the pull request is the safety net. A missing API key, drift from house style and logic in the wrong layer are exactly what a new team member might produce, and they were fixed through ordinary review comments. Treat agent pull requests the same way you treat a colleague's, with the same tests and checklist, and never merge because the summary sounds confident. Track a few tasks to learn which kinds are actually faster to delegate.

Where the time goes back: You trade typing for reviewing, which pays off when you are busy elsewhere or the task is unfamiliar.

FAQ

Was it faster?
Not for him: roughly an hour via the agent against an estimated fifteen minutes by hand.
Why do it then?
The review loop felt like mentoring a junior engineer, and he could stay hands-off while it worked.

Source and credit

Inspired by Pratik Patel. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
A Real-World Coding Story: Devin AI as My Co-Pilot
Creator
Pratik Patel
Published on
DEV Community (dev.to)
Original date
Feb 14, 2025
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Custom agent
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Operations & Admin

All 203 Operations & Admin playbooks →

Related playbooks

Operations & AdminWorkflow✓ AI dry run

Add a merge check for every way coding agents break code

Keep a running list of the specific ways coding agents have damaged your repository, from hollow tests and invented fake responses to deleted files and silenced type errors, and turn each one into an automated gate that blocks the merge, so the same mistake cannot slip through review twice.

Credit: u/alexmarquardt on r/ClaudeCode

An afternoon+
Operations & AdminWorkflow✓ AI dry run

Build a first web app as a non-coder, one model per job

Split a weekend app build across tools: an app agent for the scaffold, one model for requirements, another for fixes, and expert review before charging anyone.

Credit: u/mrcsvlk on r/replit

An afternoon+
Operations & AdminRoutine✓ AI dry run

Draft a weekly recap post from your GitHub activity

Start Monday with a ready draft of what you shipped last week, plus a stats page, instead of trying to remember.

Credit: Yash Kumar Saini

An afternoon+