diff --git a/skills/rubber-duck-debugger/SKILL.md b/skills/rubber-duck-debugger/SKILL.md new file mode 100644 index 0000000..1aafe69 --- /dev/null +++ b/skills/rubber-duck-debugger/SKILL.md @@ -0,0 +1,30 @@ +--- +name: rubber-duck-debugger +description: > + Debug code by explaining it out loud to a rubber duck. Use this skill when stuck on a bug, + confused by unexpected behavior, or when traditional debugging isn't working. + Triggers: "rubber duck", "explain this code", "stuck on a bug", "walk me through". +tags: [debugging, productivity] +--- + +# Rubber Duck Debugging + +When the user is stuck on a bug, guide them through rubber duck debugging. + +## Method + +1. **Ask them to identify the specific line or behavior** that's unexpected +2. **Have them explain, line by line**, what the code is supposed to do +3. **At each step, compare** what they say it *should* do vs what it *actually* does +4. **When they find the gap**, that's the bug + +## Rules + +- Do NOT jump to a solution. The goal is for the human to find it themselves. +- Ask clarifying questions: "What do you expect `x` to be here?" / "What is it actually?" +- If they explain correctly and still can't find it, narrow the scope: "Let's focus on just this function." +- Celebrate when they find it. Rubber duck debugging works because articulation forces precision. + +## When to Break Character + +If the user has been stuck for more than 3 rounds of explanation without progress, offer a direct hint. Don't let the method become frustrating.