Prompt Library
This directory contains reusable prompts for working with LLMs on software projects. Each prompt is designed to invoke a specific mode or perspective from the LLM.
Available Prompts
π Customizable Templates
- llm-coding-templates.md - Battle-tested, customizable prompt templates
- Safe Engineering - Default prompt for production-safe coding
- Bug Discovery - Read-only, adversarial bug hunting
- Bug Fixing - Surgical, minimal fixes for specific bugs
- Confidence Sweep - Post-fix stability validation
- UX Bug Discovery - UI/UX-focused bug hunting
- UX Confidence Sweep - UX stability validation
- Product Tester - Role-based product evaluation
- Systematic Bug Scan - Comprehensive checklist-based detection
Each template has
[CUSTOMIZE]sections to fill in for your specific codebase.
π€ Agent Workflows
- project-bootstrap.md - Bootstrap a new project with Safe Vibe Coding infrastructure
- Use when: Starting a new project or onboarding an agent to a repository
- Focus: Documentation foundation, directory structure, prompt library, CI setup
- Creates: README, ARCHITECTURE.md, INVARIANTS.md, ROADMAP.md, prompts/
- feature-implementation.md - Autonomous feature implementation with verification loops
- Use when: Implementing features from roadmap/plan documents
- Focus: Gap analysis, structured implementation, mandatory verification, progress tracking
Engineering & Development
- engineering-prompt.md - Production-grade code with conservative, proven patterns
- Use when: Building new features, writing production code
- Focus: Maintainability, modularity, security, respecting architecture
- architecture-aware-feature.md - Add features safely while respecting architecture
- Use when: Extending existing systems with new functionality
- Focus: Architecture alignment, invariant compliance, minimal surface area
- modularity-review.md - Review code for modularity issues and recommend restructuring
- Use when: Files are growing large (> 1,500 lines) or becoming hard to understand
- Focus: File size, single responsibility, interface clarity, AI-compatibility
- refactor-for-clarity.md - Improve code readability without changing behavior
- Use when: Code works but is hard to understand
- Focus: Clarity, simplicity, maintainability
Quality & Testing
- bug-hunt.md - General proactive bug detection after changes
- Use when: After implementing features or significant changes
- Focus: Logic errors, edge cases, security, invariant violations
- backend-bug-hunt.md - Backend-specific bug detection
- Use when: After backend/API changes
- Focus: Data integrity, auth, SQL injection, race conditions, API contracts
- frontend-bug-hunt.md - Frontend-specific bug detection
- Use when: After UI/client-side changes
- Focus: State management, forms, async operations, accessibility, UX
- bug-fixing.md - Surgical bug fixes without scope creep
- Use when: Fixing specific bugs
- Focus: Minimal changes, root cause fixes, no refactoring
- root-cause-isolation.md - Debug elusive bugs that evade normal fixes
- Use when: Same error appears in multiple locations, defensive fixes arenβt working
- Focus: Stack trace analysis, data flow tracing, complexity layer isolation
- Key technique: Remove optimization layers (virtualization, memoization, caching) to isolate
- invariant-check.md - Verify changes against system invariants
- Use when: Before merging significant changes
- Focus: Contract compliance, detecting violations, maintaining guarantees
- performance-review.md - Identify performance bottlenecks and optimization opportunities
- Use when: Performance issues suspected or pre-launch optimization
- Focus: Database, algorithms, caching, memory usage
User Experience
- user-feedback-simulation.md - Simulate user testing to find UX issues
- Use when: Testing new features or flows
- Focus: Usability, confusion, friction, accessibility
How to Use These Prompts
- Copy the entire prompt (including context and instructions)
- Fill in the placeholders (marked with [brackets])
- Paste into your LLM conversation
- Provide the code/context the LLM needs to review
Creating Your Own Prompts
When creating project-specific prompts:
- Be explicit about the role: βYou are a [role] doing [task]β
- Provide constraints: What should/shouldnβt be changed
- List specific checks: Concrete things to look for
- Define output format: How results should be structured
- Include examples: Show what good output looks like
Prompt Naming Convention
Use descriptive, action-oriented names:
[action]-[target].md(e.g.,review-api-contracts.md)[role]-prompt.md(e.g.,frontend-engineer-prompt.md)[mode]-mode.md(e.g.,debug-mode.md)
Contributing New Prompts
Found a prompt pattern that works well? Add it here:
- Create a new
.mdfile with a clear name - Follow the structure of existing prompts
- Update this README with a brief description
- Test it on your project first
Best Practices
- Be specific: Vague prompts get vague results
- Iterate on prompts: Refine based on what works
- Version your prompts: Track what changes you make
- Share what works: If a prompt is effective, document why
Language-Specific Prompts
As your project grows, consider creating:
python-engineering.md(Python-specific patterns)react-bug-hunt.md(React-specific issues)sql-performance.md(Database-specific optimization)
Keep them in subdirectories if you have many:
prompts/
βββ general/
βββ python/
βββ javascript/
βββ sql/
Table of contents
- Engineering Prompt
- Bug Hunt
- Backend Bug Hunt
- Frontend Bug Hunt
- Bug Fixing
- Performance Review
- Root Cause Isolation
- Architecture-Aware Feature
- Modularity Review
- Refactor for Clarity
- Invariant Check
- User Feedback Simulation
- LLM Coding Prompt Templates
- Code Review
- Feature Implementation Workflow
- Project Bootstrap for Agents
- Setup Code Review Pipeline
- Smart Contract Audit