Reference

VS Code extension

Version 2.0.0. The extension runs the PromptFlow Engine in-process: no server, no Python, no model calls. It is distributed as a .vsix package; it is not on the Visual Studio Marketplace yet.

Install

shell
git clone https://github.com/vijayrajpalanisamy88/Prompt.git && cd Prompt
corepack enable && pnpm install
pnpm --filter ide-extension build
cd apps/vscode-extension && pnpm exec vsce package --no-dependencies
code --install-extension ide-extension-2.0.0.vsix

What it does

  • Optimize sidebar: paste a prompt and run the staged pipeline with token and estimated cost savings.
  • Codebase → Prompt: describe a task and generate a prompt with the relevant files from your workspace as context.
  • Privacy guard: before sending to AI Chat, scans for credentials and personal data. Modes: strict (block), redact (default, replace with placeholders), warn (ask).
  • Status bar: the last optimization result; click to re-run.
  • Copilot agent mode: on activation it registers the bundled MCP server in .vscode/mcp.json (requires node on PATH). See MCP server.

Commands

  • PromptFlow: Optimize Prompt
  • PromptFlow: Validate Prompt
  • PromptFlow: Compare Original vs Optimized
  • PromptFlow: Copy Optimized Prompt
  • PromptFlow: Generate Prompt from Codebase
  • PromptFlow: Generate Prompt from Selection

Settings

SettingDefaultPurpose
promptflow.mcpServerCommand"node"Advanced: overrides the command used to launch the external MCP server registered for GitHub Copilot Agent mode (.vscode/mcp.json). The sidebar and PromptFlow: commands don't use this — they run in-process. Leave unset to use the bundled server.
promptflow.mcpServerArgs[]Advanced: arguments for promptflow.mcpServerCommand. Leave unset to use the bundled server.
promptflow.defaultProvider"gpt"Provider used for token estimation when none is specified.
promptflow.codebaseMaxFiles2000Maximum number of files scanned per Codebase → Prompt run, before relevance filtering.
promptflow.codebaseMaxRelevantFiles12Maximum number of files included as relevant context in a generated prompt.
promptflow.privacy.enabledtrueScan prompts for sensitive data (credentials, PII, cloud secrets) before they're sent to AI Chat or copied for that purpose.
promptflow.privacy.mode"redact"How PromptFlow reacts when sensitive data is detected in an outbound prompt.
promptflow.privacy.exclusions[]Exact substrings that should never be treated as sensitive (e.g. a shared team email alias).
promptflow.privacy.customPatterns[]Additional organization-specific sensitive-data patterns, detected alongside the built-in ones.

Changes in 2.0

  • The analysis, optimization, and privacy detectors now come from the shared engine, the same code as the website, CLI, and MCP server.
  • Code blocks, inline code, and quoted text inside prompts are never modified by optimization.
  • Prompt-injection matches are reported as critical issues but no longer block optimization.
  • GPT token counts use o200k_base (GPT-4o family). Claude, Gemini, and Bedrock counts are labeled approximate.
  • New MCP tools: evaluate_prompt, compare_prompts, scan_prompt_security.