# Asking a developer to review AI-written code

URL: https://ekom.blog/asking-a-developer-to-review-ai-written-code/
Published: 2023-07-03
Author: Ekom
Topics: Build with AI

> How to ask a developer to review AI-written code: what to send, what to ask, what a review can and cannot catch, and how to be a good client.

You've built something with an AI chatbot. It runs. You're pleased. And now it's about to touch something that matters: a client's site, a customer list, a live shop. This is the moment to ask a developer to look at it.

But asking well is a skill. A message that says "can you check my code?" with a 2,000-line paste gets a polite delay. A well-prepared request can get a useful review in an hour. Here's how to make it easy for a developer to say yes.

## When a review is worth asking for

Not every script needs one. I'd ask for a review when the code:

- Handles personal data, payments or logins

- Changes or deletes data on a live site or database

- Will be used by other people, not just you

- Connects to external services with keys or tokens

- Is something a client depends on every day

- Does something you can't explain even after asking the AI to explain it

For a private script that tidies a text file on your own computer, a developer's time is probably better spent elsewhere.

## Step 1: tidy up before you send it

Respect the reviewer's time:

- Run it and make sure it works for the main case. Don't ask for a review of something that doesn't run.

- Remove secrets. Replace API keys, passwords and personal data with obvious placeholders such as YOUR_API_KEY_HERE. Never send real credentials by email or chat.

- Cut it down. If only three functions matter, say so. Send a short, focused piece.

- Remove dead code and old experiments, which cost a reader time.

## Step 2: write a short brief

Include:

- What it does, in two sentences.

- Where it runs (browser, server, WordPress, your laptop) and what it connects to.

- What data it touches, and how sensitive it is.

- What worries you. "I'm not sure the file upload is safe." "I don't understand this loop."

- How it was made. Say clearly it was written with AI help. This is not a confession. It tells the reviewer to look for typical AI issues: plausible but invented functions, missing validation, old methods.

- What kind of review you want: a quick sanity check, a security pass or a readability check.

- Your deadline and how long you expect it to take. Be realistic.

## Step 3: ask specific questions

Good questions get useful answers:

- Is there anything here that could expose or leak data?

- What happens if the input is empty, huge or malicious?

- Are there any functions here that are outdated or insecure?

- Would this be reasonable to maintain, or should it be structured differently?

- What would you test before putting it live?

Question 5 is worth gold. The reviewer's test list can become your own checklist.

## Step 4: give them a way to see it work

Offer a test copy or a staging site, a few fake sample files and the steps to run it. If a developer has to guess how to set it up, half the review time goes on that.

## Step 5: be a good client of the review

- Don't argue with every comment. If they say it's unsafe, ask for the reasoning and fix it.

- Ask for explanations in plain language. "Why does this matter?" is a fair question.

- Keep the result. Save the comments in your notes. They'll teach you faster than any tutorial.

- Give credit and pay fairly. If it's a colleague, say thanks properly. If it's a freelancer, agree the cost before you start.

## What a review can and can't do

A review can catch obvious security holes, unsafe handling of input, missing error handling, confusing structure and risky operations. It can suggest simpler ways to do things.

It can't prove the code has no bugs, and it won't cover problems that only appear with your real data, your hosting or your plugin mix unless the reviewer sees those too. Think of it as a second opinion, not a certificate.

## Using AI as a first reviewer

Before you bother a person, you can ask a second AI tool to review the first one's work: "Review this for security problems and bugs. List specific lines." It can catch the cheap mistakes, so the developer can spend their time on the hard ones. But don't use it as a replacement for a human on risky code.

I wrote about this idea in using two AI tools together, and about the habit of pairing with a chatbot in AI as a pair programmer.

## What if you don't know a developer?

Options include a developer friend or colleague, a freelancer for an hour or two, a local tech community, or the support forums for the platform you're using, where you can ask a specific, narrow question with a minimal example. Avoid pasting private code into public places.

## A sample message

Hi, could you review a small script for me? It's a Python script that reads my shop's orders export and creates a cleaned CSV. It runs on my laptop only and handles customer names and addresses (I've replaced them with fake data in the attached sample). It was written with ChatGPT's help. I'm mainly worried about how it handles odd characters and blank fields, and whether the file handling is safe. About 80 lines, attached. Even a quick look at those two things would help.

Short, specific, honest. That's the model.

## Key takeaways

- Ask for a review when risk is high, not for every script.

- Remove secrets, trim the code, write a short brief.

- Say it was AI-written and ask specific questions.

- Treat the review as a second opinion, and keep what you learn.

## Related reading

- AI-written code: five mistakes to check before you trust it

- Never put API keys in front-end code

- Building a QR code generator with AI

Who'd you ask, and what's the one part of your code you'd least like to explain to a client?

---

From Ekom (https://ekom.blog/). More: https://ekom.blog/llms.txt
