Skip to content
Prompting

Advanced Prompting

Once you've built a few apps, you'll want more control over the result. The techniques here help you steer bigger or more complex builds with precision, picking up where Writing Effective Prompts leaves off.

The agent fills any gap you leave with a reasonable guess. On a precise build, you want fewer guesses, so describe the shape of things before the agent has to assume them.

  • Structure: Say how the app is laid out: a sidebar with a detail pane, a single window with tabs, a grid of cards.
  • Data: Describe what the app works with and its fields. "A list of tasks, each with a title, a due date, and a done flag" beats "a task list".
  • Edge cases: Name the awkward states up front: what an empty list looks like, what happens on a long title, how errors are shown.

Calling out edge cases early saves a round of follow-ups later, since the agent handles them in the first build instead of after you spot them.

Style is easier to show than to describe. To steer the look, give the agent something to anchor on:

  • Name a feeling or reference: "Clean and minimal like a native macOS settings pane" or "playful, rounded, colorful" gives more direction than leaving it open.
  • Point at an existing app of yours: If you've already built an app with Glaze using the look you like, ask the agent to match its style.
  • Attach an image: Drop in a screenshot or mockup of the layout or styling you're after, and describe what to take from it.

Be specific about what to borrow from a reference. "Match the spacing and card style, but use my own colors" is clearer than "make it look like this", which leaves the agent guessing how literally to copy.

For an ambitious app, don't try to land everything in one prompt. Guide the build in stages so each part is something you can check before moving on.

  1. Plan the approach first: For a large or risky build, turn on Plan mode and agree on the approach before any code is written. This is where you catch a wrong assumption cheaply.
  2. Build the foundation: Get the core structure and main screen working first, before any extras.
  3. Layer on behavior: Add actions, state, and data handling once the shape is right.
  4. Refine and polish: Tune the look, spacing, and edge cases last, when the rest is stable.

Each stage is saved as a version, so if one step goes wrong you can roll back just that step rather than the whole app.

Telling the agent what to avoid is as useful as telling it what to do. Constraints keep a precise build from drifting.

Add a settings window with a dark mode toggle. Don't change the main window's layout, and keep the existing color scheme.

Useful constraints to state explicitly:

  • Leave this alone:: "Don't touch the sidebar" protects parts that already work.
  • Stay within these bounds:: "Keep it to a single window" or "no external services" sets the scope.
  • Avoid this approach: "Don't add a database, just keep it in memory" steers away from over-building.

If a previous prompt changed something you didn't want changed, add a constraint to the next one. A clear "don't" is often the quickest way to stop the agent repeating a mistake.

Your strongest prompts often combine more than one kind of context in a single message. The agent reads them together, so a screenshot plus a sentence of intent is far clearer than either alone.

  • Image + instruction: Attach a mockup and write what to build from it: "Build this layout, but make the list scrollable and pull in the data I'll paste below."
  • Data + instruction: Paste a chunk of data into the message and describe how to use it: "Here's a CSV of my expenses. Show them in a table sorted by date, with a running total."
  • Reference + constraint: Point at an existing app and bound the change: "Match the styling of my notes app, but don't copy its sidebar."