Find the slow thing before optimising
This is slow: {{describe symptom, e.g. endpoint takes 4s at p95}}. Here's the code and what I know: {{paste code, query plans, timings, data volumes}}. Don't optimise yet. First: …
PROMPT CATEGORY
Practical coding & debugging prompts tested with useful AI apps.
This is slow: {{describe symptom, e.g. endpoint takes 4s at p95}}. Here's the code and what I know: {{paste code, query plans, timings, data volumes}}. Don't optimise yet. First: …
Review this design before I build it: {{paste design or describe: what it does, data model, endpoints, dependencies, expected scale}}. Attack it in this order: 1. FAILURE MODES — …
Write the query for this question: {{describe what you need to know}}. Schema: {{paste DDL or table and column list with row counts}} Database: {{engine and version}} Requirement…
Review the diff below as a senior engineer on this codebase would. Order your review by what actually matters: 1. CORRECTNESS — logic errors, off-by-one, unhandled nulls, wrong er…
This script works but it's about to become important: {{paste script}}. Harden it without over-engineering: 1. Name the failure modes it currently has — what happens on a network …
Write documentation for the code below, for an engineer who joins in six months. Structure: 1. WHAT AND WHY — what this does and the problem it exists to solve. Include the constr…
I've just been dropped into this codebase and need to ship a change to {{area}} this week. Given the files below, produce an orientation doc: 1. What this system does, in two sent…
Here's a bug that reached production, and the code around it. 1. Write the failing test that reproduces it at the smallest useful level (unit if the logic is pure, integration if …
Security-review the code below. It handles {{describe data and who can reach it}}. Check specifically: 1. AUTHZ — is every object access scoped to the caller's tenant and role, or…
Here's an error and the relevant code. Diagnose it properly. 1. Translate the error into plain language: what the runtime was trying to do when it gave up. 2. Name the actual caus…
Refactor the code below. The behaviour must not change, including its bugs, unless I approve the change. Process: 1. First, describe the current behaviour precisely, including edg…
This works locally and fails in production. Symptoms: {{describe, including frequency and pattern}}. Environment differences I know of: {{list}}. Logs: {{paste}}. Work the problem…
Here's the ticket: {{paste}}. Here's the relevant code: {{paste}}. Produce an implementation plan: 1. Restate the requirement precisely, and list every ambiguity you had to resolv…