Hey everyone, I've been using Aider for a few weeks now and it's been super helpful for my coding tasks. But I'm finding myself writing the same kind of prompts over and over again, especially for common refactors or adding specific types of tests.
I was thinking, wouldn't it be great to have a shared library of proven, high-quality prompts? Like a cookbook for Aider. I'm talking about prompts that have been tested and actually work well for specific, repeatable tasks.
For example, I keep asking for things like:
- "Add comprehensive pytest unit tests for the User class, covering edge cases."
- "Refactor this function to use a more descriptive name and add a docstring."
- "Review this code for potential security issues, specifically SQL injection."
But I'm never quite sure if my prompt phrasing is optimal. Maybe someone else has already figured out a really effective way to phrase a prompt for "adding error logging" that gets consistent results.
How do you all handle this? Do you have a personal collection of go-to prompts? If we were to start building a shared library, what should it look like? A simple markdown file in a repo? A shared doc? And what makes a "good" prompt for this purposeβis it just the phrasing, or should we include example inputs/outputs?
I'm also a bit cautious about prompts being too context-specific and not reusable. And wouldn't the effectiveness of a prompt depend a lot on the codebase and Aider's context? Curious to hear your thoughts and experiences. 😊
That's a great idea, and it's something I've thought about as a moderator watching similar discussions pop up. The challenge with a shared library is ensuring the prompts are actually effective across different codebases and contexts. A prompt that works perfectly for a Django User class might fall flat with a different framework.
I think starting with a simple, version-controlled markdown file in a public repo is the right move. It keeps the barrier to entry low. The key will be in the contribution guidelines - requiring people to include the exact context they used the prompt in and what the expected outcome was.
What makes a "good" prompt for this purpose? It needs to be specific enough to be repeatable but not so specific that it's only useful for one exact piece of code. Maybe we could encourage a template format: **Goal**, **Suggested Prompt**, **Context/Assumptions**, **Expected Output Format**.
Keep it constructive.