Hide a feature while i fix a bug: Free AI Prompt | SheCodes

Free AI prompt · The Optimize Book

Hide a feature while i fix a bug

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

The prompt

“Something's broken with my [feature name]. Add a feature flag so I can hide that feature from everyone immediately. Don't delete the code: just hide the feature from users until I flip the flag back on after the fix.”

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

The starter prompt

“Add a feature flag to my app called "new-dashboard". When it's ON, users see my new dashboard component. When it's OFF, they see the old one. For now, only show it to my own account (my email is [your@email.com]). Make it easy to flip on or off without redeploying: pick the simplest setup you can, no fancy services required.”

Show a feature to 10% of users

“I want to roll out my new search bar slowly. Add a feature flag that shows it to about 10% of users (random but consistent: the same user should always see the same version). Make it easy for me to bump that number up later.”

Launch something on a specific date

“I want to announce my new pricing on January 15th. Set up a feature flag that automatically turns on the new pricing page on that date. Until then, everyone sees the old pricing.”

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.”

Full code review

“Review my entire project for common beginner mistakes: missing error handling, values that should be configurable but are pasted in directly, leftover debug messages, unused bits of code, missing loading spinners, leftover test URLs that point to my computer, unoptimized images, and accessibility issues. Fix everything you find and explain what you changed in plain English.”