PromptIQ
PromptIQ is a VS Code extension for developers who want to craft stronger prompts before sending them to Copilot, Claude, Cursor, or any other AI assistant. It combines prompt scoring, optimization, token and cost estimation, local history, and quick handoff actions into a single workflow.
Overview
PromptIQ helps you:
- score a prompt for clarity, specificity, actionability, and scope
- optimize a prompt into a clearer, more structured version
- estimate token usage and approximate cost before sending it
- keep a local history of optimized prompts for reuse
- copy the result or send it directly to Copilot Chat from inside VS Code
Current features
Implemented
- Sidebar-based prompt composer and analyzer UI
- Prompt scoring with actionable improvement suggestions
- Prompt optimization with structured output and rationale
- Token and cost estimation helpers
- Local prompt history persistence
- Developer logging and debug support
- Standalone webview development workflow for UI iteration
- Automated tests for the prompt engine logic
Planned / roadmap
- Chat participant support inside Copilot Chat
- MCP server integration for Claude Code and Cursor workflows
- Multi-provider model abstraction for OpenAI, Anthropic, Google, and VS Code LM
- Shared prompt libraries and richer analytics for team use
Project structure
- src/extension/ — extension activation, commands, and webview bridge
- src/services/ — scoring, optimization, history, logging, and supporting logic
- src/shared/ — shared message contracts between the extension host and webview
- src/webview/ — React-based sidebar UI and rendering entry points
- src/test/ — automated tests for the core engine behavior
- webview-dev/ — standalone dev server for the webview outside VS Code
- media/ — icons and static assets for the extension
Installation
- Install dependencies:
- Build the extension:
- Launch the extension from VS Code using the Run Extension debug configuration
Development workflow
- npm run compile — bundle the extension and webview, then run TypeScript compilation
- npm run dev:webview — start the standalone webview dev server for local UI work
- npm run build:webview — build the webview bundle only
- npm run test — compile and run the test suite
- npm run vscode:prepublish — prepare the extension for packaging/publishing
Extension commands
The extension contributes the following commands:
- PromptIQ: Open Sidebar
- PromptIQ: Optimize Prompt
- PromptIQ: Copy Optimized Prompt
- PromptIQ: Send to Copilot Chat
- PromptIQ: Send to PromptIQ
- PromptIQ: Toggle Developer Mode
- PromptIQ: Open Developer Log
Configuration
PromptIQ supports the following settings:
- promptiq.defaultModel — default model name used for recommendations
- promptiq.enableHistory — enable or disable local prompt history persistence
- promptiq.developerMode — enable developer logging for debugging
Architecture at a glance
The extension is split into three main layers:
- Extension host — registers commands, manages state, and communicates with the webview
- Services — contain the prompt scoring, optimization, token, cost, and history logic
- Webview UI — renders the sidebar experience in React inside a VS Code webview
This separation keeps the core prompt logic testable and independent from the VS Code UI layer.
Testing
The project uses Node’s built-in test runner against the compiled TypeScript output. The current suite validates core scoring, optimization, token estimation, and cost logic.
Roadmap
PromptIQ is currently positioned as a Phase 1-style MVP centered on prompt intelligence and handoff flows. The next logical steps are:
- expand the experience into a richer Copilot Chat participant integration
- add MCP-based workflows for other AI tools
- introduce model-provider abstraction and comparison features
- grow toward team templates, analytics, and shared prompt libraries