agentleFS
agentsdanceagentsdance/agentskills/skills/debug-helper/SKILL.md

debug-helper

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Help debug code issues with systematic analysis. Use when the user has bugs, errors, or unexpected behavior and needs help finding the root cause.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    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:

    Test: - Verify or disprove theories

    line 16
  2. Distinctive:

    Add a log in the middle of the suspected code

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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 Helper

Systematic approach to finding and fixing bugs.

Debugging Process

  1. Reproduce - Confirm the issue and understand expected vs actual behavior
  2. Isolate - Narrow down where the bug occurs
  3. Inspect - Examine state, data flow, and logic
  4. Hypothesize - Form theories about the cause
  5. Test - Verify or disprove theories
  6. Fix - Implement the solution
  7. Verify - Confirm the fix works and doesn't break other things

Common Bug Patterns

PatternSymptomsSolution
Off-by-oneWrong count, missing itemsCheck loop bounds
Null referenceTypeError, crashesAdd null checks
Race conditionIntermittent failuresAdd synchronization
State mutationUnexpected changesUse immutable patterns
Scope issuesWrong variable valuesCheck closures

Debugging Techniques

Add Strategic Logging

console.log('[DEBUG] Function called with:', { userId, options });
console.log('[DEBUG] API response:', JSON.stringify(data, null, 2));
console.log('[DEBUG] State before update:', state);

Use Debugger Statements

function processOrder(order) {
  debugger; // Execution pauses here
  const total = calculateTotal(order);
  return total;
}

Binary Search Debugging

  1. Add a log in the middle of the suspected code
  2. Determine if bug is before or after
  3. Repeat until isolated

Questions to Ask

  • What changed recently?
  • Does it fail consistently or intermittently?
  • What are the exact inputs when it fails?
  • What's different between working and failing cases?
  • Are there any error messages or stack traces?

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.