Prompt Anti-Patterns — What NOT to Do
Learning From Mistakes
The fastest way to improve your prompting is to recognize what does not work. Every anti-pattern in this lesson is something developers do regularly, and every one of them wastes time in a predictable way. By identifying these patterns in your own prompting habits, you can eliminate the most common sources of frustration with AI tools.
Each anti-pattern follows the same structure: what it looks like, why it fails, and the fix.
Anti-Pattern 1: "Make It Better"
What it looks like:
Make this code better
Improve the performance
Clean this up
Why it fails: "Better" is subjective and context-dependent. Better for whom? By what metric? The AI has no way to know whether you want it to be faster, more readable, more maintainable, more secure, smaller, more testable, or more aligned with your team's conventions. It will pick one interpretation at random and produce output that may be worse by the criteria you actually care about.
The fix: Replace subjective adjectives with specific, measurable objectives.
Reduce the number of database queries in this function from 5 to 1 by using
a single JOIN query instead of sequential lookups.
Split this 150-line function into smaller functions of 30 lines or less,
each with a single responsibility. Keep the same public API.
Replace the nested if/else chain (lines 20-55) with early returns to reduce
the indentation level to a maximum of 2.
Anti-Pattern 2: "Follow Best Practices"
What it looks like:
Rewrite this following best practices
Make sure it follows industry standards
Why it fails: "Best practices" is one of the vaguest phrases in software development. React best practices are different from Express best practices. Google's best practices differ from Airbnb's. The "best practices" of 2020 may be anti-patterns in 2026. When you say "best practices," the AI uses its training data average, which may not match your project, your team, or your context.
The fix: Reference specific, concrete standards.
Rewrite this following our project conventions:
- Use async/await (no callbacks or .then chains)
- Error handling with AppError subclasses
- Zod for input validation
- Early returns instead of nested conditionals
- Follow the pattern in src/services/UserService.ts
If you want industry-standard patterns, name them specifically: "Use the Repository pattern," "Apply the Circuit Breaker pattern," "Follow the 12-factor app methodology for configuration."
Anti-Pattern 3: Micro-Prompting
What it looks like:
Add a name field to the User interface
(wait for response)
Now add an email field
(wait for response)
Now add a createdAt field
(wait for response)
Now make all fields required except bio
Why it fails: Each prompt is a round trip. Four tiny prompts that could have been one prompt take four times as long and consume four times the tokens. Worse, the AI might make slightly different choices in each round (different formatting, different import styles) because it is treating each as an independent task.
The fix: Batch related changes into a single, complete prompt.
Update the User interface in src/types/user.ts:
interface User {
id: string; // UUID, required
name: string; // required, 1-100 chars
email: string; // required, unique
bio?: string; // optional
avatarUrl?: string; // optional, valid URL
createdAt: Date; // required, set on creation
updatedAt: Date; // required, updated on every change
}
Export this interface and add JSDoc comments to each field.
One prompt, one response, all changes consistent.
Anti-Pattern 4: Over-Prompting
What it looks like:
A 10-paragraph prompt for a task that could be described in 2 sentences. Including the entire project history, irrelevant context, multiple disclaimers, and repetitive instructions.
I have been working on this project for 6 months and we originally used
MongoDB but then switched to PostgreSQL because of transaction support and
also we had a team meeting where we decided to use TypeScript instead of
JavaScript and the reason is type safety is important for our enterprise
clients who require ISO certification and by the way we also use Docker...
[8 more paragraphs of background]
...so basically just add a createdAt field to the User model.
Why it fails: The signal-to-noise ratio is terrible. The AI has to extract the actual task from paragraphs of irrelevant context. Worse, some of the irrelevant context may accidentally influence the output in ways you did not intend. The AI might fixate on the MongoDB mention and produce a solution that accounts for a migration that already happened.
The fix: Include only the context that directly affects the current task.
Add a createdAt field to the User model in prisma/schema.prisma.
Type: DateTime, default to now(). Generate the migration.
If context is necessary, put it in the order of relevance: task first, then relevant constraints, then background only if it affects the decision.
Anti-Pattern 5: Contradictory Constraints
What it looks like:
Make it fast and thoroughly documented and minimal and comprehensive and
simple but handle every edge case.
Write a concise implementation that covers all possible scenarios with
extensive error messages but keep the code short.
Why it fails: These constraints pull in opposite directions. Code cannot be both minimal and comprehensive. Error handling cannot be both extensive and concise. The AI tries to satisfy all constraints simultaneously and produces a compromise that satisfies none of them well.
The fix: Prioritize your constraints. State which ones matter most and accept the tradeoffs.
Priority: correctness and edge case handling. This is payment processing code.
Secondary: readability and maintainability.
Acceptable tradeoffs: The code can be longer if it is more explicit. Verbose
error messages are better than terse ones for this use case.
If you truly need competing qualities, split the task: generate a fast implementation first, then add documentation as a separate step.
Anti-Pattern 6: Assuming Context
What it looks like:
Fix the issue with the date formatting
Update it to use the new approach
The thing I mentioned earlier needs to handle that edge case
Why it fails: The AI does not know what you were thinking before you wrote the prompt. Even in a conversation where you discussed date formatting earlier, the AI may have lost that context due to context window limits, or the conversation may have shifted topics. Pronouns like "it," "the thing," and "that" are ambiguous without explicit references.
The fix: Always be explicit, even if it feels redundant.
Fix the date formatting in src/utils/formatDate.ts: the function returns
"3/26/2026" but should return "March 26, 2026" (long format with full
month name).
Update the UserService.createUser() method to use Zod validation instead
of the manual if/else checks on lines 15-30.
Even in long conversations, re-state the key context. It costs you 10 seconds of typing and saves minutes of back-and-forth clarification.
Anti-Pattern 7: Chaining Without Verification
What it looks like:
Step 1: Create the database schema
Step 2: Create the service layer
Step 3: Create the API routes
Step 4: Create the frontend components
Step 5: Write all the tests
(Sending all steps at once without reviewing intermediate results)
Why it fails: If Step 1 has a schema error, every subsequent step builds on that error. By Step 5, you have a complete system built on a flawed foundation. Finding and fixing the original error requires reworking everything.
The fix: Execute one step at a time. Review the output. Verify correctness. Then proceed to the next step.
Step 1: Create the database schema for the notifications feature. Here are
the requirements: [requirements]. I will review this before we move to Step 2.
After reviewing Step 1:
Schema looks good. One change: add an index on (userId, createdAt) for the
notification list query. Then proceed to Step 2: the service layer.
The overhead of reviewing each step is minimal compared to the cost of rebuilding from a flawed foundation.
Anti-Pattern 8: Copy-Pasting Without Adapting
What it looks like: Copying a prompt from a "prompt library" or another project and using it without modifying it for the current context.
[Copied from a generic prompt template]
You are an expert software engineer. Please write clean, maintainable,
well-documented code following SOLID principles and design patterns.
Use dependency injection and follow the repository pattern.
Write comprehensive unit tests with 90% code coverage.
Why it fails: Generic prompts produce generic code. This prompt tells the AI nothing about your project, your stack, your patterns, or your specific task. It is the prompt equivalent of telling a contractor "build me a good building" without providing blueprints, location, or budget.
The fix: Start with templates but adapt them to your specific context every time.
In our Express + Prisma + TypeScript project, create an OrderRepository
in src/repositories/OrderRepository.ts.
Methods needed: findById, findByCustomer (with cursor pagination), create,
updateStatus.
Follow the same pattern as UserRepository in src/repositories/UserRepository.ts.
Include Zod input validation for the create and updateStatus methods.
Write tests in src/repositories/__tests__/OrderRepository.test.ts matching
the UserRepository test patterns.
This prompt uses the same concepts (repository pattern, tests) but grounds them in your specific project.
Self-Diagnosis: Recognizing Anti-Patterns in Your Own Prompts
Here is a quick checklist to run before sending any prompt to an AI tool:
-
Does my prompt contain subjective adjectives? (better, cleaner, improved, optimized) -- Replace them with specific criteria.
-
Am I using pronouns without clear antecedents? (it, this, that, the thing) -- Replace them with explicit references.
-
Does my prompt have competing constraints? -- Prioritize them or split the task.
-
Is there context in my head that is not in the prompt? -- Add it.
-
Could this be a single prompt instead of multiple round trips? -- Batch it.
-
Am I sending too much irrelevant context? -- Trim to what affects the task.
-
Am I building on unverified output from a previous step? -- Verify first.
-
Did I copy this prompt from somewhere without adapting it? -- Customize it for your project.
Running this checklist takes 15 seconds and consistently prevents the most common sources of wasted AI interactions. Over time, these checks become automatic, and your first-try prompt quality increases dramatically.