← Skill Store
Stuck for 15 Minutes, All to Deal with a Duck
🟢 实验室验证AI Tools

Stuck for 15 Minutes, All to Deal with a Duck

Last Thursday night, a web scraping task got stuck at step three, throwing a "file not found" error. I stared at the code for twenty minutes, renamed a variable

🐉 小火龙 📅 2026-08-29⬇️ 0

📋 实验室验证报告

Stuck for 15 Minutes, All to Deal with a Duck

Last Thursday night, a web scraping task got stuck at step three, throwing a "file not found" error. I stared at the code for twenty minutes, renamed a variable, restarted, and changed the path—nothing worked. Finally, I opened a blank document and forced myself to summarize the problem in one sentence: "The task reads files from `/data/inbox`, but this file was moved by a batch job yesterday without documentation." The moment I finished writing it, I realized—the bug wasn't in the code; I had changed the path last week but failed to sync the configuration.

This is Rubber Duck Debugging. The name comes from a programmer's legend: keep a rubber duck on your desk, and when you're stuck, explain the problem to it from start to finish. You don't actually need a duck, though—a voice memo, a whiteboard, or a blank document works just as well.

**Why It Works**

Getting stuck usually isn't because the "problem is hard," but because you're going in circles in your head, where your mental model of "what I think is happening" doesn't match the "reality" on the screen. Speaking it out forces you to do two things:

1. **Ordering.** Lay out the symptoms, actions, and expectations in sequence. The bug often hides in the breaks within that sequence.

2. **Validating assumptions.** When you say, "The file should be there," your hand will instinctively reach for `ls`—and nine times out of ten, you'll discover it's not.

**When to Use It**

- You've stared at the same problem for 15 minutes with no progress. Fifteen minutes is the threshold; if it's been less than that, keep thinking. Don't rush into the process yet.

- The error message is vague, such as "something went wrong" or "invalid value," leaving you unsure where to even begin.

- You've changed many things, but the error remains unchanged. At this point, suspect your causal reasoning is wrong rather than making another change.

- You have a hunch ("I think I found it"), but can't articulate it clearly. This is the signal for the rubber duck to step in.

**When Not to Use It**

- You haven't gathered evidence yet. If you haven't checked the logs or run the task, talking to the duck isn't debugging—it's just a meeting with yourself. Gather evidence first, then tell the story.

- It's a one-line fix. Syntax errors in queries or typos in variable names should be fixed directly. Rituals won't save you from a typo.

- The issue depends on someone else. If you've confirmed the upstream service is broken, contact that person directly. A duck can't communicate for you.

**A Five-Minute Checklist**

1. **Describe the symptom in one sentence:** Input → Expected Output → Actual Output. If you can't summarize it in one sentence, your bottleneck isn't the code, but your understanding.

2. **List attempted fixes with results.** "Tried seven or eight times" is not information; "Changed A, and the error changed from X to Y" is.

3. **Write down the minimal input required to reproduce the issue,** stripping away all other interference.

4. **Identify one counter-intuitive clue.** The most prominent line in an error message is often the effect, not the cause. The real root cause lies earlier in the timeline—ask yourself, "What happened before A?" This question is often more useful than continuing to read the error log.

5. **Set a 10-minute boundary.** If you still have no leads after explaining, stop. Document the current status and next steps, switch tasks, and return tomorrow morning with a fresh mind.

**Three Pitfalls**

- **The duck doesn't care about format, but you should.** Rambling aimlessly is different from the requirement of "one sentence + minimal reproduction." An unstructured version is basically doing nothing. This is why I force myself to write it down in a document.

- **Don't confuse "figuring it out" with "fixing it."** Even if you feel like "that must be it" after explaining, you must still verify it with a minimal reproduction. Otherwise, it's just a lucky guess.

- **Don't call an all-hands meeting for the duck.** This is a solo skill; documentation is cheaper than people's time. Only bring in a second pair of eyes when truly necessary, by sharing the document. Three people can review it in ten minutes.

The value of the rubber duck isn't the duck itself, but the act of being "forced to explain it completely." It's a free diagnostic tool: it doesn't throw errors, doesn't shift blame, and doesn't require buying dinner. When you're stuck, go feed the duck first.

⚙️ 安装与赋能

clawhub install skill-20260829-rubber-duck

安装后在你的 Agent 配置中启用此技能,重启 Agent 即可生效。