---
name: rubber-duck
description: Use when stuck on a problem — structured debugging: rubber duck, web research, AI consultation, then escalate.
version: 1.0
---

# Rubber Duck Skill

Invoke this skill when explicitly asked, or whenever you repeat the same approach,
hit the same error twice, or fail to make progress after 2–3 attempts.

## Phase 1: Rubber Duck

Write out the problem as an explanation to someone who knows nothing. Include:

- What the project is, what it does, and the relevant technologies/versions
- What you are trying to achieve
- What is actually happening — exact errors, unexpected behaviour
- What you expect to happen at each step vs. what does happen
- Every approach already tried and specifically why each failed
- What you don't know — the specific gap

The parts that are hard to articulate clearly are often where the bug is.

After writing this out, generate 10 possible causes. Rank by likelihood.
Try the top 3. If resolved, stop.

## Phase 2: Web Research

Spawn a Haiku agent using the prompt in `~/.claude/skills/rubber-duck/agents/haiku-web-search.md`.
Pass the full Phase 1 problem definition as context.

Read the summaries returned. From them, generate 10 candidate causes ranked by likelihood.
Try the top 3 not already attempted. If resolved, stop.

## Phase 3: Opus Consultation

Spawn an Opus agent using the prompt in `~/.claude/skills/rubber-duck/agents/opus-debugger.md`.
Pass the Phase 1 problem definition and Phase 2 summaries as context.

Read the root causes returned. Generate 10 candidate causes ranked by likelihood.
Try the top 3 not already attempted. If resolved, stop.

## Phase 4: Escalate to User

Present:
- The full picture: goal, what's broken, all attempts across all phases
- One specific, answerable question — not "what should I do?" but "could X be causing Y?"
