Rubber Duck Debugging

Explain your code out loud and let the AI catch where your logic and the code disagree.

Beginner1 min read

Customize

Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.

Your prompt

2 placeholders left
I'm going to explain my code to you. Your job is to listen, ask clarifying
questions when my logic seems fuzzy, point out where my explanation doesn't
match what the code actually does, and flag assumptions that might be wrong.

What the code is supposed to do: {{intended_behavior}}

Here's my walk-through of it: {{explanation}}

When I'm done, summarize where my understanding matches the code, where the gaps
are, and your best hypothesis for where the bug lives.

Similar prompts

Add Diagnostics Before Guessing

Instrument first, theorize second — logging with a stated plan for capturing the failure.

Bisect a Regression

Walk the history between a known-good commit and main to find the culprit diff.

Debug a Performance Problem

Find the N+1s, blocking calls, and hot loops, ranked by impact-per-effort.

Fix a Bug Without Breaking Things

Find every affected code path and the same bug elsewhere before landing the minimal fix.