agentleFS
mikeparcewskimikeparcewski/wicked-garden/skills/engineering/debugging/SKILL.md

wicked-garden-engineering-debugging

Skill9 starsChanged 7 months agoMITView on GitHub

Systematic debugging and root cause analysis for investigating errors, diagnosing complex issues, and performance profiling.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    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:

    When did it start? Can it be reproduced?

    line 23
  2. Distinctive:

    Read logs and stack traces

    line 27
  3. Distinctive:

    Follow the six-step debugging process with:

    line 59
  4. Distinctive:

    Start with the simplest explanation

    line 93
  5. Distinctive:

    Use scientific method: hypothesis, test, refine

    line 94
  6. Distinctive:

    Document your findings for future reference

    line 95
  7. Distinctive:

    Add tests to prevent regression

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Debugging Skill

Systematic debugging, root cause analysis, and error investigation.

Debugging Approach

1. Understand the Problem

  • What is expected vs actual behavior?
  • When did it start? Can it be reproduced?
  • What changed recently?

2. Gather Evidence

  • Read logs and stack traces
  • Review recent changes
  • Identify patterns

3. Form Hypothesis

  • What is the most likely cause?
  • What evidence supports this?

4. Test Hypothesis

  • Design targeted test
  • Observe results
  • Refine if needed

5. Implement Fix

  • Develop minimal fix
  • Verify resolution
  • Add regression tests

6. Document

  • Root cause and fix
  • Add monitoring/alerting

Issue Categories

  • Logic Errors: Incorrect conditions, off-by-one, wrong operators
  • State Errors: Race conditions, stale closures, shared mutable state
  • Integration Errors: API mismatch, auth issues, timeouts
  • Performance: N+1 queries, missing indexes, memory leaks
  • Environment: Config differences, missing vars, permissions

Systematic Process

Follow the six-step debugging process with:

  • Checklists for investigation and evidence gathering
  • Severity levels (CRITICAL, HIGH, MEDIUM, LOW)
  • Output templates for documentation
  • Tools by environment (browser, Node.js, database)

See refs/process.md for detailed process, checklists, and severity guidelines.

Common Patterns

Debugging techniques and solutions for:

  • Null/undefined issues with optional chaining
  • Async timing and race conditions
  • Scope and closure problems
  • Binary search debugging with git bisect
  • Performance profiling
  • Database query analysis

See refs/patterns.md for code examples and debugging techniques.

External Integration Discovery

Debugging can leverage available integrations by capability:

CapabilityDiscovery PatternsProvides
Error trackingsentry, rollbar, datadogRecent errors, stack traces, user context
Observabilitynewrelic, dynatrace, telemetryAPM data, traces, metrics
Loggingsplunk, elastic, cloudwatchLog aggregation, search

Discover available integrations via capability detection. Fall back to local log analysis via the wicked-garden-search skill when none available.

Notes

  • Start with the simplest explanation
  • Use scientific method: hypothesis, test, refine
  • Document your findings for future reference
  • Add tests to prevent regression

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.