Reference Guide

    Clean Up Prompts

    Prompts to clean up dead code, audit your app for bugs and security gaps, and hand everything to Claude for a second opinion. Copy, paste, ship.

    Dead Code Cleanup

    Find and remove stuff your app isn't using.

    Find unused components

    This prompt asks Lovable to scan your project and list every component, page, or import that isn't actually being used anywhere. Dead code slows things down and makes your project confusing to work on.

    Scan my entire project and list every unused component, unused import, and unused file. For each one, tell me:
    
    1. The file path
    2. Why you think it's unused
    3. Whether it's safe to delete
    
    Don't delete anything yet — just give me the list.

    Remove unused routes

    If you've been building and rebuilding, you probably have routes (pages) that don't go anywhere or aren't linked from your navigation. This prompt finds them.

    Check my router and list every route that:
    
    1. Doesn't have a working page component
    2. Isn't linked from any navigation menu or button
    3. Leads to a page with no real content
    
    For each one, tell me if it's safe to remove.

    Clean up unused styles and variables

    Over time, your CSS and config files collect styles nobody uses. This prompt finds the clutter.

    Review my index.css, tailwind.config.ts, and any style-related files. List:
    
    1. CSS variables that aren't referenced anywhere
    2. Custom classes or animations that no component uses
    3. Any duplicate or conflicting style definitions
    
    Don't change anything yet — just list what can be cleaned up.

    Full App Audit

    Check your app for bugs, broken links, and security gaps.

    Complete app audit

    This is the big one. Use this in Plan mode so it doesn't burn credits building anything — it just reviews. Copy the response and take it to Claude (next section).

    Give me a full audit of this application. Check for:
    
    1. Broken links or dead routes
    2. Missing error handling (what happens when something fails?)
    3. Security issues (exposed keys, missing RLS policies, unprotected routes)
    4. Accessibility problems (missing alt text, poor contrast, no keyboard nav)
    5. Performance issues (unnecessary re-renders, large images, missing lazy loading)
    6. Mobile responsiveness issues
    7. Any TODO comments or placeholder content still in the code
    
    For each issue, tell me the file, what's wrong, and how to fix it. Be thorough.

    Check all links and navigation

    Makes sure every button, link, and navigation item actually goes somewhere real.

    Test every link, button, and navigation item in my app. For each one, tell me:
    
    1. Where it's supposed to go
    2. Whether it actually works
    3. If it opens in a new tab when it should (or doesn't when it should)
    
    Include links in the navbar, footer, any cards or CTAs, and any external links.

    Database and security check

    If your app has a backend, this checks that your data is properly protected and your security rules make sense.

    Review all my database tables and RLS (Row Level Security) policies. For each table, tell me:
    
    1. What RLS policies exist
    2. Whether they make sense for the use case
    3. Any gaps where data could be exposed to the wrong users
    4. Whether user_id columns are properly enforced
    
    Also check for any API calls that should require authentication but don't.

    Claude Handoff

    Take your audit to Claude and get a second opinion.

    Use the direct Claude connector (easier)

    Prefer not to copy-paste manually? Claude can connect directly to your Lovable project (via an MCP connector) and read/run audits, then make the fixes itself in the same conversation — ask Claude to connect to your Lovable project to get started.

    How to use this section

    Here's the workflow: run the Full App Audit prompt above in Lovable's Plan mode. Copy the entire response. Then paste it into Claude (or ChatGPT) along with one of these prompts below. Claude acts as your senior developer — it reviews the audit and tells you what to actually fix.

    Prioritize the fixes

    Claude will sort the audit results by priority so you know what to fix first and what can wait.

    Here's an audit of my web application. Please review it and:
    
    1. Sort every issue into three categories: CRITICAL (fix now), IMPORTANT (fix soon), and NICE TO HAVE (fix later)
    2. For each critical issue, give me the exact fix — what file to change and what to change
    3. For the important issues, give me a one-sentence summary of the fix
    4. Tell me if the audit missed anything obvious
    
    [PASTE YOUR LOVABLE AUDIT HERE]

    Generate the fix prompts

    This is the power move: Claude writes the exact prompts you need to paste back into Lovable to fix everything.

    Here's an audit of my web application. For every issue found, write me a specific Lovable prompt that I can paste directly into Lovable to fix it.
    
    Format each prompt like this:
    
    ISSUE: [what's wrong]
    FIX PROMPT: [the exact prompt to paste into Lovable]
    
    Make the prompts specific and actionable. Don't be vague — tell Lovable exactly what to change and where.
    
    [PASTE YOUR LOVABLE AUDIT HERE]

    Pro tip: Run these prompts in Lovable's Plan mode so you don't burn credits. Plan mode reviews your app without making changes.