Prompt template

Reusable prompt for ChatGPT, Claude, and Promptlight

Save this prompt in Promptlight if you need it more than once. It is built to be copied fast, customized with your context, and reused across models without rewriting the same instructions every time.

Prompt template

Remove AI Code Slop

AI code cleanup prompt for reviewing diffs and removing AI-generated artifacts like unnecessary comments, defensive noise, weak type casts, and style mismatches before merge.

code-review
refactoring
code-quality
ai-cleanup
developer-tools
prompt-engineering
diff-review

Best for

  • teams reviewing pull requests or code diffs
  • engineers cleaning up legacy or AI-assisted code
  • power users shaping better model behavior

Use this when

  • you want a second pass on quality, security, and maintainability
  • you are simplifying a messy code path without changing product behavior
  • you are redesigning a vague request into a stronger prompt

Expected outcome

  • Clear findings grouped by severity with concrete fixes
  • Cleaner code with less duplication and lower maintenance cost
  • A more explicit, higher-signal prompt with better structure
# Remove AI Code Slop

Remove AI Code Slop is a code review prompt for cleaning up diffs that feel machine-generated, over-defensive, or stylistically out of place. It is useful when a branch technically works, but the code still carries obvious AI artifacts that a strong human reviewer would want removed before merge.

## Best For

- Reviewing AI-assisted pull requests before merge
- Cleaning comments, defensive branches, and weak type escapes from a diff
- Tightening code so it matches existing file style and team conventions
- Running a final polish pass after a large AI-generated draft

## How To Use It

1. Give the assistant the current branch diff against `main`.
2. Ask it to edit only the suspicious or low-quality additions.
3. Keep the final report short so the output stays focused on code changes.
4. Pair it with tests or typechecks after the cleanup pass.

## What It Usually Removes

- Comments a human teammate would not write
- Defensive checks that do not fit trusted call paths
- `any` casts or similar escapes added only to silence errors
- Boilerplate try/catch wrappers that obscure the real logic
- Naming, structure, or formatting that clashes with surrounding code

## Prompt Template

Check the diff against main, and remove all AI generated slop introduced in this branch.

This includes:

- Extra comments that a human wouldn't add or is inconsistent with the rest of the file
- Extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted or validated codepaths)
- Casts to any to get around type issues
- Any other style that is inconsistent with the file

Report at the end with only a 1-3 sentence summary of what you changed

## Example Follow-Up

```text
Be aggressive about removing anything that feels generic, over-explained, or unlike the rest of this file. Preserve behavior, keep the diff small, and do not add new abstractions unless they clearly simplify the code.
```

## Limitations

- This prompt is best at cleanup, not deep redesign.
- It can miss subtle architectural issues if you only provide a narrow diff.
- Always run project checks after the cleanup pass because small removals can still affect behavior.

Customization tips

Turn this into a reusable workflow, not a one-off prompt

  • Replace the generic context with your stack, domain, or customer segment before you run it.
  • Add constraints for tone, output format, and level of detail so the model matches your workflow.
  • Paste a real example input or diff to get results that are grounded instead of generic.
Published December 3, 2025

Want to save this prompt for later?

Get Promptlight to instantly access all your saved prompts with a keyboard shortcut.

Try Promptlight UI live

Type, search, and enhance right here. It’s interactive.

Search mode

Find the right prompt in milliseconds.

Switch via Promptlight icon or ⇧ + Tab

  • Fuzzy search across titles and body text.
  • Favorites and file paths at a glance.
  • Keyboard-first: ↑↓ to navigate, ⏎ to copy.

A prompt library that fits how you already work

Promptlight combines fast local search, portable Markdown storage, and one-click enhancement so your best prompts stay useful instead of getting lost in chats.

Lightning-Fast Search

Fuzzy search through your prompts instantly. Find what you need in milliseconds with intelligent matching.

Enhancer Mode

Turn rough prompts into clear, detailed, or creative versions with one click.

Keyboard-First Workflow

Every action in Promptlight is keyboard-first. Launch with a shortcut, browse with a shortcut, copy with a shortcut.

Private & Secure Data

Your prompts are stored locally on your machine. No need to worry about your data being stored online. Your data is always private and secure.

Edit with Any App

Your prompts are plain markdown files. Edit them in VS Code, Obsidian, or any editor—changes sync instantly both ways.

Favorite Prompts

Mark your favorite prompts to pin them for quick access. No need to search for them every time.

Get Started Today

Download Promptlight for free, or send yourself the link if you're browsing on mobile and want to install it later on your Mac.

Download for macOS

Version 1.2.1 • 17.8 MB • macOS 10.13 (High Sierra) or later