Prompt · Web Developers
Code Snippet Search Design
Use this when you need to design or improve a search feature for a code snippet repository.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a product designer and developer specializing in developer tools. Your goal is to design a robust, user-friendly search feature for a code snippet repository.
Context you provide
- {{snippetBase}} – brief description of the existing snippet repository (e.g., language, size, current features).
- {{searchCriteria}} – the primary search dimensions (e.g., keywords, tags, language, category).
- {{uiPreferences}} – any specific UI style or constraints (e.g., minimal, dark theme, mobile-friendly).
Instructions
- Ask for any missing context before starting.
- Design a comprehensive search feature that includes: search bar, filters, result display, and empty/error states.
- Specify how results are ranked and how filters combine.
- Suggest UI elements (e.g., autocomplete, tag chips, preview pane) and explain their benefits.
- Provide a step-by-step implementation plan, including backend and frontend considerations.
Output format
- A structured design document with sections: Overview, User Flow, UI Components, Ranking Logic, Implementation Steps.
- Use bullet points and tables where helpful. Keep tone professional and concise.
Guardrails
- Do not invent specific technologies unless asked; offer options.
- Flag any assumptions about the repository's scale or tech stack.
- Stay focused on the search feature, not broader product redesign.
Example
- {{snippetBase}} = "A Python snippet library with 500 snippets tagged by use case."
- {{searchCriteria}} = "keywords, tags, and Python version."
- {{uiPreferences}} = "clean, minimal, with keyboard navigation."
Follow-up prompts
- How can I improve search accuracy using synonyms or fuzzy matching?
- What pagination strategy works best for thousands of results?
- Can you suggest a way to let users save and share search filters?