Smart Prompt Builder is a VS Code extension designed to help you write better, more structured prompts for Large Language Models (LLMs). By simply speaking your problem description or typing it directly, this extension analyzes your input and generates a high-quality, structured prompt ready to be used with any AI model.
Features
🎙️ Voice-to-Prompt: Speak your problem out loud. The extension records it, translates it to text, and uses AI to refine the grammar and wording before structuring it.
🏗️ Structured Output: Your scattered thoughts are automatically organized into clear sections:
Role
Context
Task
Constraints
Output Format
🔍 Missing Information Detection: If you forget to provide important context or constraints, the AI will alert you with a MISSING: tag so you know exactly what to add.
⚙️ Custom Prompt Structures: Don't like the default sections? Define your own custom structure in the settings.
📝 Built-in Templates: Choose from built-in templates like Code Review, Bug Report, or API Design to guide the AI's structuring process.
🔌 Multiple Provider Support: Connects to OpenAI, Azure OpenAI, or your local Ollama instance.
📜 Prompt History: Automatically saves your generated prompts so you can refer back to them later.
Usage
Open the VS Code Command Palette (Cmd/Ctrl + Shift + P).
Type and select Smart Prompt Builder: Open.
Go to the Settings tab within the extension to configure your API provider and enter your API key.
Go back to the Builder tab. Click Start Recording to speak your prompt, or type it directly into the editor.
Click Refine Text to clean up the grammar.
Click Generate Prompt to transform it into a structured, ready-to-use prompt!
Configuration
This extension can be configured via VS Code Settings (Ctrl+,). Search for SmartPromptBuilder.
Key Settings:
API Provider: Choose between openai, azure, or ollama.
API URL: The endpoint for the completion API.
API Key: Your provider API key (not required for local Ollama).
Model Name: The model you wish to use (e.g., gpt-4o, gpt-3.5-turbo).
Use Custom Structure: Toggle to override the default prompt sections with your own.
Privacy & Security
Voice recognition is handled directly by your environment.
Prompts are only sent to the API endpoint you configure in your settings.
Prompt history is stored locally in your VS Code workspace state.
Elevate your prompt engineering directly within your IDE!