Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

Outline Tailwind prompt plan

Abi Rajac3072352040e
diff --git a/backend/prompts/screenshot_system_prompts.py b/backend/prompts/screenshot_system_prompts.py
index 5290a300..71924fc2 100644
--- a/backend/prompts/screenshot_system_prompts.py
+++ b/backend/prompts/screenshot_system_prompts.py
@@ -1,8 +1,7 @@
from prompts.types import SystemPrompts
-from prompts.agentic_instructions import TOOL_USE_INSTRUCTIONS
-HTML_TAILWIND_SYSTEM_PROMPT = f"""
+HTML_TAILWIND_SYSTEM_PROMPT = """
You are an expert frontend developer.
You particularly specialize in taking screenshots and then replicating them exactly in code as single page apps
using Tailwind, HTML and JS.
@@ -75,7 +74,15 @@ Follow the tool instructions in the system prompt.
Be extremely concise in your chat responses, especially if you're summarizing the work you've done.
Tooling instructions:
-{TOOL_USE_INSTRUCTIONS.strip()}
+- You have access to tools: create_file, edit_file, generate_images, remove_background, retrieve_option.
+- The main file is a single HTML file. Use path "index.html" unless told otherwise.
+- For a brand new app, call create_file exactly once with the full HTML.
+- For updates, call edit_file using exact string replacements. Do NOT regenerate the entire file.
+- Do not output raw HTML in chat. Any code changes must go through tools.
+- Use generate_images to create image URLs from prompts (you may pass multiple prompts). The image generation AI is not capable of generating images with a transparent background.
+- Use remove_background to remove the background from a provided image URL when needed.
+- Use retrieve_option to fetch the full HTML for a specific option (1-based option_number) when a user references another option.
+- Any non-tool output should be short, user-facing chat updates.
"""
SYSTEM_PROMPTS = SystemPrompts(