PromptFix
Transform unclear AI prompts into clear, detailed, and well-structured instructions for better AI results.
What is PromptFix?
PromptFix is a VS Code extension that helps developers write better prompts for AI tools like GitHub Copilot, ChatGPT, Claude, and Gemini.
The Problem
Most developers write weak prompts like:
- "fix this"
- "make it better"
- "optimize"
- "write tests"
These prompts are too vague, and AI models struggle to understand what's really needed. The result? Poor quality responses.
The Solution
PromptFix automatically improves your prompts by:
- Making them clear and specific - Add necessary details and context
- Specifying output format - Tell the AI exactly how you want results formatted
- Including constraints - Define requirements and limitations
- Suggesting improvements - Learn how to write better prompts
Features
- Sidebar Chat Panel - A dedicated sidebar (like Copilot) for prompt improvement
- Intent Detection - Automatically detects your intent (debugging, testing, optimization, etc.)
- Framework Awareness - Detects your language, framework, and test tools for context-aware improvements
- Smart Context Collection - Gathers imports, tests, and config files from your project
- Multiple AI Models - Support for OpenAI, Anthropic (Claude), and Google Gemini
- Code Context - Attach selected code for better AI understanding
- Copy & Insert - Easily copy improved prompts or insert them at your cursor
- Privacy First - All API calls go directly from your computer to the AI provider
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "PromptFix"
- Click Install
Getting Started
Step 1: Set Up Your API Key (30 Seconds)
When you first open PromptFix from the sidebar, you will see the setup screen:
Choose Provider - Select your preferred AI:
- OpenAI (GPT-4) - Affordable, fast
- Anthropic (Claude) - Best reasoning
- Google (Gemini) - Analysis expert, free tier available
Get Your Key - Click the link to get your API key from the provider
Paste & Save - Paste your key and click Save Key
Done - Start using PromptFix
What About Security?
Your API key is:
- Stored securely on your computer via VS Code SecretStorage
- Never seen by PromptFix creators
- Never uploaded to external servers
- Fully under your control
- Can be removed anytime
Want to Switch Providers?
Go to Settings (via PromptFix menu) and:
- Test your current key
- Change to a new key
- Switch to a different AI provider
- Remove your key
Step 2: Use PromptFix
- Click the PromptFix icon in the Activity Bar (left sidebar)
- Type your prompt in the input area
- Press Ctrl+Enter or click Send
- Review the improved prompt, suggestions, and reasoning
Method 2: Command Palette
- Press
Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)
- Type "PromptFix: Improve Prompt for AI"
- The sidebar will focus for you to enter your prompt
Method 3: With Selected Code
- Select some code in your editor
- Right-click and choose "PromptFix: Improve Selected Code Prompt"
- The code is attached as context automatically
- Enter your prompt and send
Step 3: Use the Results
Once your prompt is improved, you get:
- Intent Badge - Shows detected intent (debugging, testing, implementation, etc.) with confidence level
- Improved Prompt - The enhanced, professional version of your prompt
- What Changed - A list of specific improvements made
- Why - Reasoning behind the improvements
Actions:
- Copy - Copy the improved prompt to clipboard
- Insert at Cursor - Insert directly into your active editor
- Clear - Reset the chat for a fresh start
Examples
Example 1: Generic Request
Original: "fix this"
Improved: "Review the following code for bugs, performance issues, and potential improvements. Provide specific fixes with explanations for each change."
Example 2: Test Writing
Original: "write tests"
Improved: "Write comprehensive unit tests for the following function using Jest. Cover normal cases, edge cases, and error scenarios. Describe what each test verifies."
Example 3: Code Explanation
Original: "explain"
Improved: "Explain this code in detail. Describe what each section does, the overall purpose, and any important design patterns or concepts being used."
Configuration
API Key Settings
Open VS Code Settings and search for "promptfix" to find these options:
| Setting |
Description |
Default |
promptfix.selectedModel |
Choose which AI model to use |
openai |
promptfix.openaiApiKey |
Your OpenAI API key |
- |
promptfix.anthropicApiKey |
Your Anthropic API key |
- |
promptfix.geminiApiKey |
Your Google Gemini API key |
- |
promptfix.includeCodeContext |
Include selected code in improved prompts |
true |
promptfix.modelTemperature |
AI creativity level (0-2) |
0.7 |
Selecting an AI Model
- Open PromptFix panel (Ctrl+Shift+P → "PromptFix: Improve Prompt for AI")
- Use the "AI Model" dropdown at the top
- Select your preferred model
Model Comparison
OpenAI (GPT-4 / 3.5-Turbo)
Anthropic (Claude)
- Pros: Excellent at complex reasoning, longer context window
- Cost: Pay-per-token, slightly higher than OpenAI
- Best for: Detailed analysis, creative writing
- Get API key: https://console.anthropic.com/
Google Gemini
Keyboard Shortcuts
- Ctrl+Shift+P → Search "PromptFix" to access commands
- Ctrl+Enter in PromptFix panel to quickly improve prompt
- Right-click selected code for context menu
Privacy & Security
Your Data is Safe
- PromptFix does NOT store your code or prompts
- API calls go directly from your computer to the AI provider
- Your API keys are stored locally via VS Code SecretStorage (encrypted)
- No data is sent to third-party servers
Important Notes
- Keep your API keys private - never share them
- Monitor your API usage on your provider's dashboard
- Be mindful of API costs when using multiple models
Tips for Better Results
- Be Specific - The more detail you provide, the better the improvement
- Include Context - Use selected code to provide relevant examples
- Mention Goals - State what you want to achieve with the prompt
- Specify Format - Tell the AI how you want the response formatted
- Add Constraints - Mention any requirements or limitations
Supported VS Code Versions
- VS Code 1.109.0 and above
- Windows, macOS, and Linux
Troubleshooting
Solution: Open VS Code Settings, search for "promptfix", and add your API key for the selected model.
"API request failed" Error
Check:
- Your API key is correct and active
- You have internet connection
- Your API account has sufficient credits
- The API service is not down
"No editor is active" Error
Solution: This appears when trying to insert at cursor without an open file. Open a file and try again.
Prompts taking too long
Solution: This is normal for complex prompts (5-15 seconds). The extension shows a loading indicator while processing.
Feature Roadmap
Future versions may include:
- Prompt history and management
- Batch prompt improvements
- Integration with more AI models
- Team collaboration features
- Learning-based suggestions
- Multi-language support
Support & Feedback
- Found a bug? Open an issue on GitHub
- Have a feature suggestion? Let us know!
- Need help? Check the troubleshooting section
License
MIT License - See LICENSE file for details
Credits
PromptFix is designed to help developers harness the power of AI by writing better prompts. Built for the developer community.
Make your AI interactions more productive with PromptFix.