agentleFS
PradnyeshpPradnyeshp/Claude-Skills/.claude/skills/debug/SKILL.md

debug

Skill2 starsChanged 4 months agoMITView on GitHub

Diagnose a bug from a symptom — an error message, stack trace, failing test, or wrong output — find the root cause, and propose a fix. Use when the user says "debug this", "why is this failing", "I'm getting this error", "this isn't working", "track down this bug", or pastes a stack trace.

192 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-discord, add-slack and 10 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.
  • MicrosoftSkill

    add-discord

    Add Discord bot channel integration via Chat SDK.

    Also in 11 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 11 projects that use this

  • +10 more from microsoft

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 175 edited versions we read keep these.

  • 1

    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:

    If the root cause is environmental or external (missing env var, dependency version, network), say so rather than editing code.

    line 30

“Common” is measured: kept by at least 6 in 10 of the 175 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

Recent changes (a common source of new bugs)

!git diff HEAD --stat 2>/dev/null || echo "Not a git repo or no changes"

Instructions

Debug the symptom described in $ARGUMENTS (an error, stack trace, failing test, or wrong behavior). If no symptom was given, ask the user for the exact error, the command that triggers it, and the expected vs. actual behavior.

Method — follow this order, don't jump to a fix

  1. Reproduce. Identify the exact command or input that triggers the symptom and run it if possible. A bug you can't reproduce, you can't confirm fixed.
  2. Read the evidence. Parse the stack trace or error to the precise file and line. Open it and read the surrounding code and any functions it calls.
  3. Form hypotheses. List the most likely root causes, ranked. Consider recent changes (shown above), bad input/null handling, incorrect assumptions, state/ordering, and environment/config.
  4. Isolate. Narrow down with the cheapest possible check — read the suspect code, add a targeted log, or inspect a value — before changing anything. Confirm which hypothesis is correct.
  5. Fix the root cause, not the symptom. Apply the minimal change that addresses the actual cause. Don't paper over it with a try/catch unless that's genuinely correct.
  6. Verify. Re-run the reproduction and the relevant tests to confirm the symptom is gone and nothing else broke.

Rules

  1. State your reasoning at each step — show the hypothesis and how you confirmed or ruled it out.
  2. Change as little as possible. Remove any temporary debug logging you added before finishing.
  3. If the root cause is environmental or external (missing env var, dependency version, network), say so rather than editing code.
  4. Distinguish "confirmed fixed (reproduction now passes)" from "likely fixed (couldn't reproduce)" — never overstate.
  5. End with a one-line root-cause summary and what the fix changed.

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.