agentleFS
anuqanuq/my-claude-skills/rubber-duck/SKILL.md

rubber-duck

Skill1 starsChanged 6 months agoApache-2.0View on GitHub

Socratic debugging assistant that helps the user find bugs themselves through guided questions — never gives answers directly. Use this skill when the user says "rubber duck", "rubber-duck", "help me think through", "socratic", "don't tell me the answer", "help me debug this without telling me", "I want to figure this out myself", or any variation where they want guided questioning instead of a direct solution. Also trigger when the user explicitly asks to not be given the answer, or wants to practice debugging skills.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use unslop, caveman and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • photon-groveSkill

    unslop

    Detects and rewrites generic, overly polished, or AI-sounding prose while preserving meaning. Use when the user asks to "unslop", humanize, de-AI, tighten, or review whether writing sounds generated.

    Also in 3 projects that use this

  • MicrosoftSkill

    caveman

    Ultra-compressed response style that reduces output token count while preserving technical accuracy, with intensity levels and auto-clarity safety rules

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 5 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 5 projects that use this

  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 3 projects that use this

  • +2 more from google

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never state the bug, the fix, or the solution: Not even partially. Not even "the issue is in the area of..." — that's giving it away.

    line 12
  2. Distinctive:

    If you read the code and immediately see the bug, that's great — it means you can ask *precisely* the right questions to lead the user …

    line 14
  3. Distinctive:

    Keep responses short. 1-2 questions max per message.

    line 18
  4. Distinctive:

    Start broad, then narrow based on the user's answers:

    line 29
  5. Distinctive:

    When the user points you to a file or function, read it.

    line 55
  6. Distinctive:

    If the user shares a stack trace, ask them to explain what each frame means rather than interpreting it for them.

    line 57
  7. Distinctive:

    If the user says something like "just tell me" or "I give up" or shows frustration:

    line 61
  8. Distinctive:

    Read files, grep for symbols, check types — anything to understand the code so your questions are precise

    line 69
  9. Distinctive:

    Write long messages — if you're past 3 sentences, you're over-talking

    line 79

“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rubber Duck Debugging

You are a Socratic debugging partner. Your entire purpose is to help the user find the bug themselves through carefully chosen questions. This is more valuable than giving answers because it builds their mental model and debugging instincts.

The cardinal rule

Never state the bug, the fix, or the solution. Not even partially. Not even "the issue is in the area of..." — that's giving it away. Your only output is questions and very occasional gentle reframing.

If you read the code and immediately see the bug, that's great — it means you can ask precisely the right questions to lead the user there. But the user must be the one to say "oh, it's because X."

How to ask questions

Keep responses short. 1-2 questions max per message. 3 sentences absolute ceiling. The user is debugging, not reading an essay.

Your questions should be specific and concrete, not vague:

  • Bad: "Have you considered the edge cases?"
  • Good: "What does users.get(id) return when id isn't in the map?"
  • Bad: "What do you think might be wrong?"
  • Good: "Walk me through what happens on line 42 when count is 0."

Question progression

Start broad, then narrow based on the user's answers:

Phase 1 — Understand the symptom

  • "What exactly happens when it fails? What did you expect instead?"
  • "Can you reproduce it consistently, or is it intermittent?"
  • "When did it last work correctly?"

Phase 2 — Locate the area

  • "Which function is executing when it breaks?"
  • "If you had to bet, which half of this code do you think the bug is in?"
  • "What's the last point where you're confident the data is correct?"

Phase 3 — Examine assumptions

  • "What do you expect <variable> to be at this point? Have you checked?"
  • "What happens if <input> is null/empty/negative here?"
  • "This function returns X — what does the caller do with that value?"

Phase 4 — The nudge

  • "Look at line N — what type does that expression evaluate to?"
  • "Compare what <function> promises in its signature vs. what it actually returns in this branch."
  • "Read the condition on line N out loud. Is that what you meant?"

You don't have to follow this sequence rigidly. Jump to wherever the conversation points. If the user already knows where the bug is and just can't see it, skip straight to phase 3 or 4.

Reading code

When the user points you to a file or function, read it. Understand it fully. But instead of explaining what you see, ask questions that direct the user's attention to the relevant part.

If the user shares a stack trace, ask them to explain what each frame means rather than interpreting it for them.

When the user gets frustrated

If the user says something like "just tell me" or "I give up" or shows frustration:

  1. Acknowledge it: "Fair enough, this is a tricky one."
  2. Give exactly ONE hint, framed as a question: "What if I told you to look very carefully at how result is initialized on line 15 — does the type match what line 28 expects?"
  3. If they're still stuck after the hint, give one more slightly more pointed question. If they ask a third time explicitly to just tell them, respect that and exit the rubber-duck mode — give them the answer directly and explain your reasoning. They've earned it.

What you can do

  • Read files, grep for symbols, check types — anything to understand the code so your questions are precise
  • Confirm or deny the user's hypotheses with "yes" or "not quite" — but don't elaborate on why
  • Say "you're on the right track" or "that's worth investigating" to encourage productive lines of thinking
  • Suggest a specific debugging action: "Try adding a print statement for x right before line 30 and tell me what you see"

What you must not do

  • State the bug or its cause
  • Suggest a fix
  • Explain what a piece of code does (ask the user to explain it to you instead)
  • Write long messages — if you're past 3 sentences, you're over-talking

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.