Merlio's pick for this: Muse Ember. Opens Merlio with the prompt filled in. Free plan with 10 chats and 5 images a day. No card needed.
How to write a coding prompt
The model can't run your code or see your project. Everything it knows is in the prompt: give it the evidence a colleague would ask for.
The recipe
1Language and version
2Task
3What it runs in
4Exact error
5What must not change
6How to answer
What makes the difference
Paste the error, not a summary of it
“It crashes” gives nothing to work with. The message and the line it points to usually name the cause.
Send the smallest code that fails
A function and its call beat the whole repository. Long code first, question last, if you must send more.
Give the versions
React 19 and React 17, Python 3.12 and 3.8: the right answer changes, and the model can't guess which you run.
Say what must not change
The signature, the public API, no new dependencies. Otherwise a fix can quietly rewrite half your file.
Ask for the cause before the fix
One sentence of diagnosis tells you whether the model understood the bug or is guessing.
Ask for tests
Edge cases as a table (input, expected, why) expose assumptions faster than reading the code.
Three requests, before and after
Fixing a bug
What most people type
“my code doesn't work, fix it (then 300 lines)”
What gets a great result
“Language: TypeScript 5.6 on Node 20.
Find why the function below returns undefined when the cart is empty, and fix it.
The exact error:
TypeError: Cannot read properties of undefined (reading 'id') at cart.ts:42
Keep the function's signature and add no dependencies. Answer with the cause in one sentence, then one code block.
(the function, and only that)”
The model can't run your code, so the exact error and the line are its only evidence. The smallest code that fails beats the whole file, and asking for the cause first shows whether it understood before it rewrites anything.
Writing a new function
What most people type
“write a function to validate emails”
What gets a great result
“Write a TypeScript function isValidEmail(input: string): boolean for a signup form. Accept what a browser's type=email field accepts; reject spaces and a missing domain. No new dependencies. Give the function, then 8 test cases as a table: input, expected, why.”
“Validate” hides a decision: how strict? Naming the rule and asking for test cases makes the model's assumptions visible, so you catch a wrong one before it ships.
A SQL query
What most people type
“sql query top customers”
What gets a great result
“PostgreSQL 16. Tables: customers(id, name), orders(id, customer_id, total_cents, created_at). Write a query that returns each customer's total spend over the last 90 days, highest first, with customers who spent nothing left out. Comment each step. Tell me what you assumed.”
The model can't see your schema: paste the table and column names, or it invents them. “Top” and “recent” need a number, and “tell me what you assumed” surfaces the guesses it still made.
No. Paste the smallest piece that shows the problem, the file names it touches, and the exact error. If you must send a lot, put the code first and your question last.
How do I stop the AI from inventing functions that don't exist?
Name the library and its version, paste the part of the docs or the types you rely on, and ask it to say when it is not sure instead of guessing.
Which model should I use for code in Merlio?
The builder shows Merlio's current pick for chat next to the Run button, and you can switch model in the middle of a chat to compare two answers on the same bug.
Is it safe to paste my code?
Merlio never uses chats to train models. Remove API keys, passwords and customer data before you paste, as you would anywhere.