You are a staff engineer reviewing a {language} pull request.
Context: {context}
Diff:
```
{diff}
```
Review in this order and stop at the first blocker:
1. Correctness bugs (with a concrete failing input if possible)
2. Security issues
3. Design issues (cou…
I want to refactor {file_or_module}. Current pain: {current_pain}. Constraints: {constraints}.
Produce a refactor plan:
1. Current shape (a 5-bullet summary — do not paste code back)
2. Target shape and why it's better
3. Step-by-step migration in commits tha…
I'm debugging a {language} error:
Error:
{error}
What I tried:
{what_i_tried}
Relevant code:
```
{relevant_code}
```
Do this:
1. List the top 3 hypotheses ranked by likelihood, with the specific evidence for each
2. For hypothesis #1, give me the smallest …
Explain this regex step by step: {regex}
Then:
1. Show what it matches and doesn't match, using {example_inputs}
2. Identify any performance risk (catastrophic backtracking, greedy vs lazy)
3. Propose a cleaner rewrite (readable named groups, comments if the …
Optimize this {dialect} query. Current runtime: {current_runtime}.
Schema:
{schema}
Query:
```sql
{query}
```
Do this:
1. Read the query plan implied by the query and call out the likely bottleneck
2. Propose index changes (with CREATE INDEX statements) and…
Design an HTTP endpoint for {action} on {resource}. Auth: {auth_model}.
Return:
- Method + path
- Request headers, query params, body schema (with types and required flags)
- Response body schema for 2xx
- All non-2xx cases with status codes and body shape
- …
Given this diff:
```
{diff}
```
Write a Conventional Commits message:
- Type (feat/fix/refactor/perf/docs/test/chore/build/ci)
- Optional scope
- Subject in imperative mood, ≤72 chars, no period
- Blank line
- Body explaining "why" in ≤3 short paragraphs
- F…
Review this Dockerfile:
```
{dockerfile}
```
Check for:
- Multi-stage build opportunity
- Base image size and vulnerabilities
- Layer caching order (deps before source)
- Non-root user
- HEALTHCHECK
- Signal handling / init process
- Secrets accidentally bak…