Fill in sections on the left to build your prompt
About
The Prompt Builder provides a structured form for composing LLM prompts following prompt engineering best practices. Six sections guide you through: Role (who the AI should be), Context (background the AI needs), Task (the core instruction), Constraints (rules to follow), Examples (few-shot demonstrations), and Output Format (response structure). The assembled prompt is shown live on the right with a token count. Templates can be saved to and loaded from localStorage — your templates persist between sessions without any account or server. Four starter templates are provided for common use cases.
How to use
- 1 Fill in any combination of the six sections: Role, Context, Task, Constraints, Examples, and Output Format.
- 2 The assembled prompt updates live on the right side as you type.
- 3 Click "Copy" to copy the full assembled prompt to your clipboard.
- 4 To save a template, give it a name and click "Save Template" — it's stored in your browser's localStorage.
- 5 Load a saved template by selecting it from the Templates dropdown.
- 6 Use a Starter Template to begin with a pre-filled structure for common tasks.
- What is structured prompt engineering?
- Structured prompting breaks a prompt into distinct sections — role, context, task, constraints, examples, and output format — rather than writing freeform instructions. Research shows that explicitly separated sections reduce ambiguity and improve response consistency, especially for complex tasks.
- Where are my saved templates stored?
- Templates are saved in your browser's localStorage under the key "codelint_prompt_templates". They persist across sessions on the same device and browser. They are never sent to any server.
- What is a "role" in a prompt?
- The role section sets the AI's persona — "You are a senior TypeScript engineer with 10 years of experience." This activates relevant domain knowledge and constrains the tone and expertise level of responses. Claude and GPT both respond well to explicit role instructions.
- What are few-shot examples?
- Few-shot examples are input/output pairs included in the prompt to demonstrate the expected format or style. For example, showing 2-3 example Q&A pairs before the real question. The Examples section in the builder is designed for this.