Coding & Development
Debugging, refactoring, docs, test scaffolding.
Prompts that turn an LLM into a useful pair programmer. Refactor patterns, bug isolation playbooks, code review templates, regex generation, SQL query design.
Binary-search a bug across recent changes
When a bug appeared 'sometime in the last week' and you have N suspects, binary search beats reading every diff. This prompt structures the search.
Extract a function with explicit boundary contract
Most 'refactor this' prompts produce noisy diffs. This one extracts one function with a written contract you can sanity-check before applying.
Translate a fuzzy business question into a runnable SQL query
Business stakeholders rarely ask precise questions. This prompt makes the model state its assumptions before writing the query, which catches misunderstandings cheaply.
Generate a regex with a built-in test matrix
Regex without test cases is a bug waiting to land. This prompt forces the model to produce a test matrix alongside the expression.
Run a PR through a 7-axis code review checklist
Code reviews drift when reviewers each check different things. This prompt produces a uniform review across correctness, security, performance, readability, testability, observability, and rollback.
Flatten deeply nested conditionals into readable logic
Deeply nested if/else chains are a common source of bugs and reviewer complaints. This prompt walks an LLM through systematically flattening them using guard clauses and early returns.
Diagnose a slow SQL query using EXPLAIN output
When a query is running slow and you have an EXPLAIN or EXPLAIN ANALYZE output, it's not always obvious which node is the culprit. This prompt helps you interpret the plan and get concrete index or rewrite suggestions.
Write unit tests from a function signature and spec
Writing tests after the fact is tedious and often incomplete. This prompt generates a structured test suite from a function signature and its intended behavior, covering happy paths, edge cases, and known failure modes.
Convert a raw API response into a typed data schema
When integrating a third-party API, turning a raw JSON response into a typed schema (TypeScript interface, Pydantic model, Go struct) saves hours and prevents runtime errors. This prompt does it systematically.
Audit error handling gaps in async or promise-based code
Async code is where error handling silently fails most often — unhandled rejections, swallowed exceptions, and missing fallbacks cause production incidents. This prompt audits a code block specifically for these gaps.
Design a normalized database schema from product requirements
Turning a product spec into a database schema involves decisions that are hard to reverse — normalization level, foreign keys, indexing strategy. This prompt walks through the design systematically and flags the tradeoffs.
Migrate code from a deprecated library version to a new API
Library major versions often break APIs in ways that require mechanical but error-prone find-and-replace across a codebase. This prompt handles a specific file or module at a time, mapping old calls to new ones explicitly.
Generate precise documentation for an undocumented function
Undocumented functions slow down every engineer who touches them later. This prompt generates accurate, specific documentation — not boilerplate — by reasoning through what the code actually does before writing a single word.