Why This Exists
After 7 weeks of building production infrastructure with AI, I’ve collected the prompts that actually work. Not theoretical best practices. Not “AI thought leadership.” Just prompts I use daily. This is a tool, not a tutorial. Copy what you need, adapt for your context, move on. What you’ll find here:- Prompts organized by task type
- Success rates from real usage
- Anti-patterns that waste tokens
- Copy-paste templates
- Philosophical discussions about AI
- Generic “be clear and specific” advice
- Prompts I haven’t tested
How to Use This Library
Each prompt follows the same structure:- Context block - Tells the AI what it needs to know
- Task description - Specific, measurable outcome
- Constraints - What NOT to do
- Output format - Exactly what you want back
Infrastructure Design
ADR-Driven Design
Use case: When you need to make an architectural decision that affects multiple components. Success rate: 92% (23/25 ADRs led to successful implementations) Why it works: Forces AI to think through consequences before suggesting solutions.- If you don’t specify constraints, AI suggests “ideal” solutions requiring infrastructure you don’t have
- If problem statement is vague, AI solves a different problem
Database Schema Design
Use case: Designing DynamoDB single-table schemas with access patterns. Success rate: 88% (7/8 schemas worked without major refactoring) Why it works: Forces you to enumerate access patterns upfront, which is the hard part.- If you don’t list access patterns, AI designs for generic CRUD (which doesn’t match real usage)
- If you add “support future queries” as a requirement, AI over-engineers with 10+ GSIs
API Contract Design
Use case: Defining API routes with permissions and validation. Success rate: 95% (38/40 API designs implemented without breaking changes) Why it works: Specifies authorization and validation upfront, preventing rework.- If you don’t specify permission pattern, AI invents inconsistent naming
- If you skip error response design, AI returns generic 500s for everything
Debugging
Root Cause Analysis
Use case: When you have a bug and need to find the root cause, not just symptoms. Success rate: 78% (14/18 bugs traced to actual root cause) Why it works: Structured investigation prevents jumping to conclusions.- If you let AI jump to fixes before root cause, you fix symptoms not problems
- If error messages are cryptic, AI hallucinates causes based on “similar issues”
Performance Debugging
Use case: System is slow, need to find bottlenecks. Success rate: 71% (5/7 performance issues correctly identified) Why it works: Focuses on measurement before optimization.- Without profiling data, AI suggests random optimizations (caching, async, etc.)
- If you optimize based on intuition, you fix the wrong thing 50% of the time
Code Review
Verification Checklist
Use case: Reviewing AI-generated code before merging. Success rate: 94% (18/19 major bugs caught before production) Why it works: Systematic checklist prevents “looks good to me” reviews.- Event/DB atomicity violation (HIGH)
- PII field encryption missing (HIGH)
- Permission inconsistency (MEDIUM)
- Hallucinated
preferred_namefield (MEDIUM) - Foreign key type mismatch (HIGH)
- If you reuse Builder’s session for verification, bias prevents finding bugs
- If you skip the checklist and just read code, you miss systematic issues
Cross-Entity Consistency
Use case: Reviewing changes that affect multiple related entities. Success rate: 100% (6/6 consistency issues caught) Why it works: Explicitly checks relationships, not just individual entities.account_id: String while Account used id: AccountId(Uuid). Integration tests would have failed. Fixed before merge.
When it fails:
- If entities are reviewed in isolation, cross-entity bugs slip through
- If you don’t have established patterns yet, there’s nothing to check consistency against
Refactoring
Pattern Extraction
Use case: Found repeated code, want to extract reusable pattern. Success rate: 83% (10/12 refactorings improved maintainability) Why it works: Forces you to define the abstraction clearly before extracting.#[derive(DynamoDbEntity)] macro. Reduced to 80 lines, zero bugs.
When it fails:
- If you extract pattern from only 2 usage sites, third site doesn’t fit the abstraction
- If abstraction is more complex than duplication, maintainability decreases
Breaking Change Migration
Use case: Need to make a breaking API/schema change. Success rate: 67% (2/3 migrations went smoothly, 1 caused cascading errors) Why it works: Forces planning BEFORE making the change.- If you make the change first, then fix errors, you get cascading failures
- If you don’t batch related fixes, each fix creates new errors
Documentation
ADR Writing
Use case: Documenting an architectural decision for future reference (and AI consumption). Success rate: 100% (all ADRs written with this template were AI-parseable) Why it works: Structured format AI can extract constraints from.- If you write ADRs like decision logs (narrative prose), AI can’t extract constraints
- If you skip examples, AI misinterprets the pattern
Success Rate Summary
Based on 7 weeks of usage across ~200 prompts:| Category | Success Rate | Notes |
|---|---|---|
| Infrastructure Design | 90% | Fails if constraints are vague |
| ADR-Driven Design | 92% | Best when problem is well-defined |
| Database Schema | 88% | Requires explicit access patterns |
| API Contract | 95% | Fails if permission model not specified |
| Debugging | 75% | Lower because bugs are unpredictable |
| Root Cause Analysis | 78% | Works when reproduction is possible |
| Performance Debugging | 71% | Requires profiling data |
| Code Review | 94% | High when using fresh sessions |
| Verification Checklist | 94% | Catches what tests miss |
| Cross-Entity Consistency | 100% | Always finds inconsistencies if they exist |
| Refactoring | 83% | Depends on pattern clarity |
| Pattern Extraction | 83% | Fails if abstraction is forced |
| Breaking Changes | 67% | Planning works, reactive fixing doesn’t |
| Documentation | 100% | Structured format always works |
| ADR Writing | 100% | AI-parseable by design |
Anti-Patterns (When Prompts Fail)
1. The Vague Requirement
Bad:2. The Unconstrained Fix
Bad:3. The Missing Context
Bad:4. The Reused Session
Bad: Using Builder’s session for verification (to “save tokens”). Why it fails: Verifier inherits Builder’s mental model and biases. Misses bugs. Fix: Always use fresh sessions for verification. The token cost is insignificant compared to production bugs. Lesson: Session state introduces bias. Fresh context catches more issues.5. The Premature Optimization
Bad:Copy-Paste Templates
Planning Template
Implementation Template
Verification Template
Debugging Template
When to Use Which Prompt
Quick decision tree:Metrics from 7 Weeks
Prompts used: ~200 across all categories Token usage:- Planning: ~150k tokens/week
- Implementation: ~500k tokens/week
- Verification: ~180k tokens/week
- Debugging: ~100k tokens/week (spiky)
- Planning: 2-4 hours → 30 minutes (75% reduction)
- Implementation: 3-5 days → 1 day (80% reduction)
- Verification: 2 hours → 30 minutes (75% reduction)
- Debugging: Variable (sometimes faster, sometimes slower)
- Bugs caught in verification: 18
- Bugs shipped to production: 0
- ADR compliance: 100% (after using structured prompts)
- Average cost per feature: $12-15
- Human hours saved per feature: 30-40 hours
- ROI: ~800-900x
Final Advice
Three rules that matter:- Be specific about current state and target state. Vague goals produce vague solutions.
- Constrain the solution space. Tell AI what NOT to do. Prevents hallucination.
- Use fresh sessions for verification. Reused sessions introduce bias. Fresh context catches bugs.
Resources
All prompts in this library are tested on:- Claude Opus 4 (Evaluator role)
- Claude Sonnet 3.5 (Builder/Verifier roles)
- Plan → Implement → Verify Pattern (detailed workflow)
- When AI Fails: Cascading Errors (debugging anti-patterns)
- When AI Excels (what AI is actually good at)
License: Use freely. No attribution required. If it helps, great. If not, ignore it.