Skip to content
Before you ship

Prompt library

Questions to paste into your AI tool to check your own app, collected from every lesson. Replace anything in [square brackets] with your details.

216 prompts

Level 1Foundations

1. You pressed Enter. What happened in the next second?

  • Explain what happens step by step when I open youtube.com, in simple words.

  • I see this error: [paste it]. Did my request reach the server, or did it fail before that?

2. How does your browser find one computer out of billions?

  • Explain step by step what happens when my browser looks up a domain name, in simple words.

  • I looked up [your domain] on dns.google and got [paste the result]. What does this tell me?

  • I changed a DNS record [how long] ago, and some devices still show the old site. Why, and how long might it take?

3. Every website is a conversation. Here's how it goes

  • Explain this HTTP request line by line, in simple words: [paste it].

  • The request [method] [path] returns status code [number]. What does that code usually mean, and where should I look first?

  • Check the server code of my app. Does every error send an honest status code, or does it sometimes send 200 with an error message?

4. Take a web page apart and see what's inside

  • Explain this HTML line by line, in simple words: [paste it].

  • My page loads, but [describe what's wrong]. The Network tab shows [statuses], and the Console shows [paste errors]. Which file is the problem?

  • Which parts of the page in my app come from HTML, which from CSS, and which does JavaScript build?

5. "This site can't be reached": what broke, and where?

  • Here is the exact error I see: [paste it]. Which step fails: DNS, the connection, the response from the server, or building the page?

  • I get [status code] for [path]. Here are my server logs: [paste them]. What's the cause?

  • My page is blank. The Console shows: [paste the error]. Explain it in simple words. Then show me the line to fix.

6. A player scored 999,999 points by editing the page. How?

  • Which parts of my app run in the browser, and which run on the server?

  • Is there any secret key, password or answer in my frontend code?

  • List every decision my app makes in the browser. Which ones should the server make instead?

7. The hidden conversation behind every button you tap

  • List every API endpoint in my app, with its method, its address and what it does.

  • For each endpoint, what data does it send back? Is any of it data the page doesn't show?

  • I get 'Unexpected token <' when my page calls [endpoint]. Help me check the address and what the server sends back.

8. Your first app in an afternoon, with an AI doing the typing

  • List every file in my project. For each one, say what it does in one short sentence, and whether it runs in the browser or on the server.

  • Where does my app save its data? Will it still be there after a reload, and can other people see it?

  • Before you change anything, tell me your plan in three short steps.

9. The AI wrote your code. Can you read it?

  • Explain this code line by line, in plain English. I'm a beginner: [paste the code]

  • In this route, what happens when the request has no text? Which lines run?

  • Does this code have an = inside an if, a missing await or a missing return?

10. Your app forgot everyone's messages overnight. Why?

  • Where does my app save its data? Will that data survive a restart and a deploy on my hosting company?

  • Does my app write user data to any files? If so, help me move it to a database.

  • Explain the tables in my database. What is one row in each table?

11. Your app restarted and all the likes vanished

  • Does my app keep any important data only in memory, like in a variable? What would be lost if the server restarted?

  • How do I start and stop my app's process? Which window is it running in?

  • My computer is slow while my app runs. How do I check whether it's using too much CPU or memory?

12. It works on my laptop. Why can't my friend open it?

  • Search my code for 'localhost'. Which of these will break when the app is deployed?

  • What command starts my app, and what port does it use?

  • Explain, step by step, how to deploy this app for the first time.

13. Your app's secrets don't belong in your code. Here's where they go

  • Search my project for API keys, passwords or tokens written directly in the code. Move them into environment variables.

  • Is .env listed in my .gitignore? Create a .env.example with the same names and no values.

  • Which of my environment variables are sent to the browser? Are any of them secrets?

14. It works on my machine, but not on yours. Blame the packages

  • List every package in my package.json and explain in one sentence what each one does. Are any of them unused?

  • I get this error: [paste it]. Is a package missing, or is it a version problem?

  • Before you add a new package, tell me why we need it and whether we could do it without one.

15. The AI broke your working app. Here's your undo button

  • Before you change anything, remind me to commit.

  • Before you suggest any git command, tell me if it can delete work I can't get back.

  • My app broke after your last change. Help me find the last working commit with git log and undo the change with git revert.

16. The error message is telling you what's wrong. Read it first

  • Here is the full error and what I did before it happened: [paste]. Explain the cause in simple words before you change any code.

  • Which line in this stack trace is from my own code, and what does that line do?

  • Is there anything secret in this error that I should remove before I share it?

17. There is no cloud. It's someone else's computer

  • My app has [describe it]. Which cloud building blocks would it use: a computer that's always on, file storage, a database, or code that runs only when needed?

  • Before I create anything on AWS, list everything that will cost money and how to turn each one off.

  • Explain the difference between EC2 and Lambda for my app, with the costs in plain words.

18. From your laptop to a real website in one push

  • Here's my build log: [paste it]. What is the first error, and what does it mean?

  • List every environment variable my app reads, so I can add them all to my hosting platform.

  • Which parts of my app will be files on a CDN, and which will be serverless functions?

Level 2Builder

19. The app said "Saved!". The note was never saved

  • List every API endpoint in my app with its method and the status codes it can return. Flag any that send errors with a 200.

  • Find every place my frontend calls fetch() without a check of response.ok.

  • Does any GET endpoint in my app change or delete data?

20. You changed your name. Half the app still shows the old one

  • List every column in my database that copies data from another table. How would I store it once instead?

  • Which columns in my database end in _id but aren't foreign keys?

  • Draw my tables and the relationships between them. Mark each one as one-to-many or many-to-many.

  • For each foreign key, what happens when the row it points to is deleted?

21. Your API key leaked, and strangers are spending your money

  • Which code in my app runs in the browser, and does any of it use a secret key?

  • Move every call to a paid API into a backend endpoint. Make the endpoint check the user is logged in.

  • My key leaked. Walk me through rotating it with [provider name], updating my hosting platform and redeploying.

22. Never store a password. Here's what to store instead

  • How does my app store passwords? Show me the code, and the algorithm it uses.

  • List every cookie my app sets, with its HttpOnly, Secure and SameSite settings.

  • Could I replace my hand-written login code with a proven login service or library? What would change?

23. Change one number in the URL, see everyone's invoices

  • For every API route in my app, show me where it checks that the logged-in user is allowed to access that record.

  • Is any user ID, owner ID or role taken from the request instead of the session?

  • List every route that reads, changes or deletes data, and the authorization check each one has.

24. Can strangers read your whole database? Check in 5 minutes

  • For every API route that saves data, show me the server-side validation. Use a schema validator like Zod and allow only the fields we expect.

  • List every table in my Supabase project. Does each one have Row Level Security turned on, and what do its policies allow?

  • Is the Supabase secret or service_role key used anywhere in code that runs in the browser?

  • Could a user who is not logged in read or change any data, using only the public key in my frontend?

25. How one line of text can dump your whole database

  • Find every place in my app where SQL text is built from variables. Is any value from the request glued into the text instead of passed as a parameter?

  • List every raw query in my project (queryRaw, queryRawUnsafe, sql.raw). Is each one safe from SQL injection?

  • Where does my app let users choose a column or sort order? Is it checked against an allowlist?

26. A comment that runs code in every visitor's browser

  • Find every place where my app shows text that users wrote. Is it escaped by default, or shown as raw HTML?

  • List every use of dangerouslySetInnerHTML or innerHTML. Where does the content come from, and is it sanitized with DOMPurify?

  • Set up a Content Security Policy for my app. Start in report-only mode and tell me what it would block.

27. "Blocked by CORS policy": why the browser said no

  • Show me my CORS settings. Which origins are allowed, and are credentials allowed? Is any origin copied back from the request without checking a list?

  • Can I serve my frontend and API from the same origin, so I don't need CORS at all?

  • This is my CORS error and the request's status code from the Network tab: [paste]. Is this really a CORS problem, or is my server returning an error?

28. What the padlock icon really protects, and what it doesn't

  • Search my project for http:// addresses, rejectUnauthorized and NODE_TLS_REJECT_UNAUTHORIZED, and explain each one.

  • Are my session cookies set with Secure and HttpOnly?

  • Who renews my HTTPS certificate, and how would I find out if renewal failed?

29. One company went down, and a big chunk of the internet went with it

  • My site is behind Cloudflare. Here are my SSL/TLS mode and my server's redirect settings: [paste]. Could they cause a redirect loop?

  • Does my server accept connections from anyone, or only from Cloudflare? How do I limit it?

  • Where does my app read the visitor's IP address, and is it correct behind Cloudflare?

30. Bots signed up 10,000 times overnight. Now what?

  • List every endpoint in my app that costs money or sends emails or messages. Which ones have a rate limit on the server?

  • Add a per-user daily limit to my AI endpoint, stored in the database, and cap the size of the prompt and the AI's answer.

  • My app runs on [your hosting platform]. Does my rate limiter share its counter across all copies of the server, and does it read the real visitor IP address behind the proxy?

31. Free stuff with one fake "payment succeeded" message

  • Show me where my webhook endpoint verifies the signature. Does it use the raw request body and the official library?

  • Does any JSON parsing happen on my webhook route before signature verification?

  • What happens in my app if the same webhook event arrives twice, or two copies arrive at the same time?

32. The profile picture that ran code on your site

  • Walk me through what happens when a user uploads a 5 GB file, a text file named .png, or an SVG with a script.

  • Where are uploaded files stored, and from which domain are they served?

  • For private files, show me where we check ownership before creating a signed URL, and how long the URL lasts.

33. The AI suggested a package that didn't exist. Then someone made it

  • Before we add a package, tell me if we can do this without one. If we need one, give me the exact name and the link to its official documentation.

  • List every package in my package.json, what it's for, and whether my code still uses it.

  • Explain each problem npm audit reports in my project, and how to fix it without breaking changes.

34. Your error page showed your database details to everyone

  • Find every place where my app sends an error's message or stack trace to the browser. Replace them with a central error handler that logs the details with an error ID and sends a generic message.

  • List every catch block in my app. For each one, tell me whether it logs the error and what the user sees.

  • Which checks in my app allow access if they fail? Change them so they deny access instead.

  • Add error boundaries so one broken component can't blank the whole page.

35. You renamed one column and the live app crashed

  • Show me the SQL this migration will run, and explain what each line does to existing data.

  • Will this migration break the code that's currently live, during the deploy? If so, split it using expand and contract.

  • How do migrations reach my production database? Is it automatic, and does it run only once per deploy?

  • Never run schema changes directly on my production database. Write a migration file instead.

36. The AI deleted your production database. Now what?

  • Which database does my app connect to on my laptop? Is it possible that it's the production database?

  • What backups does my database provider give me on my current plan, how long are they kept, and is point-in-time recovery turned on?

  • Help me export my production database and restore it into a new test database, so I can check that my backups work.

  • Before you run any command that changes or deletes data, show it to me and tell me which database it will run on.

Level 3Shipping

37. Why you should never test on your real users

  • List every environment variable my app reads. For each one, tell me whether it must be different in development, preview and production.

  • Write a seed script that fills my development database with fake users and data, using example.com email addresses.

  • Add a start-up check that stops the app if a live payment key is used outside production, or a test key inside production.

  • Find every place my app sends emails or charges money. How do I make sure none of them can reach real people from development or previews?

38. The AI fixed one bug and quietly broke three others

  • Before you change anything, write tests for how this feature works now. Don't change app code.

  • List the critical paths in my app: anything that handles money, saves user data or checks who can see what. Which ones have no tests?

  • Write a failing test that reproduces this bug. Then fix the bug, and show me the test passing.

  • Don't edit existing tests to make them pass. If a test fails, tell me which behavior changed.

39. Stop broken code before it ever goes live

  • Add lint, typecheck and test scripts to my package.json, and a GitHub Actions workflow that runs them on every push and pull request.

  • CI failed. Here is the log: [paste]. What is the first error, and what is the fix? Don't skip or disable any check.

  • Does my workflow file contain any secrets, or any step that could make a failure look like a success?

40. Your app was down for six hours and nobody noticed

  • Find every log statement in my app. Do any of them log passwords, tokens, cookies, emails or whole request bodies?

  • Replace my console.log calls with structured logging that includes user IDs and record IDs.

  • Find every catch block that hides an error without logging or reporting it.

  • Add a health check route that tests the database connection without revealing any error details.

41. It only breaks in production. How do you find out why?

  • Here are the full log lines for this error. Don't write a fix yet. List the three most likely causes, and for each one, tell me how I can test whether it's true.

  • This works on my laptop but fails in production. List every difference between the two environments that could cause this error: settings, data, many users at once, caching, versions.

  • Write a test that reproduces this bug. It should fail with the current code. Then suggest the smallest fix that makes it pass.

42. Sign-up takes 10 seconds because of one email

  • For every API route in my app, list the slow work it waits for before replying. Say which parts could move to a background job.

  • My app runs on [Vercel / Netlify / my own server]. What's the simplest reliable way to run background jobs with retries here?

  • Make this job safe to run twice. Show me what happens if the worker crashes halfway through.

43. The payment timed out. Did it go through?

  • Find every place where my app charges money, creates an order or sends a message. Does each one use an idempotency key that stays the same across retries?

  • What does my checkout show the user if the payment request times out? Change it so a timeout is treated as 'unknown', not 'failed'.

  • Check my retry code: does it only retry temporary errors, use exponential backoff with jitter, and stop after a few attempts? Does the library underneath already retry?

44. You woke up to a $10,000 cloud bill. What happened?

  • List every place my app calls a service that charges per use. For each one, show how it's protected: login, per-user limit, size limit and a total cap.

  • Estimate the cost of one request to my AI endpoint, using my prompt and typical input. Then estimate the worst case if a bot calls it 5 times per second for 48 hours.

  • Add a server-side daily spending cap and an off switch to my AI features, and show a friendly message when they're reached.

45. The AI wrote 500 lines. How do you know they're safe?

  • Explain this change file by file. For each new or changed route: who can call it, what it checks, and what data it reads or changes. List everything you removed or weakened, and every assumption you made.

  • Review this diff against this checklist: authorization, input validation, injection, secrets, login, error handling, outside services, cost, database changes, new packages, tests. Quote the exact lines for each problem.

  • Split this feature into small steps that I can review one at a time. Don't write code yet.

Level 4Reliability & scale

46. Fast with 100 users, frozen at 10,000. The missing index

  • Here is my slowest query and its EXPLAIN ANALYZE output. Explain each line, and tell me whether an index would help.

  • List the queries my app runs on every page load, and the index each one uses. Which ones would do a full table scan?

  • Which indexes in my database are never used? Show me how to check before I remove any.

47. One page, 500 database queries

  • For this page, list every database query it runs, and say which ones run once per item.

  • Rewrite this code so it loads all the related data in one or two queries, no matter how many items there are.

  • Search my code for database queries inside loops, .map() or .forEach(), including in helper functions called from loops.

48. Your app tried to load 50,000 rows at once

  • Find every list endpoint in my app. For each, what is the default page size, the maximum, and how is it enforced on the server?

  • Convert this OFFSET pagination to keyset pagination with a stable sort and a unique tiebreaker. Show me the index it needs.

  • Which of my pages show a total count? How expensive is each count on a table with 10 million rows?

49. A customer got charged twice. How?

  • Find every place where my app reads a value, checks it, and then writes. Could two requests at the same moment both pass the check?

  • Rewrite this purchase so taking the credits and creating the order happen in one transaction, and the balance can never go below zero.

  • Which tables in my app should have unique or check constraints to stop duplicates and negative balances? Write the migration.

50. Two transactions, one wrong answer

  • Find every transaction in my app that reads data, checks a rule, and then writes. Which isolation level does each run at, and could two of them at once break the rule?

  • For this booking flow, compare SELECT ... FOR UPDATE on the parent row with Serializable plus retries. Which fits better, and why?

  • Where does my app handle serialization failures (SQLSTATE 40001 or Prisma P2034)? Retry the whole transaction, at most 5 times, with a short random wait, and no side effects inside.

51. One slow request froze the whole server

  • Which routes in my server do heavy CPU work instead of waiting? For each one, should it use an async API, a worker thread or a background job?

  • Add event loop delay monitoring to my Node.js server, and log a warning when the 99th percentile goes above 100 ms.

  • Is any regular expression in my code run on user input? Could any input make it very slow?

52. How one server handles thousands of users at once

  • List every piece of state my server keeps in memory. Which ones break if I run 3 instances?

  • Find every place where my code checks a value, awaits something, then updates that value. Rewrite each as one atomic database update.

  • Is any CPU-heavy work running on the main thread? Should it move to a worker thread or a background job?

53. Two tasks waiting for each other forever

  • Find every place where my code takes more than one lock or locks more than one row in a transaction. Is the order always the same?

  • Does any transaction or locked section call an external API? Move those calls outside.

  • Add a retry for Postgres error 40P01 that runs the whole transaction again, at most 3 times.

  • Do my mutexes and semaphores still work with several instances? If not, what shared lock should I use?

54. Your server crashes every few days, like clockwork

  • List every variable in my server that lives as long as the process and can grow. How big can each one get?

  • Find every event listener and setInterval created per request or per connection. Is each one removed when the request ends?

  • Add size limits and expiry times to every in-memory cache.

  • Help me take two heap snapshots locally and compare them to find what is growing.

55. Fast, but showing yesterday's data

  • List every Cache-Control header my app sends and every CDN cache rule. For each, could it ever store a response that contains one user's data?

  • Find every place my server reads from or writes to a cache. Show me the key, the TTL, and what code removes the copy when the data changes.

  • Which decisions in my app (prices at checkout, balances, permissions) read from a cache instead of the database?

56. Your cache expired and the database collapsed

  • For every cached value in my app, tell me the strategy (cache-aside, read-through, write-through or write-back), the TTL, and what happens when the data changes.

  • Which cached keys are popular and slow to rebuild? Add request coalescing or a Redis lock with stale-while-revalidate to them.

  • If Redis restarted empty during peak traffic, how many database queries per second would hit my database?

57. How does a rate limiter count to 100?

  • Which rate limiting algorithm does each limiter in my app use? What is the worst-case number of requests one client can get through in 2 seconds?

  • Are my rate limit counters shared across all servers and updated atomically? Show me the exact Redis commands.

  • Switch my AI endpoint's limiter to a token bucket: 100 per minute, a burst of 20, stored in Redis. Send Retry-After on 429.

58. Fast in the US, painfully slow in India

  • Which region do my functions run in, and which region is my database in? Show me where each is configured.

  • In this route, which database queries are independent of each other? Rewrite it so they run at the same time.

  • List every request this page makes before the main content appears, in order. Which ones wait for an earlier one, and can any be combined?

59. How chat apps update without you refreshing

  • How does my app get new data without a refresh: polling, SSE or WebSockets? Where does it run, and what happens on my hosting platform when there are many instances?

  • What happens to messages sent while a user's connection is down? Show me the code that catches up after a reconnect.

  • Could this feature use Server-Sent Events or polling instead of WebSockets? Compare the cost and complexity.

  • Where is a user's permission to subscribe to a room checked?

60. Your app went viral. Will it survive?

  • Where does my app create database connections? Show me how many connections it could open with 100 instances running.

  • List everything my app keeps in memory or on local disk that would break with more than one instance.

  • Find my three slowest queries and suggest indexes or caching for each.

  • My app has [N] users. What's the simplest setup that would handle 10 times that? Don't suggest anything I don't need yet.

61. SQL or NoSQL? The AI chose for you. Was it right?

  • Which database does my app use, and why was it chosen? What would be hard to do with it later?

  • Here are the 5 most important questions my app asks its data. Write the query for each and tell me how many reads each one takes.

  • Where does my app store copies of the same data? What keeps them in sync?

  • Design my tables in PostgreSQL. Use jsonb only where the fields really vary, and explain why for each one.

Level 5Systems & architecture

62. One slow service took your whole app down

  • For each outside service my app calls, what happens to my app if that service takes 30 seconds to answer? Which unrelated pages would slow down?

  • Wrap calls to [service] in a circuit breaker with opossum. Set a timeout, a sensible threshold, a fallback, and a log line when it opens.

  • Which features in my app could show a cached or default answer when a service is down, and which must show an error instead?

63. When everything calls everything, everything breaks

  • List every place where one of my services calls another and waits. Which of these need the answer right away, and which could be events?

  • Make this consumer idempotent. Show what happens if the same event arrives twice, or if the consumer crashes after doing the work but before acknowledging.

  • Does my app really need a message broker? Explain the costs for an app of my size, and what a simpler option would be.

64. The order was saved, but the email never went out

  • Find every dual write in my code: a database save followed by a message, an API call or a job in another system. What happens if the server stops between the two?

  • Add a transactional outbox for [this event]: the table, the write to it in the same transaction, and a relay worker. Show what happens if the relay crashes after publishing.

  • Write a monitoring query and an alert for unsent outbox rows older than five minutes.

65. Your search results are an hour out of date. Why?

  • List every place my app keeps a copy of database data, how each copy is updated, and the longest it can be out of date.

  • Does any code update a search index or cache right after a database write? What happens if the second write fails, or if data is changed outside this code?

  • If we used change data capture, which tables and columns would we capture, which would we exclude, and how would we monitor the replication slot?

66. What if your database remembered everything that ever happened?

  • Which tables in my app need history, so I can answer a customer who asks what happened to their data? Suggest the simplest way to keep that history.

  • I'm considering event sourcing for this part of my app. List what it would cost us in complexity, event versioning and deleting personal data, and suggest a simpler alternative.

  • Review my event handlers: are they idempotent, and do any of them cause side effects when events are replayed?

67. Two people typed in the same document at once. Who wins?

  • When two users edit the same record or document in my app at the same time, what exactly happens? Walk me through it step by step.

  • Should my app use a version check, OT or a CRDT library like Yjs? Ask me about offline use, how many people edit at once and document size before you answer.

  • Show me where my collaboration server checks that the connecting user is allowed to open this document, and where documents are saved to the database.

68. The decisions your AI can't make for you

  • Before you suggest an architecture, ask me about my users, budget, team, deadline and how bad downtime or data loss would be. Then give me two or three options with their trade-offs.

  • Which decisions in this plan would be hard to reverse later? For each, what would we lose by choosing the simpler option now?

  • Write an architecture decision record for this choice, including the negative consequences.