The PromptGuard VS Code extension highlights unprotected LLM SDK calls in your code and provides quick fixes to add protection.
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (Cmd/Ctrl + Shift + X)
- Search for “PromptGuard”
- Click Install
From Command Line
From VSIX
Download from GitHub Releases:Features
Inline Diagnostics
Unprotected LLM calls are highlighted with squiggly underlines:- Red (Error): Unprotected calls in production code
- Yellow (Warning): Calls in potentially sensitive files
- Blue (Info): Protected calls (informational)
Hover Information
Hover over a highlighted call to see:- Provider name (OpenAI, Anthropic, etc.)
- Whether it’s protected
- Link to fix or learn more
Quick Fixes
Click the lightbulb or pressCmd/Ctrl + . to see fixes:
Problems Panel
All findings appear in the Problems panel (Cmd/Ctrl + Shift + M):Status Bar
The status bar shows protection status:- Protected — All LLM calls are secured
- 3 unprotected — Click to see findings
- Scanning… — Analysis in progress
Configuration
Settings
Open Settings (Cmd/Ctrl + ,) and search for “PromptGuard”:settings.json
Workspace Settings
Create.vscode/settings.json in your project:
Commands
Access via Command Palette (Cmd/Ctrl + Shift + P):Supported Languages
Supported Providers
The extension detects calls to:- OpenAI
- Anthropic
- Google AI (Gemini)
- Cohere
- AWS Bedrock
- Azure OpenAI (detected via the OpenAI patterns —
AzureOpenAIis a recognised class name)
The list comes from
sdk-patterns.json, which the extension and the CLI both read. Mistral and Groq were previously listed but have never been in it, so the extension has never detected them.Ignoring Findings
Inline Comment
File-level Ignore
Via Settings
Add topromptguard.exclude:
Integration with CLI
The extension uses the same detection engine as the CLI. If you have the CLI installed, the extension will use it for scanning:Troubleshooting
Extension not activating
Extension not activating
Check:
- Is the file a supported language (.py, .ts, .js)?
- Is
promptguard.enableset totrue?
- Reload window: Cmd/Ctrl + Shift + P → “Reload Window”
- Check Output panel for errors: View → Output → PromptGuard
Findings not showing
Findings not showing
Check:
- Is the file excluded in settings?
- Does the file have LLM SDK imports?
- Run “PromptGuard: Scan Current File” manually
- Check the Problems panel (Cmd/Ctrl + Shift + M)
Too many findings / false positives
Too many findings / false positives
Solutions:
- Add test directories to
promptguard.exclude - Use
# promptguard-ignorecomments - Lower severity to
information
Performance issues
Performance issues
Solutions:
- Disable
scanOnSavefor large projects - Add
node_modules,.venvto exclude list - Install CLI for faster native scanning
Telemetry
The extension collects anonymous usage data to improve the product:- Extension activation events
- Command usage counts
- Error reports (no code content)
Changelog
v0.2.1 (February 2026)
- Added AWS Bedrock provider detection
- Improved TypeScript parsing
- Fixed false positives in JSX
v0.2.0 (January 2026)
- Quick fix actions
- Status bar indicator
- Workspace scanning
v0.1.0 (December 2025)
- Initial release
- Python and JavaScript support
- Inline diagnostics
Contributing
The extension is open source:- Repository: github.com/promptguard/vscode
- Issues: Report bugs or request features
- Pull Requests: Contributions welcome
Next Steps
CLI Tool
Scan from command line
GitHub Scanner
Scan repos on push and PR
Python SDK
Runtime protection
Node.js SDK
JavaScript protection