What Is AI Slop
AI slop is AI output that is low quality and obviously machine-generated. It applies to everything — code, images, articles, content in general.
In coding, it means code that technically works but is bloated, fragile, and hard to maintain. You’ve seen it. The agent adds three packages where none were needed, duplicates logic that already exists, and ignores the architecture of the project.
AI slop is mostly a problem on larger projects. A static website with 10 pages won’t suffer much from it. But on big SaaS products or complex software projects, unchecked AI slop compounds fast and becomes real technical debt.
Why It Matters
AI slop creates technical debt. It looks functional on the surface but makes your project harder to maintain and scale over time.
Preventing it requires precise specs, tight reviews, and human oversight. You can’t just prompt and ship. The agent needs guardrails, and you need to verify the output.
What AI Slop Looks Like
Slop implementation: Adds unnecessary packages. Duplicates logic. Hardcodes values. Ignores the existing architecture. Leaves behind messy, fragile code that becomes harder to maintain over time.
Clean implementation: Understands the existing system first. Reuses current patterns and infrastructure. Keeps the solution minimal and modular. Considers performance and edge cases. The feature feels native to the codebase and stays easy to extend later.
How to Prevent It
Set Up an AGENTS.md
Most AI coding tools support an instruction file — AGENTS.md, CLAUDE.md, or similar. This file gets loaded into every conversation with the agent. Use it to correct recurring mistakes.
Keep it short. Only include things the agent keeps getting wrong. Here’s what mine looks like:
# Project: Website for Tobias Glöckler
This should be the website for the Freelancer and Person Tobias Glöckler
## Techstack
- Framework: Astro
- Package Manager: bun
- CSS: Tailwind v4
That’s it. If you write hundreds of lines with deployment steps, environment setup, and every last convention — you’re wasting tokens and polluting the context window. The agent doesn’t need to know how to deploy when it’s adding a feature.
There’s also research backing this up. The paper “Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?” explores how effective these files actually are.
Plan Before You Build
Don’t let the agent just start coding. Talk about the approach first. Tell it what patterns already exist and what can be reused.
You don’t need formal Plan mode for every change. For small tasks, just ask. For larger features, be explicit:
I would like to implement a darkmode version of my website.
I need a toggle to change it manually but also need the browser
to check the users preference and auto switch.
How can we implement this and keep it minimal and maintainable?
Let's think about different ways we can do that and pick the best one.
Please write a plan.
This one prompt saves you from an over-engineered mess.
Refactor After Implementation
This is one of the biggest levers against AI slop. After a feature works, ask:
Look at the implementation of above feature.
Do you recommend to do any refactors?
In most cases it finds things. Sometimes the feature didn’t fully work and it catches the bug. Sometimes it notices two functions doing the same thing and consolidates them. Sometimes it cleans up naming or simplifies logic.
Don’t skip this step.
Test It Yourself
Don’t trust the agent blindly. It will tell you it fixed something when it didn’t. Did you ask it to remove the gap between the heading and the text? It will say yes. Then you look and the gap is still there.
Test the functionality. Test edge cases. Verify visually.
For UI work specifically, instruct the agent to use Playwright to take screenshots and verify the changes. Automated visual checks catch things you might miss on a quick glance.
Use Code Review Tools
Run a code reviewer on your changes before merging. Tools like Coderabbit, Greptile, or Macroscope catch code quality issues that slip through manual review.
They often flag things like unused imports, inconsistent patterns, or missed error handling. Worth adding to your workflow.
Use the Best Available Model
The model you use sets the baseline for output quality. Older or cheaper models produce more slop.
Use the cutting-edge coding models. Right now that’s GPT 5.5. Tomorrow it will be something else. Check the benchmarks and use what’s best.