“Add an AI chatbot to my app at /chat, powered by Anthropic's Claude. The chat should: (1) show the reply word-by-word as it's written, (2) show a typing indicator while waiting, (3) automatically scroll to the newest message, (4) show a friendly message if something goes wrong. Keep my Claude API key in a safe place so it's never visible to visitors.”
“Add a limit to my AI chat so each visitor can only send 20 messages per hour. Identify them by their account if they're signed in, or by their device otherwise. When someone hits the limit, show a friendly red message in the chat that says: "You've hit your hourly message limit. Try again in X minutes.”
“In my AI chat, before sending the user's message to the AI, fetch relevant context from my database (e.g., the user's recent orders, their saved notes, or product info matching their query). Pass that context as part of the system prompt so the AI can give personalized answers.”
“Add a "Summarize" button on my long-form content pages (blog posts, transcripts). When clicked, it should stream an AI-generated 3-bullet summary into a sidebar without leaving the page. Use the Vercel AI SDK's streamText function.”