prompt-middleware is a lightweight VS Code extension that helps you refine prompts in Copilot Chat using consistent, project-specific guidelines.
- Define prompt and code style guidelines in version-controlled Markdown files.
- Auto-refine Copilot prompts by typing
@refine [your prompt]in Ask mode. - Automatically attaches your guidelines to the refined prompt as context.
- Clears previous messages for a clean, focused chat session.
- Add these two files to your project:
/context/prompt-guidelines.md/context/code-guidelines.md
- Open GitHub Copilot Chat in VS Code.
- Switch to Ask mode.
- Type a message like:
@refine create a function to validate email input - The extension will:
- Rewrite your prompt based on your guidelines.
- Reset the chat with the improved prompt prefilled.
- Attach your
code-guidelines.mdas context.
- Avoid repeating your tone, style, or tech stack in every prompt.
- Enforce consistent standards across a project or team.
- Speed up your workflow with reusable, editable guidelines.
Install from the VS Code Marketplace →
This extension has no configuration options at the moment.
Your project must include:
/context/prompt-guidelines.md/context/code-guidelines.md
prompt-middleware © 2025 by Erik Nogueira Kückelheim
Licensed under CC BY-NC 4.0
Contributions are welcome!
If you'd like to improve this extension, follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/my-feature) - Make your changes
- Commit and push (
git commit -am 'Add my feature' && git push origin feature/my-feature) - Open a pull request
Please keep changes focused and include a short explanation of what you did. Feel free to open an issue if you want to discuss a feature or bug first.
