Optimize prompts, use local memory/cache, forecast credits, and send to Copilot only when you choose.
The compressor removes noise and shortens English only when intent stays intact.
Local steps run before Copilot sees anything:
Switch via the status-bar item, the sidebar dropdown, or @promptoptimizer /mode <name>.
Optimize locally, open Copilot Chat, and submit the optimized prompt. No @promptoptimizer prefix.
Show analysis, cache status, credit forecast, and optimized prompt. You decide when to send.
Open Chat with @promptoptimizer <your prompt> prefilled. You hit Enter.
| Mode | Status bar label | Behaviour |
|---|---|---|
| Optimize only (default) | $(wand) Proxy [Optimize] | Show analysis & optimized prompt. No send. |
| Agent | $(robot) Proxy [Agent] | Optimize, then open Copilot Chat with the optimized prompt and submit it directly. |
| Direct send | $(comment-discussion) Proxy [Direct] | Open Chat panel with @promptoptimizer pre-filled. |
Switch any time by clicking the label → QuickPick · or the sidebar dropdown · or @promptoptimizer /mode agent|optimize|direct.
Slash roles add the right checklist and tone. Without a slash, skills are scored from intent, files, and keywords.
Workspace skills live in .promptoptimizer/skills/*.md. Global skills can come from PROMPT_OPTIMIZER_SKILLS_DIR.
id, label, readOnlyslashAliases, intentPatterns, keywordsrequires, filePatterns, priority, tagsrolePreface as scalar or block (|)checklist as frontmatter items or markdown bullets under ## ChecklistSkill files hot-reload on the next prompt. Diagnostics: Prompt Optimizer: Diagnose Skill Loading Errors.
The Agents chip manages bundled and custom workspace agents.
Enabled agents are copied into .promptoptimizer/skills/ — customize them like any other skill.
Press ▶ Play tour to spotlight each control. Click a control to jump, or step with ‹ Prev / Next ›.
Refactor auth middleware → async/await. Add Jest unit tests for token validation, expiry, and error paths. Files: src/auth/*.ts. Cache: 71% hit.
Open it from the Chat sidebar or status bar. Chips are shortcuts:
AGENTS.md / CLAUDE.md / .promptoptimizer/memory.md.@promptoptimizerIn the VS Code Chat panel just type:
@promptoptimizer refactor the auth middleware to use async/await
Messages are optimized before Copilot receives them.
Up to 12 turns per workspace are remembered, so “now add tests for it” can reference the prior task.
Real-time local index view. Letters and digits are masked as •; click a row to open the real source.
Panels use local counts and timestamps, rendered as abstract shapes so content stays private.
— nodes · workspace, memory files & cache entries cross-linked.
— embeddings indexed locally.
— commits in the recent window.
—
Saved files, prompt versions, and memory files pass through three local stages.
Workspace memory, git log, README/package metadata, active editors, diagnostics, and recent saves are indexed.
Files stream into the semantic cache (animated).
Tokens, embeddings, conversation turns, and prompt versions are stored in local SQLite/JSON state.
Embedding bricks falling into the SQLite vault.
Prompt arrives → cache lookup → context repacked → optimized payload and forecast are ready. Secrets are warned before send.
Radar sweep finds the matching prompt embeddings.
| Result | What happens |
|---|---|
| Exact match | Returns the cached optimized version instantly. |
| Semantic match ≥ 68% | Returns the cached result and boosts its confidence score. |
| Miss | Optimizes fresh and writes the result to cache for next time. |
Seed sources: git log, Prompt Optimizer history, README.md, package.json, and instruction files. Manage with cache statistics, clear cache, or reset-to-defaults.
| Data processing | 100% on your machine — no cloud backend, no remote API except the Copilot request you approve. |
| Prompt storage | Cached locally in a SQLite file (promptProxy.dbPath). Never uploaded. |
| Secret scanning | API keys and tokens are detected before any network call and blocked with a warning. |
| Telemetry | None. Zero usage or diagnostic data collected. |
| Network calls | Only the GitHub Copilot inference request you explicitly send via the VS Code Chat API. |
| Updates | Settings, cache, memory, prompt versions, and custom agents are preserved across marketplace updates. |
| Open source | github.com/PawanDBalapure/prompt-optimizer — audit it yourself. |
To verify: open out/extension.js or engine/dist/. Search for http, fetch, axios, request — you'll find zero outbound calls outside the Copilot API.
If your prompt contains anything that looks like one of these, a warning appears in the panel before the prompt is sent:
sk-…sk-ant-…ghp_…, ghs_…AKIA…password=, token=, api_key=Manage patterns via the panel ⚙ Secret detection menu — add or remove regex / startsWith / contains rules per workspace.
Prompt Optimizer:| Select Mode (Agent / Optimize / Direct) | Open mode QuickPick |
| Open Chat Participant | Jump to @promptoptimizer in Chat |
| Focus Control Panel | Focus the sidebar panel |
| Open Prompt Optimizer Guide | Reopen this guide any time |
| Optimize Clipboard & Cost Forecast | Optimize whatever is on the clipboard |
| Copy Last Optimized Prompt | Copy the last result to clipboard |
| Send Last Optimized Prompt To Chat | Open Chat with the last result |
| Show Cache Statistics | Entry count, avg confidence, total hits |
| Clear Semantic Cache | Wipe the local SQLite cache |
| Clear Conversation Memory | Reset this workspace's conversation history |
| Reset to Defaults | Choose settings, cache, memory, or custom agents to restore |
| Show Prompt History | QuickPick of prior prompts with diff/restore/send actions |
| Commit / Log / Branch / Tag Prompt | Git-style versioning of prompts |
| List Agent Skills (Modes) | Every registered built-in and custom mode |
| Create / Edit Agent Skill | Create a workspace skill or override a built-in |
| Diagnose Skill Loading Errors | Open files that failed parsing/loading |
| Manage SDLC Agent Skills | Enable/disable/edit/reset bundled agents |
| Setting | Default | Description |
|---|---|---|
| promptProxy.dbPath | (global storage) | Custom path for the SQLite cache file. |
| promptProxy.processingMode | blocking | blocking or non-blocking cache lookup. |
| promptProxy.enableSessionContext | true | Feed recent turns back as session history. |
| promptProxy.pricingInput | 0.0015 | Input cost per 1K tokens (USD). |
| promptProxy.pricingOutput | 0.002 | Output cost per 1K tokens (USD). |
| promptProxy.subscriptionPlan | pro | Monthly credit allowance used by the forecast. |
| promptProxy.forecastRequestsPerDay | 20 | Requests/day used for monthly overage. |
| promptProxy.secretPatterns | [] | Custom scanner rules. |
| promptProxy.versions.author | you | Author name stamped on prompt commits. |
All settings live under File → Preferences → Settings → Extensions → Prompt Optimizer.