prompt-middleware

prompt-middleware is a lightweight VS Code extension that helps you refine prompts in Copilot Chat using consistent, project-specific guidelines.

✨ Features
- 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.
🛠️ Setup
- 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.md as context.
→ See examples
💡 Why use it?
- 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
Install from the VS Code Marketplace →
⚙️ Extension Settings
This extension has no configuration options at the moment.
📋 Requirements
Your project must include:
/context/prompt-guidelines.md
/context/code-guidelines.md
📄 License
prompt-middleware © 2025 by Erik Nogueira Kückelheim
Licensed under CC BY-NC 4.0
🤝 Contributing
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.
| |