Diagnose a recurring error: Free AI Prompt | SheCodes

Free AI prompt · The Optimize Book

Diagnose a recurring error

A ready-to-use prompt from the chapter Error Monitoring. Paste it into Claude, ChatGPT, Lovable, Bolt or any AI coding tool.

The prompt

“My Sentry dashboard shows this error happening frequently: [paste error]. Help me find the root cause and fix it.”

How to use it

  1. Fill in the blanks with your own details, so the AI builds your project, not a generic one.
  2. Copy the prompt and paste it into your AI coding tool.
  3. Check the result in the preview, then ask for changes one at a time: "make the buttons bigger", "use my brand colours".
  4. Read the chapter to understand why it works and what to do next.

More prompts like this

All prompts

Add Sentry error monitoring

“Add Sentry error monitoring to my Next.js project. Set it up to capture both client-side and server-side errors. Include the Sentry configuration file and add the error boundary wrapper. Use my Sentry DSN from my environment variables.”

Add LogRocket session replay

“Add LogRocket to my Next.js project for session recording and error tracking. Initialize it in my root layout and configure it to record user sessions. Make sure it identifies logged-in users by their email.”

Set up basic error tracking

“Set up my project so that when something goes wrong it never shows a scary default error screen. Create a friendly 'Something went wrong' page for unexpected errors and a friendly 'Page not found' page for broken links. Both should match my site's design and invite the visitor to go back to the homepage.”

Pre-deploy checklist

“Review my project and tell me if it's ready to go live. Check for: any leftover test URLs that point to my computer instead of the real site, any missing API keys or settings, any large unoptimized images, any debug messages left behind, any missing error pages, and any missing SEO tags. List everything I need to fix before I publish.”

Improve my ai prompts

“I want to improve how I prompt AI coding tools. Review my project and suggest 5 specific things I could have described better in my prompts to get better results. Focus on: layout specifics, color choices, component behavior, responsive design, and edge cases.”