I maintain a text file of prompts that I copy-paste regularly. They've been refined over hundreds of uses. Organized by category, here are the 30 I reach for most often.

Debugging (6 prompts)

1. Root Cause Analysis

This error occurs when [describe situation]. Error: [paste].
Analyze the stack trace. What are the top 3 most likely root
causes, ranked by probability? For each, explain why and
suggest a diagnostic step to confirm.

2. Silent Bug Investigation

This function returns wrong results but no errors.
Expected: [X]. Actual: [Y]. Input: [Z].
Walk through the code line by line with this input.
Show me the value of each variable at each step.

3. Performance Diagnosis

This endpoint takes [X]ms. Read the handler and all
functions it calls. Identify the most likely bottleneck.
Don't guess - trace the actual execution path and flag
the operation with the highest time complexity.

4. Race Condition Finder

Read this concurrent code. Identify any potential race
conditions, deadlocks, or ordering dependencies. For each
issue, describe the specific sequence of events that would
trigger it.

5. Memory Leak Spotter

Analyze this module for memory leaks. Look for: event
listeners not removed, closures holding references, growing
caches without eviction, subscriptions not cancelled.
List each finding with the specific line.

6. Regression Identifier

This feature worked before [recent change]. Read the diff
and the affected module. What behavior could the change
have broken? List specific scenarios to test.

Architecture (5 prompts)

7. Design Review

Review this architecture for: single points of failure,
scaling bottlenecks, unnecessary complexity, and missing
error handling. Suggest the simplest change that addresses
each issue.

8. Database Schema Review

Review this schema for: missing indexes on query patterns,
normalization issues, missing foreign keys, and fields
that will cause problems at scale. Be specific about
which queries will be slow and why.

9. API Design Check

Review these API endpoints for: inconsistent naming,
missing pagination, non-idempotent operations that should
be idempotent, missing error responses, and N+1 patterns
in the handlers.

10. Migration Planner

I need to migrate from [A] to [B]. Constraints: zero
downtime, rollback capability, [X] records. Propose a
step-by-step migration plan with rollback procedures
at each step.

11. Dependency Evaluator

I'm considering adding [library] to the project. Evaluate:
maintenance status, bundle size impact, API stability,
alternatives, and whether I could write the needed
functionality in under 100 lines instead.

Testing (5 prompts)

12. Test Suite Generator

Write tests for this function. Cover: happy path, null/
undefined inputs, empty collections, boundary values, error
conditions, and concurrent access if applicable. Each test
gets a descriptive name that explains the scenario.

13. Edge Case Finder

Read this function. List every edge case that isn't tested.
Think about: empty strings, zero, negative numbers, unicode,
very large inputs, concurrent calls, timezone differences,
and null in nested objects.

14. Integration Test Writer

Write an integration test for this API endpoint. Set up
realistic test data, make the request, assert on the
response body AND side effects (database state, sent
emails, emitted events). Clean up after.

15. Test Refactorer

These tests are brittle and slow. Identify: tests coupled
to implementation details, unnecessary setup, tests that
test the same thing, and assertions that are too loose.
Suggest specific improvements.

16. Mocking Strategy

This function depends on [external service]. Write a test
that mocks the dependency. Use the simplest mocking approach
that tests the real behavior. Don't over-mock - if it can
use the real implementation safely, do that.

Code Review (5 prompts)

17. Security Review

Review this code for security issues. Focus on: injection
(SQL, XSS, command), authentication bypass, authorization
gaps, sensitive data exposure, SSRF, and insecure
deserialization. Reference specific lines.

18. Pre-PR Checklist

Review this diff. Check: Does it handle errors? Are there
missing null checks? Are the types correct? Could any
change break existing callers? Is anything hardcoded that
should be configurable? Skip style issues.

19. Performance Review

Review this code for performance. Look for: N+1 queries,
unnecessary allocations in loops, missing database indexes,
synchronous operations that could be parallel, and caching
opportunities.

20. Breaking Change Detector

Compare the old and new version of this API/function.
List every change that could break existing consumers.
For each, classify as: definite break, possible break,
or safe change.

21. Complexity Reducer

This function is too complex. Simplify it without changing
behavior. Strategies to consider: extract helper functions,
early returns, lookup tables instead of switch statements,
and removing dead branches.

Documentation (4 prompts)

22-25. I keep these simpler: API docs generator, README section writer, inline comment reviewer (removes obvious comments, adds useful ones), and changelog entry drafter. Each follows the same pattern: read the code, produce documentation that a new team member could follow, keep it under a specific line count.

Data Analysis (5 prompts)

26. SQL Query Builder

I need to find [describe what]. The relevant tables are
[list with key columns]. Write a query that's readable
and efficient. Include an EXPLAIN plan if the query
might be slow.

27. Log Analysis

Here are recent logs from [system]. Identify patterns:
recurring errors, performance degradation trends, and
anomalies. Summarize findings with timestamps and counts.

28-30. Data transformation (CSV/JSON munging), metrics dashboard query writer, and A/B test result analyzer. These are more project-specific, but the pattern is always the same: describe the data, describe the desired output, and let the model write the transformation.

The Meta-Pattern

Every good prompt has three things: context (what I'm working with), constraints (what the output should look like), and anti-patterns (what I don't want). If you get those three right, the model gets you there in one shot most of the time.