Best practices
Prompt effectively
Tips for writing better prompts
Automatically improve your prompt
Bolt has a built-in feature to help you create better prompts:
- Write your prompt in the prompt box.
- Click Enhance prompt
. Bolt generates a recommended prompt, which you can then edit.
Prompting tips
For more detail, a Bolt user has written a great Guide to Bolt.new Prompting.
Some quick tips:
- Start with the application architecture, including your choice of tools, frameworks, and so on.
- Add individual components and features, one by one.
- Add in details in each component with small, specific prompts.
- Be explicit about what should and shouldn’t change. You can tell Bolt to change or not change specific files. When possible, refer to specific elements, classes, or functions to guide Bolt to the exact place where you want the changes made.
Customize the system message
The system message is an additional message sent to the AI model, telling it how to behave, and providing additional context. You can configure the system message in Bolt. This is useful if you always want the AI to behave a certain way.
- Open your project in StackBlitz:
- Log in to StackBlitz.
- Go to Collections > Bolt collection.
- Click the project you want to open.
- Open the
.bolt/prompt
file, or create the.bolt
directory then theprompt
file if they don’t exist. - Write your system message in plain text.
Here is an example, from Bolt’s Vite React starter project: