Skip to content
NeuralSkills
Debugging

Rubber Duck AI

Explain your bug to AI and discover the answer through guided questioning — the classic method, supercharged.

Beginner Free Published: April 15, 2026
Compatible Tools claude-codechatgptgeminicopilotcursorwindsurfuniversal

The Problem

You know something is wrong, but you can’t pinpoint it. The code looks correct, the logic seems right, yet the output is wrong. Traditional rubber duck debugging works because explaining forces you to think clearly — but a real AI can ask back, spot assumptions, and guide you to the root cause faster than any inanimate object.

The Prompt

Act as my rubber duck debugger. I'm going to explain a bug I'm stuck on. Your job is NOT to immediately give me the answer. Instead:

1. Listen to my explanation carefully
2. Ask me 3-5 probing questions about my assumptions
3. Point out any gaps or contradictions in my reasoning
4. Guide me toward the answer by narrowing down the problem space

Here's my bug:

**What I expected to happen:**
[describe the expected behavior]

**What actually happens:**
[describe the actual behavior]

**What I've already tried:**
[list debugging steps you've taken]

**The relevant code:**
[paste the suspicious code section]

Start by asking me your first probing question.

Example Output

Interesting — you say the function should return an array, but you've tried logging the output
and it shows "undefined." Let me ask:

1. Are you sure the function is actually being called? Have you added a console.log at the
   very first line inside the function body?
2. You mentioned it works in isolation — when you tested it alone, did you use the exact same
   input data as the real scenario?
3. Is there another function with the same name that might be shadowing this one?

When to Use

Use this skill when you’re stuck and frustrated — when you’ve been staring at the same code for too long. It’s especially effective for logic bugs where there’s no error message, just wrong behavior. The guided questioning often reveals blind spots within the first two exchanges.

Pro Tips

  • Be brutally honest about what you don’t understand — the AI’s questions get sharper when you admit uncertainty instead of glossing over gaps.
  • Don’t skip the “what I’ve tried” section — it prevents the AI from suggesting things you’ve already ruled out.
  • If the AI jumps to a solution too fast, remind it: “Don’t give me the answer yet — ask me another question first.” The value is in the process, not the shortcut.