Blog

How to check AI-generated code if you can’t read code: 7 checks for non-programmers in 2026

Markdown

AI wrote the code, but you don’t know how to read it? A ready-to-use checklist of 7 checks and prompts to catch broken code and security holes before publication.

Read full article

Key takeaways

AI writes code for you in minutes, but checking it is now your job. Below are 7 checks that catch broken code, security holes, and AI fabrications before you show your project to anyone. You don’t need to read code.

AI put together a website or bot for you in an evening. Everything opens, the buttons work, and it seems to run. You show the project to people—and a day later, you find out that the payment form charges money, but the orders never come through. Or that the database with customers’ phone numbers is open to the entire internet.

I used to ship my first projects that way too: things that seemed to work would spring surprises on real users. Now, before I show anything to people, I run the project through the same checklist. I don’t read a single line of code while doing it—I didn’t come here for that, and you probably didn’t either.

And this isn’t paranoia. Anthropic analyzed 400,000 Claude Code sessions: over seven months, the share of work spent fixing broken code fell from 33% to 19%. It fell—but it didn’t disappear. Every fifth session is still about “fix what the AI broke.”

Writing code itself is no longer the bottleneck. What matters now is how well you understand the task and how well you can check the result.

Additional materials on setting up tools are available in the Ailoot documentation.

Why Check AI-Generated Code If It Already Works?

Key takeaways

“Works” and “works correctly” are different things. AI optimizes for getting code to run and look finished, not for making it secure, inexpensive, and do exactly what you wanted. Checking it is your protection against a surprise that shows up with real users.

AI writes code that passes a first glance. It runs, the screen renders, and the demo looks convincing. But launching it tells you nothing about whether money is being calculated correctly, whether your database is exposed to the outside, or whether everything will crash when the hundredth user arrives.

The numbers back this up. The FrontierCode benchmark checked in June 2026 how ready AI-generated code was for real work without modifications. Even for the best models on the hardest tasks, the share was about 13%. In other words, on serious tasks, most AI-generated code has to be refined by hand before you can rely on it.

The good news is that anyone can do the checking. Here’s what Anthropic concluded from those same 400,000 sessions:

Success is determined by how well a person understands the task they are solving, not by whether they know how to program.

— Anthropic, https://www.anthropic.com/research/claude-code-expertise

Your advantage over any programmer you bring in is that you understand your task. Checking is about understanding, too; you don’t need to read code to do it. The checks below are exactly the kind you can do yourself, without any fuss.

What Can Actually Go Wrong With AI-Generated Code?

Key takeaways

Five types of problems: the code doesn’t work; it works, but not the way you wanted; security holes; it’s expensive or slow; the AI made something up. Each of the seven checks below addresses one or more of these risks. It helps to know these five types before you start checking: that way, you know what you’re looking for at each step.

Before checking, it helps to know what you’re looking for. AI-generated code has five typical problems, and you can see all five without reading code—by watching how the project behaves.

What’s wrongWhat it looks like to you
Doesn’t workA button won’t click, the page is blank, “error 500”
Works incorrectlyPayment goes through, but no order is created; the email goes to the wrong person
Security holeA secret key is visible in the code; the database is open; the form can be broken with input
Expensive or slowThe site takes 10 seconds to load; you get an AI API bill at the end of the month
AI made something upIt references a tool that doesn’t exist; it used test data instead of real data

Next are seven checks, in order. The first catch “doesn’t work” and “works incorrectly”; the middle ones cover security and fabrications; the last ones are safeguards before publishing. It’s best to go through them in sequence: each one builds on the previous check being complete.

Check 1: Ask the AI to Explain Its Code in Plain Language

Key takeaways

The first thing I do is ask the AI to recap what it did in ordinary words, without code. If the recap doesn’t match what you asked for, the code is already wrong, even if it runs. This checks whether the AI understood the task the same way you did.

You described the task in words. The AI translated it into code. Meaning can get lost between those two steps: the AI may have understood you differently, filled in things on your behalf, or cut corners. You can catch the mismatch without reading code—just ask it to describe what it did in plain language.

Prompt

Ask the AI to explain what it did

Explain in plain language, without code, exactly what you just did:

what task this code solves

what will happen when a user clicks the button or submits the form

where the data is stored and who has access to it

what could break and in what situation

Write as if you were explaining it to someone who has never programmed. If there is any part you’re not sure is correct, say so plainly.

Read the answer and compare it with what you had in mind. If it matches, move on. If the AI “waffles,” gets confused in its own explanation, or describes something other than what you asked for, it means it doesn’t fully understand what it built. Send it back for revision with a clarification instead of taking its word for it.

By the way, if the AI regularly does something other than what you asked, the issue is often how the task was framed, not the model itself. I have a separate breakdown on why Claude doesn’t do what you asked.

Checking the AI’s output is part of context engineering: you control both what you give the AI as input and how you evaluate the result as output.

Check 2: Walk Through the Scenarios as a Real User Would

Key takeaways

Open the project and do what a user would do: register, pay, submit a form. Then deliberately break things—enter nonsense, click twice, leave fields blank. Half of the problems show up right here, without a single line of code. Go through payment separately and carefully: was the order created when the money was charged?

An AI demo always follows the happy path: correct data, one click, everything works out. A real user doesn’t behave that way. They make mistakes, click the wrong thing, or enter an emoji in the phone field. Your job is to go through the project as they would.

  1. Complete the main scenario from start to finish

    Do what the project exists for: register, place an order, submit a request. Go all the way to the end, not just halfway.

  2. Check payment separately and for real

    If the project accepts money, make a payment yourself for the minimum amount in test mode. Make sure the order is created, the status changes, and an email goes to you and the customer. A payment that “goes through” but doesn’t create an order is a classic silent failure.

  3. Deliberately break things

    Leave fields blank. Enter letters where numbers are expected. Click “Submit” twice in a row. Upload a file in the wrong format. A good project will politely say “you can’t do that”; a bad one will crash or silently swallow the data.

  4. Open it on a phone

    Half your people will come from a phone. Check that the layout hasn’t fallen apart and the same buttons work there.

Give the AI everything you found in one list: “Here’s what broke in these steps; fix it and explain why it happened.” Don’t handle one problem at a time—give it the list, so the AI can see the whole picture and is less likely to break one thing while fixing another.

Check 3: Ask the AI About Security—Here’s a Prompt

Key takeaways

Security is what a non-programmer can’t see with their eyes, but what hits hardest: leaked keys, an exposed database, a form that lets people get inside. You don’t need to search for these yourself—make the AI run an audit and explain each finding in plain language. Below is a ready-made prompt that checks the project for the five most common holes.

A broken button is immediately obvious. A security hole isn’t: the project keeps working as if nothing is wrong until someone takes advantage of it. The most common problems in vibe-coded projects are secret keys written directly in the code, a database exposed to the internet, and forms that let someone submit malicious input. The AI can find all this if you ask directly.

Prompt

Check my project for security holes

Audit this project for security issues and explain each finding in plain language, without jargon. Go through this list:

Check whether any secret keys, passwords, or tokens are written directly in the code. Private secrets must be used only on the server, with local secret configuration such as .env excluded from git. A .env file and .gitignore do not prevent frontend/public variables from being included in a browser build. Inspect the actual JavaScript, source maps, HTML, and network responses delivered to the client, and verify that private keys are absent.

Check whether the database is exposed to the internet and who has access to it.

Check whether input can break the forms: injections into database queries or extra code in text fields.

What will happen if a user submits malicious data?

Check whether any internal pages or the admin panel are exposed without a password.

For each item, say whether there is a problem, give a clear example of the risk, and explain how to fix it. Start with the most dangerous issue.

Also check that your project doesn’t blindly do whatever it receives from outside. This is called indirect prompt injection: a command is hidden in an email, comment, or someone else’s file, and your AI agent follows it, mistaking it for a task. If the project reads external data and acts on it, ask the AI what would happen if that data contained a hidden instruction.

This is a deep topic, and one prompt can’t cover it completely. If the project handles money or customers’ personal data, read the separate guide on vibe-coding security.

Check 4: Did the AI Make Up Libraries or Data?

Key takeaways

The AI sometimes refers to nonexistent tools and leaves test data in place of real data. It looks convincing and breaks later. A direct question to the AI plus one run of the project catches this in a minute. The same question also protects you from someone else’s code that attackers disguise using made-up library names.

The AI confidently writes things that don’t exist. It may add a library with a plausible name that doesn’t actually exist. It may leave test placeholders in the project: a product called “Example,” the email address example@example.com, or filler text instead of real content. It’s easy to miss in a demo, but for a real user it’s embarrassing or broken.

You can catch this in two steps. First, ask directly:

Prompt

Check yourself for fabrications

Go through the project and check honestly:

Do all the external tools and libraries you added really exist and install correctly? Did you make anything up?

Are any test placeholders, examples, or filler text still there instead of real data?

Are all the links, addresses, and contact details in the project real, rather than placeholders?

List what you found and suggest what to replace it with.

Second, simply run the project and look through it. A made-up library almost always causes an error at launch. And placeholders are easy to spot: if the page says “Product 1,” you haven’t replaced them.

Made-up libraries pose a separate danger because attackers deliberately register tools with the names AI likes to invent. Install one, and someone else’s code gets into your project. That’s why you should take the question “is this library even real?” seriously—it’s directly about your project’s security.

Check 5: Have a Second Model Check the First

Key takeaways

The same AI that wrote the code is a poor checker: it tends to agree with itself. Give the project to another model to review, or at least a new session—the fresh perspective catches what the first one missed. It’s the same kind of second opinion you’d ask for from another doctor before an operation.

AI has an unpleasant trait: it agrees. Ask “is everything okay here?” and it will confirm that everything is okay because it adapts to the answer it expects. This is called AI sycophancy, and I wrote about it separately. A conversation partner like that will be soft on its own work.

The solution is simple: get a second opinion. Open a new session or use another model and give it the project to check with the same prompt from Check 3, with one addition: “another AI wrote this code; find its weak points.” A fresh model isn’t tied to the previous conversation and is more likely to point out problems.

  1. Open a clean session or use another model

    Use a second model, or the same one in a new window with no task history.

  2. Give it the project and the right framing

    Say plainly: “another AI wrote this code; your job is to find errors and risks, not praise it.” That curbs sycophancy.

  3. Compare the two opinions

    If both agree, they’re probably right. If they disagree, investigate that point—that’s where things get interesting.

This is exactly what’s happening in the industry now: AI writes, AI checks, and the final decision remains with a person. You can’t hand it over to the model—that’s your job.

Check 6: How Can You Roll Back If an Edit Breaks Something?

Key takeaways

Before any edit, save a working version in git. Then, if the next check breaks something, you can go back with one command instead of rebuilding the project. It’s a safeguard that takes ten seconds. You don’t need to read code to do this—it all works through two simple requests to the AI.

The checks on this list often lead to edits, and edits sometimes break what was working. To keep that from turning into a disaster, save the working version in git before each round of fixes. It’s like saving a game: if you break something, load the last save point.

You don’t need to read code for this. Just ask the AI: “save the current working version in git with a clear label before changing anything.” And if everything goes sideways after the edits: “restore the project to the previously saved version.”

If git is still unfamiliar territory, I have two guides for you: how to roll back changes in Claude Code and what to do if AI deleted your database. The second one is for when it’s already too late to roll back, but you can still recover.

Check 7: What Should You Check Last Before Publishing?

Key takeaways

Final run before publishing: payment is switched from test mode to live mode, private secrets stay on the server and out of client-delivered files, the data has a backup, and publishing and the domain work. Go through the short list, then launch. This is where people most often lose their first payments: the project works, but they forgot one setting.

The first six checks are about what the code does. The seventh is about whether the project is ready to meet people. This is where people most often stumble: the project works, but they forgot to switch payment from the test key to the live one, so the first customers pay “for pretend.”

  1. Payment: test to live

    If you accept payments, make sure the payment system’s live key is connected, not the test key. Make one real payment for the minimum amount and refund it to yourself.

  2. Secrets are where they belong

    Ask the AI: “Are private keys used only on the server, with .env excluded from git? Does the actual browser build or any client response contain a private key, including through frontend/public variables or source maps?” Check the built files and browser network responses, not only the source .env file. Git exclusion does not keep a value out of a frontend bundle.

  3. Back up the data

    Make sure the database is being saved automatically somewhere. If your project runs on your own server, I explain what to do about publishing in the Coolify guide.

  4. Publishing works beyond your own device

    Open the project on your phone using an external link, not just on your own computer. Something that works locally doesn’t always work after publishing.

Go through all four, and you can show the project to people with peace of mind. If something doesn’t check out, it’s better to spend half an hour now than deal with unhappy customers later.

What If Checking Takes Too Long—Should You Just Trust the AI?

Key takeaways

The temptation is strong: AI is smart, so why double-check? But trusting without checking is like signing a contract without reading it. Checking takes minutes, while a broken project affecting real people costs you reputation and money. And this is a skill that quickly becomes a habit. You’re still responsible for the result, and you can’t hand that responsibility to the model.

I understand the temptation. Checking feels boring and “not what I got AI for.” But you, not the model, are responsible for the result. AI has no reputation and faces no consequences: it produced the code and forgot about it. You’ll be the one answering to a customer whose payment didn’t go through.

Writing code stopped being the bottleneck—AI took care of it. Now value lies elsewhere: understanding the task and checking what came out. That’s your strength—you know better than any outside developer what the result should be for your customer.

Why Is Checking a Skill, Not a One-Time Task?

Key takeaways

Running through the checklist once is useful. But the real difference appears when checking becomes part of how you work with AI: the right context going in, the habit of checking the result coming out. Then AI stops being a roulette wheel and becomes a tool. And every project you build after that comes together faster than the last.

These seven checks are the minimum that separates “I launched it and hope” from “I launched it and know it works.” Run through them once, and you’ll already catch most surprises before your customers do.

From there, it becomes a habit. Give the AI the right context as input and check the result as output, and each new project comes together faster because you’re not starting from scratch.

Find additional materials on working with tools in the Ailoot documentation.

More details

Questions about How to check AI-generated code if you can’t read code: 7 checks for non-programmers in 2026

Is putting an API key in .env enough to keep it secret?

No. Private keys must be used only on the server. A .env file and .gitignore help with repository hygiene, but frontend/public variables can be copied into the browser bundle; inspect the actual files and responses delivered to the client.

What proves that a payment flow works beyond a convincing demo?

Complete the intended user scenario and verify the order, status, receipt or email, and stored result after payment. Test empty input, duplicate submissions, and failure handling too; a successful charge alone does not prove the order was created correctly.

All articles