Steve (Builder.io) thumbnail

Steve (Builder.io)

11 prompting tips for building UIs that don’t suck

11 Essential Tips for Using AI to Build and Edit User Interfaces Effectively

The rise of AI-powered tools like Fusion, Cursor, and Claude Code has transformed how developers and designers create user interfaces (UIs). However, success varies widely depending on how you interact with these tools. Whether you are vibe coding or working on complex projects, mastering a few key strategies can significantly improve your results. Here are 11 actionable tips to help you leverage AI for UI generation, prototyping, and editing more effectively.


1. Remember: AI Does Not See Your Screen Like You Do

AI models don’t have eyes—they don’t inherently know what the UI looks like when rendered. For example, AI might generate code for a dashboard but miss subtle alignment issues or padding inconsistencies. To overcome this, take a screenshot of your UI and provide it as input along with instructions like “Fix vertical alignment of avatars.” This allows AI to analyze the pixels and make precise adjustments that pure code prompts might miss.


2. Provide the Right Context for the AI

Give the AI a clear overview of your project structure, key components, and coding guidelines upfront. In tools like Fusion and Cursor, you can add custom instructions or files specifying your design system preferences, coding styles, and component usage. This ensures the AI sticks to your standards, prefers design system components over generic HTML, and adapts to legacy or newer code styles as needed.


3. Add Additional Repositories as Context

If your project depends on multiple repositories—for example, a frontend repo plus a backend API repo—add these as folders in your workspace. This lets the AI access all relevant code, documentation, and specs (like Swagger files) to generate cohesive, fully functional features that integrate seamlessly across your stack.


4. Pass Errors and Logs to AI for Faster Bug Fixing

When you encounter runtime errors or UI bugs, copy error messages, console logs, or network logs and submit them to the AI with a request to fix the issues. Tools like Fusion can capture this context automatically. This feedback loop helps AI understand what’s broken and how to resolve it, speeding up debugging substantially.


5. Run Multiple AI Agents in Parallel, But Keep Them Focused

You can have multiple AI sessions or “agents” working simultaneously—each tackling different parts of your codebase or different features. For example, open multiple tabs in Cursor or Fusion, each with a dedicated prompt. Avoid having two agents fix the same bug simultaneously, but parallelize work to brainstorm UI variants or explore alternative implementations efficiently.


6. Connect Your Design Tools for Better Fidelity

Instead of just pasting screenshots, integrate your design tools directly. Use Figma’s MCP (Model Component Plugin) or plugins like Build with.io to import Figma frames and design tokens into your coding environment. This enables bi-directional sync between code and design, so changes in Figma can update your codebase and vice versa—keeping styles, fonts, colors, and components consistent.


7. Use Visual Selection Tools to Narrow AI Focus

When making UI edits, visually select the specific area or component you want to modify before prompting the AI. For example, highlight the tab bar if you want to add a new tab. This precision helps the AI understand exactly where to apply changes, especially in complex screens with many elements.


8. Leverage MCP Servers for Deep Integrations

Many AI tools support MCP servers that connect directly to your project management, ticketing, documentation, or file storage systems (like Google Drive). This means the AI can automatically pull relevant tickets, specs, comments, or files when prompted, eliminating the need for you to copy-paste detailed context manually.


9. Prototype Within Your Actual Tech Stack and Design System

Avoid generic “off-the-shelf” prototypes that don’t use your brand’s design system or coding conventions. Instead, prototype directly within your real codebase using your design tokens, components, and tech stack. This makes it easier to transition prototypes into production code with minimal refactoring.


10. Prototype Directly in Your Main Codebase for Faster Iteration

Sometimes the best way to prototype is right inside your main repo. For example, add a new feature branch to experiment with a pinning feature or dashboard enhancement. Test it live with real users internally, gather feedback, and iterate quickly. This approach shortens the cycle from idea to production-ready code.


11. Share and Learn from the Community

AI-powered UI development is evolving rapidly. Share your tips, ask questions, and learn from others’ experiences. The author has compiled additional tips in a detailed blog post at builder.io/blog/prompting-tips and invites the community to contribute insights for future updates.


Final Thoughts

AI tools have incredible potential to accelerate UI development, prototyping, and design iteration. But to harness them fully, you need to provide the right context, use visual and design integrations, handle errors smartly, and prototype within your real tech stack. Following these 11 tips will help you avoid common pitfalls like generic code output or disconnected prototypes and instead produce clean, maintainable, and design-consistent UIs that can ship to production.

What are your best tips for using AI in UI development? Share your experiences and let’s keep improving together!


For more detailed guides and updates, visit the blog at builder.io/blog/prompting-tips.

← Back to Steve (Builder.io) Blog