VS Code Extension — v0.0.3
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.
➜ Generated prompt includes matched project context, file boundaries, ASCII directory tree, and verification steps.
Core Idea
In compiler design, source code is transformed into an Intermediate Representation before final output. PromptIR applies that same idea to developer intent.
A short or messy request — "fix this function", "clean this module up", or a pasted stack trace.
Gathers editor text, diagnostics, related files, and Graphify relationship maps. Your chosen AI provider produces a structured prompt.
A context-rich, structured instruction with file boundaries, ASCII directory trees, verification steps, and architecture-aware constraints.
Workflow
The PromptIR sidebar is designed for repeated refinement without leaving the editor. Generate, preview, edit, and copy — all in one view.
Launch PromptIR from the VS Code secondary sidebar or run PromptIR: Open Chatbox from the command palette.
Choose from 11 intent presets — optimize, plan, debug, explain, refactor, review, and more.
Type a rough goal or paste error output. PromptIR gathers editor text, diagnostics, related files, and Graphify relationships automatically.
Your configured AI provider produces a structured prompt. Edit it in the preview, then copy and paste it into any coding agent.
Presets
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.
Rewrites a rough goal into a detailed, step-by-step agent prompt with file boundaries, ASCII directory-tree guidance, and readability constraints.
Locks the downstream agent into Structural Planning Mode — forbids code edits until folder layout, dependencies, and contracts are designed.
Generates 3–5 clarifying questions before a full prompt is written so ambiguous goals get sharpened first.
Uses the VS Code Problems panel diagnostics to prepare a focused debugging prompt with safe fix ordering.
Combines pasted build, test, or terminal output with workspace context to trace root causes.
Asks the agent for architecture, responsibilities, dependencies, data flow, risks, and a practical reading order.
Prepares behavior-preserving refactor prompts focused on cleanup, naming, structure, type clarity, and tests.
Creates code-review prompts that prioritize correctness bugs, edge cases, regressions, security issues, and missing tests.
Gathers component, style, and theme context for frontend improvement prompts with accessibility and responsive checks.
Creates a compact project map so external agents understand the codebase before their first edit.
Looks for unsafe input handling, auth risks, expensive paths, async pitfalls, and missing tests.
AI Backend
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.
Uses the native VS Code LM API. Works if Copilot is installed and authorized. No configuration required.
Bring your own API key. Configure model selection (gpt-4o, gpt-4o-mini, etc.) in VS Code settings.
Graphify Integration
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.
Rebuilds the relationship graph incrementally on file saves so context stays current.
Control how many connected nodes Graphify pulls into context (default: 5, configurable in settings).
If Graphify is not installed, PromptIR continues working with editor, file, and diagnostics context — no hard dependency.
Privacy
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.
Get Started
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)