Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>RefyneNew to Visual Studio Code? Get it now.
Refyne

Refyne

Mohd Sabahat

| (0) | Free
| Sponsor
Refyne rewrites weak or rushed prompts into clear, context-engineered prompts that follow prompting best practices. Works with VS Code's built-in language models, Google Gemini, NVIDIA NIM, and OpenRouter.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Refyne

Refyne

Rewrite rough, rushed prompts into clear, context-engineered ones — right in your editor.

VS Code Marketplace Installs Rating CI License: MIT


Refyne turns a rough, rushed prompt into a clear, context-engineered prompt that follows modern prompting best practices.

With usage-based billing on AI coding assistants, a vague prompt costs real money in wasted round-trips. Refyne rewrites your draft once, locally in your editor, so the prompt you actually send is specific, well-scoped, and token-efficient.

[!IMPORTANT] Using the VS Code Language Model provider consumes your GitHub Copilot (GHCP) request quota / premium-model credits. Refyne calls the same vscode.lm models your IDE exposes, so each enhancement counts as a Copilot request and a premium model (Opus, GPT‑4, …) burns premium credits. Refyne warns before you pin a premium model and otherwise auto-picks the cheapest capable one — but if you want zero Copilot usage, switch to a keyed provider (Gemini / NVIDIA NIM / OpenRouter). See Provider cost & credits.

Features

  • Enhance a selection — highlight a prompt, run the command, get a rewrite.
  • Enhance from input — paste any prompt into a box without touching a file.
  • @enhance chat participant — type @enhance <prompt> in the Chat view. Each message is rewritten in isolation: prior turns are never re-sent, so a dedicated chat stays cheap and predictable.
  • UI panel + status bar — a dockable panel (status bar $(wand) icon) to enhance prompts, switch provider/model from dropdowns, and browse your full, paginated history (compact rows that expand on click). The header shows the exact provider/model in use and updates live, with an inline alert when a provider isn't configured.
  • Adaptive status bar — show the icon and name, icon only (compact), or hide it entirely via promptEnhancer.statusBar.label.
  • Output logs — a "Refyne" Output channel records every run (model + tokens) and errors. Open via Refyne: Show Logs.
  • Multiple providers — pick whichever LLM backend you want:
    • VS Code Language Model (vscode.lm.selectChatModels) — reuses models you already have (e.g. GitHub Copilot). No API key required, but it spends your Copilot quota (see the note above). You choose the exact model, and Refyne warns before committing to a premium / usage-billed one. If you don't pin a model, it auto-selects the cheapest capable one (skipping weak *-mini models that tend to echo the input). Estimated AI-credit cost is shown in the picker, header, and history.
    • Google Gemini — via the Generative Language REST API.
    • NVIDIA NIM — via its OpenAI-compatible endpoint.
    • OpenRouter — OpenAI-compatible aggregator across many vendors.
  • Token transparency — every enhancement records the model used and token usage reported by the provider (estimated for VS Code LM).
  • Flexible output — new document, replace selection, or clipboard.
  • Secure keys — API keys live in VS Code's encrypted SecretStorage, never in settings.json.

Install

  • Marketplace: search "Refyne" in the Extensions view, or install from the Marketplace.
  • CLI: code --install-extension mohd-sabahat.refyne
  • From a .vsix: download from Releases and run code --install-extension refyne-*.vsix.

Usage

  1. Pick a provider: run Refyne: Select Active Provider (default is the VS Code Language Model, which needs no key — but uses Copilot credits).
  2. Pick a model / add a key:
    • VS Code LM: run Refyne: Select VS Code Model and choose a model (cheaper models recommended; you'll be warned on premium ones).
    • Gemini / NVIDIA NIM / OpenRouter: run Refyne: Set Provider API Key.
  3. Enhance any of these ways:
    • Select prompt text and press Ctrl+Alt+P (Cmd+Alt+P on macOS).
    • Run Refyne: Enhance Prompt (Type or Paste).
    • @enhance your rough prompt in the Chat view.
    • Open the panel (status bar $(wand) Refyne) and enhance there.

Provider cost & credits

Provider API key Cost model
VS Code Language Model None Spends your GitHub Copilot quota. Premium models (Opus, GPT‑4, …) consume premium requests; cheaper models consume base requests.
Google Gemini Required Billed to your Google AI / Gemini API key.
NVIDIA NIM Required Billed to your NVIDIA NIM endpoint.
OpenRouter Required Billed to your OpenRouter account, per model.

Want zero Copilot usage? Select Gemini, NVIDIA NIM, or OpenRouter as your active provider and add that provider's key — VS Code LM is then never called.

Commands

Command Description
Refyne: Enhance Selected Prompt Rewrite the current editor selection.
Refyne: Enhance Prompt (Type or Paste) Rewrite a prompt entered in an input box.
Refyne: Open Panel Open the UI panel (enhance + history).
Refyne: Select Active Provider Switch between VS Code LM, Gemini, NVIDIA NIM, OpenRouter.
Refyne: Select VS Code Model Choose the VS Code LM model (with cost warning).
Refyne: Set Provider API Key Store an API key for a keyed provider.
Refyne: Clear Provider API Key Remove a stored API key.
Refyne: Show Logs Open the Refyne Output channel.

Settings

Setting Default Description
promptEnhancer.statusBar.label iconAndName Status bar appearance: iconAndName, iconOnly, or hidden.
promptEnhancer.provider vscode-lm Active provider.
promptEnhancer.output newDocument Where the enhanced prompt goes.
promptEnhancer.temperature 0.3 Sampling temperature (lower = more deterministic).
promptEnhancer.confirmExpensiveModels true Warn before selecting a premium VS Code model.
promptEnhancer.gemini.model gemini-1.5-flash Gemini model id.
promptEnhancer.nvidiaNim.model meta/llama-3.1-70b-instruct NIM model id.
promptEnhancer.nvidiaNim.baseUrl https://integrate.api.nvidia.com/v1 NIM endpoint base URL.
promptEnhancer.openRouter.model openai/gpt-4o-mini OpenRouter model id.
promptEnhancer.openRouter.baseUrl https://openrouter.ai/api/v1 OpenRouter endpoint base URL.
promptEnhancer.vscodeLm.selector {} Selector for vscode.lm.selectChatModels() (set via command).

History is stored locally in the extension's global state (last 500 enhancements) and never leaves your machine.

Development

npm install
npm run watch        # incremental compile
# Press F5 in VS Code to launch the Extension Development Host

npm run lint         # eslint
npm run icon         # regenerate images/icon.png from images/icon.svg
npm run vsce:package # build a .vsix

See docs/ARCHITECTURE.md for the design, docs/PROVIDERS.md for adding a provider, and docs/ICON_PROMPT.md for the icon brief.

Contributing

Issues and PRs welcome at github.com/mohdsabahat/refyne. CI runs lint + type-check on every push and pull request.

Author

Mohd Sabahat — mohd.sabahat123@gmail.com

License

MIT — see LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft