Prompt guides
How prompting differs for code, writing, and analysis
How the right prompting approach shifts between coding tasks, writing tasks, and analytical tasks — and how that connects to choosing the right model for each, not just the right words.
All prompt guides · Last reviewed:
Prompting for code: precision over persuasion
A coding prompt benefits most from precision — the exact function signature, the language and version, the constraint the code has to satisfy, an example of the expected input and output. Vague framing that would be harmless in a writing prompt ("make it good") gives a coding task almost nothing to work with, since there is no single correct shape to a request like that.
Prompting for writing: audience, tone, and one good example
A writing or editing prompt benefits most from the context and constraint guidance in how to write a clear, specific prompt, linked below — who the piece is for, the tone it should hold, and a length or structure constraint. An example of the target voice, per few-shot prompting, linked below, often does more work here than a longer description of the tone would.
Prompting for analysis: asking for the reasoning, not just the conclusion
An analytical task — weighing options, interpreting data, working through a decision with several factors — usually benefits from chain-of-thought prompting, linked below: asking the model to lay out its reasoning rather than only stating a conclusion gives you something to check, and tends to surface a missed factor or a weak assumption. This is the same shape of task as choosing a model for complex reasoning, linked below, which covers which model is built for exactly this rather than repeating that guidance here.
Questions people ask
- Does one prompting technique work best across all three task types?
- No — precision matters most for code, audience and tone matter most for writing, and asking for visible reasoning matters most for analysis. Most tasks benefit from a mix, weighted toward whichever of these the task actually needs.
- Does the model I choose matter as much as how I write the prompt?
- Both matter, and they are different levers — this guide is about wording; see choosing a model for your task, linked below, for the model-fit side of coding, writing, and reasoning-heavy tasks specifically.
- Is a coding prompt just a writing prompt with different words?
- No — a coding task usually has a single correct or working shape, so precision about the exact requirement matters more than it does for most writing, where several different phrasings can all be good.
Practice on a real conversation
ClawAI’s routing modes already lean toward a fitting model per task — Auto and High Reasoning for analytical work, for example — so a well-written prompt and a fitting route work together rather than as separate choices.