What this prompt does
This prompt makes the model a senior mobile UI engineer building health data screens and asks it to specify a nightly sleep tracker summary tightly enough to build, returning working component code rather than pseudocode. Sleep summaries are deceptively hard: the chart is easy, but turning a noisy night into one honest sentence is the real work, so the prompt puts weight on the insight. Four variables steer it: [stack] sets the framework (React Native with Victory charts by default), [stages] lists the sleep stages to chart, [metrics] names the headline numbers, and [insight_window] sets the trend window like the last 3 nights.
The deliverables include a last-night sleep score ring with a clear good/fair/poor reading, a stages chart across the night with a heart-rate overlay toggle, a time-in-bed versus time-asleep comparison with an efficiency percentage, trend insights computed over the insight window in plain language, and a tips card that adapts to the night's weakest metric. It also asks for empty (no data), partial-night, and loading states, so a real device's messy data still renders as a calm, honest summary rather than a broken screen. Because the prompt requires working component code and a sample nightly-sleep data shape rather than pseudocode, the score ring, stages chart, and adaptive tips card all sit on a concrete data model, and putting the weight on the plain-language insight rather than the chart is what keeps the summary trustworthy when a single noisy night has to become one honest sentence.
When to use it
- Building a nightly sleep summary screen from sensor data
- Charting
[stages]with a heart-rate overlay toggle - Showing a sleep score ring with a good/fair/poor reading
- Computing plain-language trend insights over an
[insight_window] - Adapting a tips card to the night's weakest metric
- Handling partial-night and no-data states gracefully
Example output
You get components, props and types, and a sample nightly-sleep data shape: the sleep score ring with a good/fair/poor reading, the stages chart with a heart-rate overlay toggle, the time-in-bed versus time-asleep comparison with efficiency percentage, the plain-language trend insights over your insight window, the adaptive tips card, and the empty, partial-night, and loading states.
Pro tips
- Spend your effort on the trend insights; vague insights erode trust faster than a missing chart.
- Set
[insight_window]to a short, honest range like the last 3 nights so trends are meaningful, not noisy. - List exactly the
[metrics]you can compute so the screen never promises a number the sensor data lacks. - Make the tips card adapt to the weakest metric so advice feels specific rather than generic.
- Define the partial-night and no-data states explicitly; real devices produce messy nights, and these states are common.
- Keep the score ring's good/fair/poor reading simple so the headline is calm and immediately legible.