Skip to content
Kestrel
All posts

Guides · 8 min read

Five prompt patterns for production-ready components

Small habits that turn vague requests into typed, accessible, tested components you can merge the same day.

Noah BrooksDeveloper Advocate ·

Kestrel is good at guessing, but it is great when you tell it what “done” looks like. These five patterns come from watching thousands of first prompts turn into merged pull requests.

1. Name the states

Instead of “a button”, ask for “a button with idle, loading and disabled states”. You will get the props, the spinner and the aria attributes in one go.

2. Point at a sibling

text
a pricing card like components/PlanCard.tsx, but with a yearly toggle

Referencing an existing file is the fastest way to inherit spacing, tokens and naming.

3. Ask for the tests you would write

  • “renders the empty state”
  • “calls onSelect with the plan id”
  • “is keyboard accessible”

4. Say what not to do

“No new dependencies” and “no inline styles” are short, cheap and remarkably effective.

5. Iterate on the diff, not the prompt

Once the first version lands, comment on the diff like you would on a teammate’s PR. Kestrel keeps the context and changes only what you asked about.

Start building

Your next feature isone sentence away.

Join 20,000+ developers shipping typed, tested code with Kestrel. Set up in under two minutes.

  • 14-day trial on paid plans
  • No credit card
  • Cancel anytime