01
Give the agent a clear role and name. "You are a billing support agent for Acme Corp" outperforms "You are a helpful assistant."
02
Define what the agent should NOT do. Constraints are just as important as capabilities when building reliable agents.
03
Specify tone and format explicitly. "Respond in 2-3 sentences, professionally but warmly" removes ambiguity.
04
Tell the agent what to do when it doesn't know the answer. Escalation paths make agents trustworthy in production.
How it's built

Two prompts, one question

I built this to show why a system prompt matters. You describe an agent; Claude writes a vague prompt and a well-crafted one for it, then both versions answer the same customer message side by side.

  1. You describe an agentFor example, an IT helpdesk agent.
  2. Claude writes two promptsA vague "before" and a specific "after" with a role, tone, limits and an escalation path, returned as JSON.
  3. Both prompts answerTwo calls run at the same time, each using one prompt as its system prompt and the same message: "Hi, I need some help please."
  4. You compareThe page shows both answers and a short note on why the difference matters.

Decisions worth noting

  • Only the prompt changes. Both versions get the identical test message, so any difference in the answers comes from the prompt.
  • A fixed shape instead of free text. Claude answers in JSON with three fields, so the page can lay out the prompts and the insight without guessing.
  • The key stays on the server. The browser calls /api/prompt, a Vercel function that adds the API key, checks the request came from this site and caps the length.
  • Small on purpose. Every page that calls Claude shares a cap of 5 calls a day, so a demo can never run up a bill. A full comparison uses 3 of them.

Built with

  • Claude API (Sonnet 5.5)
  • Vercel Functions
  • Upstash Redis
  • Vanilla JavaScript