VS Code Extension — v0.0.3

Stop paying the context tax.

PromptIR is a context-aware prompt pre-compiler that turns rough developer intent into agent-ready instructions for Claude Code, Copilot, Gemini, Codex, and other coding assistants.

AI Providers
Copilot + OpenAI
Presets
11 Intent Modes
License
MIT — Free
promptir — sidebar
Preset: Optimize Prompt
Raw goal: "fix the auth middleware race condition"
Context: auth/middleware.ts + 3 related files + 0 diagnostics

Generated prompt includes matched project context, file boundaries, ASCII directory tree, and verification steps.

CopyGenerate

Core Idea

Human Intent → IR → Agent Prompt

In compiler design, source code is transformed into an Intermediate Representation before final output. PromptIR applies that same idea to developer intent.

1

Human Intent

A short or messy request — "fix this function", "clean this module up", or a pasted stack trace.

2

PromptIR

Gathers editor text, diagnostics, related files, and Graphify relationship maps. Your chosen AI provider produces a structured prompt.

3

Agent Prompt

A context-rich, structured instruction with file boundaries, ASCII directory trees, verification steps, and architecture-aware constraints.

Workflow

Sidebar-first prompt refinement

The PromptIR sidebar is designed for repeated refinement without leaving the editor. Generate, preview, edit, and copy — all in one view.

01

Open the sidebar

Launch PromptIR from the VS Code secondary sidebar or run PromptIR: Open Chatbox from the command palette.

02

Pick a preset

Choose from 11 intent presets — optimize, plan, debug, explain, refactor, review, and more.

03

Add raw intent

Type a rough goal or paste error output. PromptIR gathers editor text, diagnostics, related files, and Graphify relationships automatically.

04

Generate & copy

Your configured AI provider produces a structured prompt. Edit it in the preview, then copy and paste it into any coding agent.

Presets

11 intent presets for every workflow

Each preset tailors its context-gathering strategy and AI instruction to the task. Pick one, add raw intent, and get a focused prompt in seconds.

Optimize Prompt

General

Rewrites a rough goal into a detailed, step-by-step agent prompt with file boundaries, ASCII directory-tree guidance, and readability constraints.

Implementation Plan

General

Locks the downstream agent into Structural Planning Mode — forbids code edits until folder layout, dependencies, and contracts are designed.

Ask Follow-Up Questions

General

Generates 3–5 clarifying questions before a full prompt is written so ambiguous goals get sharpened first.

Analyze Current Problems

Debugging

Uses the VS Code Problems panel diagnostics to prepare a focused debugging prompt with safe fix ordering.

Diagnose Build Failure

Debugging

Combines pasted build, test, or terminal output with workspace context to trace root causes.

Explain This File

Code

Asks the agent for architecture, responsibilities, dependencies, data flow, risks, and a practical reading order.

Refactor Safely

Code

Prepares behavior-preserving refactor prompts focused on cleanup, naming, structure, type clarity, and tests.

Review For Bugs

Code

Creates code-review prompts that prioritize correctness bugs, edge cases, regressions, security issues, and missing tests.

Improve UI/UX

Specialized

Gathers component, style, and theme context for frontend improvement prompts with accessibility and responsive checks.

Summarize Workspace

Specialized

Creates a compact project map so external agents understand the codebase before their first edit.

Security / Performance Pass

Specialized

Looks for unsafe input handling, auth risks, expensive paths, async pitfalls, and missing tests.

AI Backend

Your model, your key

PromptIR supports two AI providers out of the box. Copilot uses the native VS Code Language Model API — no extra key needed. OpenAI lets you bring your own key and model.

GitHub Copilot

Uses the native VS Code LM API. Works if Copilot is installed and authorized. No configuration required.

Default

OpenAI

Bring your own API key. Configure model selection (gpt-4o, gpt-4o-mini, etc.) in VS Code settings.

API Key

Graphify Integration

Relationship-aware context

When Graphify is installed, PromptIR pulls upstream dependencies and downstream dependents into every prompt. The result: agents understand how files connect, not just what they contain.

Auto-indexing

Rebuilds the relationship graph incrementally on file saves so context stays current.

Configurable depth

Control how many connected nodes Graphify pulls into context (default: 5, configurable in settings).

Best-effort fallback

If Graphify is not installed, PromptIR continues working with editor, file, and diagnostics context — no hard dependency.

Privacy

Context stays local until you generate

PromptIR gathers workspace context locally inside VS Code. Data is only sent to your configured AI provider when you click Generate. If you use Copilot, generation goes through VS Code's language model API. If you use OpenAI, it uses your own API key. Nothing is logged, stored, or shared by PromptIR itself.

No telemetryPromptIR ships with zero analytics or tracking.
No serverEverything runs inside your VS Code process.
Your API keyOpenAI keys are stored in VS Code's secure settings.

Get Started

Ready to write better prompts?

Install PromptIR from the VS Code marketplace. It's free, open source, and works with your existing Copilot subscription or OpenAI key.

Requires VS Code ^1.120.0 · GitHub Copilot or OpenAI API key · Graphify (optional)