agentleFS
CodeWithBehnamCodeWithBehnam/cc-docs/skills/debug/SKILL.md

debug

Skill2 starsChanged 9 months agoMITView on GitHub

Systematic debugging using hypothesis testing. Reproduces the error, isolates the cause, and implements a fix. Use when the user reports a bug, error, or unexpected behavior, or says "debug this", "fix this error", "why is this failing", or "it's not working".

144 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-ollama-tool, 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-ollama-tool

    Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.

    Also in 6 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 6 projects that use this

  • sskarzSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 5 projects that use this

  • +9 more from microsoft

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 127 edited versions we read keep these.

  • 14

    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:

    Read $ARGUMENTS carefully.

    line 18
  2. Distinctive:

    If a stack trace is provided, read every file and line mentioned.

    line 19
  3. Distinctive:

    Test each hypothesis systematically (highest likelihood first):

    line 31
  4. Distinctive:

    Add targeted logging or print statements to narrow the scope

    line 32
  5. Distinctive:

    Check variable values at key points

    line 33
  6. Distinctive:

    Use binary search: disable/simplify half the code to find which half contains the bug

    line 35
  7. Distinctive:

    Read the documentation or source of any library involved if the error is unfamiliar

    line 36
  8. Distinctive:

    Do not fix until the root cause is confirmed

    line 40
  9. Distinctive:

    Do not refactor or add features in the same change

    line 46
  10. Distinctive:

    Run the full test suite - no regressions allowed

    line 50
  11. Distinctive:

    If the bug cannot be reproduced: ask the user for more context (environment, inputs, exact error message)

    line 59
  12. Distinctive:

    If multiple root causes are found: fix the most critical one, then list the others

    line 60
  13. Distinctive:

    If the fix would be a large refactor: describe it and get user approval before implementing

    line 61
  14. Distinctive:

    If the root cause is in a third-party dependency: report it, provide a workaround, and suggest filing an issue upstream

    line 62

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

Debug the following issue: $ARGUMENTS

Phase 1: Reproduce

  1. Understand the error:
    • Read $ARGUMENTS carefully. Extract: the error message, the affected component, any stack trace or file/line references.
    • If a stack trace is provided, read every file and line mentioned.
  2. Reproduce the failure:
    • Find or write a command, test, or script that triggers the error reliably
    • Confirm it fails consistently before investigating the cause

Phase 2: Isolate

  1. Form hypotheses (list at least 3):
    • Based on the error message and stack trace, what are the most likely root causes?
    • Rank them by likelihood
  2. Test each hypothesis systematically (highest likelihood first):
    • Add targeted logging or print statements to narrow the scope
    • Check variable values at key points
    • Inspect config files, environment variables, and dependencies that could be involved
    • Use binary search: disable/simplify half the code to find which half contains the bug
    • Read the documentation or source of any library involved if the error is unfamiliar
  3. Identify the root cause:
    • A hypothesis is confirmed when you can explain both WHY the error occurs and WHY it does NOT occur in other cases
    • Do not fix until the root cause is confirmed

Phase 3: Fix

  1. Implement the minimal fix:
    • Change only what is necessary to address the root cause
    • Do not refactor or add features in the same change
  2. Verify the fix:
    • Re-run the reproduction case - it must succeed
    • Run the full test suite - no regressions allowed
  3. Report the finding:
    • Root cause (one sentence)
    • Fix applied (file and line)
    • How to prevent similar issues in the future (if obvious)

Error Handling

  • If the bug cannot be reproduced: ask the user for more context (environment, inputs, exact error message)
  • If multiple root causes are found: fix the most critical one, then list the others
  • If the fix would be a large refactor: describe it and get user approval before implementing
  • If the root cause is in a third-party dependency: report it, provide a workaround, and suggest filing an issue upstream

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.