Prompt Craft
A five-part template for goals Grok can follow: goal, context, limits, non-goals, and how you will verify.
Why prompt craft matters
Grok is not rude when it misunderstands you—it is missing a clear contract. A prompt is simply the instruction you send. Better instructions → fewer wasted turns.
The five-part template (copy this)
Goal: <what a human can see or do when finished>
Context: @files or “search the project for X first”
Constraints: <rules—stack, style, do not add dependencies>
Non-goals: <what to ignore>
Verification:
1. <command or check>
2. <manual check if needed>Fill every line even if short. Empty lines are where mistakes hide.
Worked examples
“Add auth.”
“Goal: users can register and log in with email/password. Context: explore existing server folder first. Constraints: use our current database helper; no new auth vendors. Non-goals: OAuth, admin roles. Verification: register → login → visit /app succeeds; logged-out /app redirects.”
“Make it pretty.”
“Goal: HP bar matches VISUAL-STYLE-GUIDE.md colors. Context: @css/style.css @VISUAL-STYLE-GUIDE.md. Constraints: no layout shift when HP changes. Verification: describe full/half/empty states; I will check in browser.”
Steering phrases that help mid-project
- “Smallest change that meets verification—nothing extra.”
- “Stop. Tests are failing—fix only the failures.”
- “You added a feature I did not ask for; remove it.”
- “Explain your plan in 5 bullets; wait for OK.”
- “Summarize risks, then stop.”
Rewrite your last vague request using the five-part template. Send both to Grok in a throwaway session and compare the quality of the first response.