Tagged “best-practices”
1 post.
How to write a clear prompt for an AI coding tool
A clear prompt for an AI coding tool states the goal in one sentence, then adds the context the tool cannot see, the constraints it must respect, and at least one concrete example of the input and output you expect. GitHub's own guidance describes the shape as starting general and then getting specific: a broad description of the scenario first, followed by the specific requirements. The reason vague prompts fail is not that the model is weak, it is that the gaps get filled with assumptions, so "build a login form" produces code that looks right and matches nobody's stack. Everything else worth doing follows from that: keep the slice small enough to review, show the pattern with an example or a test rather than describing it, say what you do not want, and rewrite the prompt rather than arguing with the output.