PromptPilot is a context-aware AI prompt enhancer Chrome extension that improves user prompts using the current prompt + recent chat context.
It works with:
- ChatGPT
- Claude
- Gemini
- Perplexity
The extension reads the current prompt and recent visible messages, sends them to a FastAPI backend, analyzes the context, and returns a sharper, goal-focused optimized prompt.
- Context-aware prompt optimization
- Prompt scoring system
- Detects vague prompts
- One-click prompt replacement
- Copy optimized prompt
- Multi-platform support
- Privacy-focused design
- Optional OpenAI-powered optimization
- Local backend support
- Chrome Extension Manifest V3
- JavaScript
- HTML/CSS
- Python
- FastAPI
- Pydantic
- OpenAI API
- Ollama
promptpilot/
├── backend/
│ ├── requirements.txt
│ ├── Dockerfile
│ └── app/
│ ├── main.py
│ ├── schemas.py
│ ├── config.py
│ ├── context_extractor.py
│ ├── prompt_analyzer.py
│ ├── prompt_optimizer.py
│ ├── llm_optimizer.py
│ └── privacy.py
│
└── extension/
├── manifest.json
├── content.js
├── styles.css
├── popup.html
├── popup.js
└── platforms/
├── chatgpt.js
├── claude.js
├── gemini.js
└── perplexity.jsHandles:
- prompt analysis
- context extraction
- optimization
- scoring
- AI integration
| File | Purpose |
|---|---|
| main.py | FastAPI entry point |
| schemas.py | API request/response models |
| context_extractor.py | Extracts recent chat context |
| prompt_analyzer.py | Detects weak/vague prompts |
| prompt_optimizer.py | Rule-based optimization |
| llm_optimizer.py | OpenAI-powered optimization |
| privacy.py | Removes sensitive data |
Chrome extension frontend.
| File | Purpose |
|---|---|
| manifest.json | Extension configuration |
| content.js | Main extension logic |
| styles.css | Floating widget UI |
| popup.html | Popup UI |
| popup.js | Extension settings |
| platforms/ | Platform-specific DOM handlers |
User Types Prompt
│
▼
Chrome Extension Reads:
- Current Prompt
- Recent Messages
│
▼
FastAPI Backend
│
▼
Context Extraction
│
▼
Prompt Analysis
│
▼
Prompt Optimization
│
▼
Return:
- Optimized Prompt
- Score
- Issues
│
▼
Extension Floating Panel
│
▼
Replace Prompt / Copygit clone https://github.com/yourusername/promptpilot.git
cd promptpilotcd backend
python -m venv venvvenv\Scripts\activatesource venv/bin/activateInstall dependencies:
pip install -r requirements.txtRun backend:
uvicorn app.main:app --reload --port 8000Backend runs at:
http://localhost:8000Open:
chrome://extensionsEnable:
Developer ModeClick:
Load unpackedSelect:
promptpilot/extensionOpen:
http://localhost:8000/healthExpected:
{
"status": "ok"
}- Open ChatGPT
- Type a prompt:
how to deploy this- Click:
Improve PromptExpected:
- optimized prompt appears
- score appears
- Replace Prompt works
- Copy works
Chrome Extension
│
▼
Local FastAPI BackendNo server cost.
Steps:
- Build extension
- Add privacy policy
- Add screenshots
- Zip extension folder
- Upload to Chrome Web Store
- Submit for review
- LangGraph agents
- Prompt history
- Hallucination detection
PromptPilot aims to become:
“Grammarly for AI prompts”A tool that automatically transforms weak prompts into high-quality context-aware prompts.