# AI Prompts Directory This directory contains reusable prompt templates for common development tasks with AI coding assistants. ## Available Prompts | Prompt | Purpose | Use When | | -------------------------------- | ------------------------------- | ---------------------------------- | | [code-review.md](code-review.md) | Code review against standards | Reviewing new code or PRs | | [refactoring.md](refactoring.md) | Refactor code to meet standards | Improving existing code | | [new-feature.md](new-feature.md) | Implement new features | Adding functionality | | [debugging.md](debugging.md) | Debug issues | Fixing bugs or unexpected behavior | ## How to Use ### 1. Read the Relevant Prompt File Each prompt file contains: - General template - Language-specific variations - Examples - LazyVim workflows - Tips and best practices ### 2. Customize for Your Needs Copy the template and fill in: - Your specific code/issue - Language and context - Requirements and constraints ### 3. Use with Your AI Assistant - **Claude.ai**: Paste prompt in chat - **Claude Code**: Reference in command - **GitHub Copilot**: Use in comments - **Cursor**: Use in chat - **Continue.dev**: Use slash commands ## Quick Examples ### Code Review ``` Please review this code following .ai/context/AGENTS_GO.md: [paste Go code] Check: - Interface/concrete pattern - Error handling - Test coverage ``` ### Refactoring ``` Refactor this Python code to add type hints per .ai/context/AGENTS_PYTHON.md: [paste Python code] Requirements: - Pass mypy strict mode - Use Pydantic models - Update tests ``` ### New Feature ``` Implement a caching layer following .ai/context/AGENTS_GO.md: Requirements: - Accept Cache interface - Functional options for config - TTL support - Table-driven tests ``` ### Debugging ``` Debug this TypeScript error: [code + error] Check against .ai/context/AGENTS_TYPESCRIPT_VUE.md: - Are types correct? - Is Composition API proper? ``` ## Prompt Engineering Tips ### Be Specific ❌ "Fix this code" ✅ "Refactor this to follow the 'accept interfaces, return concrete' pattern from .ai/context/AGENTS_GO.md" ### Reference Standards Always point to the relevant AGENTS file: - `.ai/context/AGENTS_GO.md` - `.ai/context/AGENTS_PYTHON.md` - `.ai/context/AGENTS_TYPESCRIPT_VUE.md` - `.ai/context/AGENTS_POWERSHELL.md` - `.ai/context/AGENTS_BASH.md` ### Include Context Provide: - Language/framework versions - Environment (dev/prod) - Error messages (complete) - What you've tried ### Request LazyVim Help Ask for editor workflow from `.ai/context/EDITORS.md`: - Keybindings to use - Available snippets - LSP actions - Which-key commands ### Ask for Tests Always request tests following patterns: - Table-driven (Go) - Parametrized (Python) - Component tests (Vue) - Pester (PowerShell) ## Multi-Turn Conversations ### Start Broad ``` I need to implement user authentication. What approach should I take following .ai/context/AGENTS_*.md patterns? ``` ### Get Specific ``` Great, now implement the JWT token service in Go following those patterns. ``` ### Iterate ``` Add tests for the edge cases you mentioned, following the table-driven pattern. ``` ### Refine ``` Show me the LazyVim workflow for debugging this with DAP. ``` ## Combining Prompts You can combine multiple prompt types: ``` 1. Review this code against standards (code-review.md) 2. If issues found, refactor to fix (refactoring.md) 3. Add the caching feature (new-feature.md) 4. Help debug the timeout issue (debugging.md) ``` ## Language-Specific Workflows ### Go Development 1. **New Feature**: Use new-feature.md template - Request interfaces + concrete types - Functional options - Table-driven tests 2. **Review**: Use code-review.md - Check interface pattern - Verify error handling - Confirm context usage 3. **Debug**: Use debugging.md - Check for race conditions - Verify defer usage - Test with `-race` flag ### Python Development 1. **New Feature**: Use new-feature.md - Request type hints - Pydantic models - Async patterns 2. **Review**: Use code-review.md - Run mypy check - Verify uv usage - Check docstrings 3. **Refactor**: Use refactoring.md - Add missing type hints - Convert to async - Add Pydantic validation ### Vue/TypeScript Development 1. **New Feature**: Use new-feature.md - Composition API - Typed props/emits - Composables 2. **Review**: Use code-review.md - Check TypeScript strict - Verify reactivity - Component structure 3. **Debug**: Use debugging.md - Reactivity issues - Type errors - Props/emits ### PowerShell Development 1. **New Feature**: Use new-feature.md - Multi-subscription - Graph API - Error handling 2. **Review**: Use code-review.md - Check Graph usage - Verify error handling - Approved verbs 3. **Refactor**: Use refactoring.md - Replace loops with Graph - Add error handling - Update tests ## Tool-Specific Usage ### Claude.ai ``` 1. Upload relevant AGENTS_*.md file to Project 2. Use prompt templates 3. Reference uploaded files ``` ### Cursor ``` 1. Keep AGENTS files open in workspace 2. Use prompts in Cmd+K or chat 3. Reference .ai/context/ files ``` ### Continue.dev ``` 1. Use slash commands with prompts 2. /standards - Show all standards 3. Reference in @files ``` ### GitHub Copilot ``` 1. Use prompts in comments 2. Reference patterns in code 3. Keep AGENTS files open ``` ## Creating New Prompts To add a new prompt template: 1. Copy existing template structure 2. Add language-specific variations 3. Include examples 4. Reference AGENTS\_\*.md patterns 5. Add LazyVim workflow 6. Update this README ## Feedback Improve these prompts: 1. Use them with AI assistants 2. Note what works/doesn't 3. Submit updates 4. Share variations ## Additional Resources - [General Instructions](../instructions.md) - [LazyVim Setup](../context/EDITORS.md) - [Go Patterns](../context/AGENTS_GO.md) - [Python Patterns](../context/AGENTS_PYTHON.md) - [TypeScript/Vue Patterns](../context/AGENTS_TYPESCRIPT_VUE.md) - [PowerShell Patterns](../context/AGENTS_POWERSHELL.md) - [Bash Patterns](../context/AGENTS_BASH.md) ## Version History - 2024-01-24: Initial version