agentleFS
kwhornekwhorne/elyra-skills/skills/debugging/SKILL.md

debugging

Skill1 starsChanged 6 months agoMITView on GitHub

Systematically debug a problem - reproduce, isolate, fix, verify, prevent regression. Use when the user reports a bug, an unexpected error, a failing test, or asks to investigate why something is broken.

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use media-processing, databases and 9 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.
  • mrgoonieSkill

    media-processing

    Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.

    Also in 4 projects that use this

  • mrgoonieSkill

    databases

    Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.

    Also in 5 projects that use this

  • ShopifySkill

    profiling

    Profile Rubydex indexer performance — CPU flamegraphs, memory usage, phase-level timing. Use this skill whenever the user mentions profiling, performance, flamegraphs, benchmarking, "why is X slow", bottlenecks, hot paths, memory usage, or wants to understand where time is spent during indexing/resolution. Also trigger when comparing performance before/after a change.

    Also in 3 projects that use this

  • sarveshtaleleSkill

    test-generation

    Generate a test strategy and starter test stubs for given modules across unit, integration, and e2e layers (pytest/jest/playwright). Trigger on: generate tests, test plan, test strategy, coverage plan, test scaffolding.

    Also in 3 projects that use this

  • MicrosoftSkill

    using-skills

    Describes how to use abilities. Read before any conversation.

    Also in 3 projects that use this

  • NVIDIASkill

    deployment

    Serve a quantized or unquantized LLM checkpoint as an OpenAI-compatible API endpoint using vLLM, SGLang, or TRT-LLM. Use when user says "deploy model", "serve model", "start vLLM server", "launch SGLang", "TRT-LLM deploy", "AutoDeploy", "benchmark throughput", "serve checkpoint", or needs an inference endpoint from a HuggingFace or ModelOpt-quantized checkpoint. Do NOT use for quantizing models (use ptq) or evaluating accuracy (use evaluation).

    Also in 5 projects that use this

  • +5 more from mrgoonie

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 73 edited versions we read keep these.

  • 11

    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 skip steps 1–3. A fix without reproduction is a guess.

    line 30
  2. Distinctive:

    Ask for: exact command/input, expected vs actual, stack trace, environment

    line 36
  3. Distinctive:

    Run it yourself. If you can't reproduce locally, that is the first finding.

    line 37
  4. Distinctive:

    Read the actual stack trace top-to-bottom.

    line 47
  5. Distinctive:

    Write it down: "I think X happens because Y."

    line 53
  6. Distinctive:

    Verify the prediction *before* writing the fix — print, log, breakpoint, REPL

    line 55
  7. Distinctive:

    If you're tempted to add defensive code "just in case," stop — that's a sign you haven't understood the bug

    line 62
  8. Distinctive:

    Run the existing test suite → must pass

    line 70
  9. Distinctive:

    If there was no test covering this bug, write one now (see step 6)

    line 71
  10. Distinctive:

    Add a regression test that fails without the fix and passes with it

    line 77
  11. Distinctive:

    If the bug class is recurring (e.g.

    line 78

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

Debugging

A disciplined debugging loop. The goal is understanding, then fixing — not pattern-matching a fix and hoping.

When to use

  • "X is broken / not working / throwing"
  • "This test is failing"
  • "Why does this return the wrong value?"
  • "Find the bug in …"

The loop

1. Reproduce  →  2. Isolate  →  3. Hypothesize  →  4. Fix  →  5. Verify  →  6. Prevent

Never skip steps 1–3. A fix without reproduction is a guess.

1. Reproduce

Get the bug to happen on demand before changing anything.

  • Ask for: exact command/input, expected vs actual, stack trace, environment
  • Run it yourself. If you can't reproduce locally, that is the first finding.
  • Capture the minimal reproduction (smallest input that triggers it)

2. Isolate

Shrink the problem space.

  • Bisect by location — comment out / short-circuit halves until you find the failing region
  • Bisect by history — git bisect if it used to work
  • Bisect by data — strip input down to the smallest failing case
  • Read the actual stack trace top-to-bottom; don't skim

3. Hypothesize

Form a specific, testable theory of what's wrong before touching code.

  • Write it down: "I think X happens because Y."
  • Predict what you'd see if the theory is correct (a value, a log line, a call order)
  • Verify the prediction before writing the fix — print, log, breakpoint, REPL

4. Fix

Now, and only now, change code.

  • Smallest change that addresses the root cause
  • If you're tempted to add defensive code "just in case," stop — that's a sign you haven't understood the bug
  • Note any related code paths with the same flaw

5. Verify

Prove the fix works and didn't break anything else.

  • Re-run the minimal repro → must pass
  • Run the existing test suite → must pass
  • If there was no test covering this bug, write one now (see step 6)

6. Prevent regression

A bug that came back is twice as expensive.

  • Add a regression test that fails without the fix and passes with it
  • If the bug class is recurring (e.g. null in a specific shape), consider a type/lint rule
  • Note any sibling code paths that should be patched the same way

Output format

When done, report:

## Bug: <short title>

**Root cause:** one or two sentences. What was actually wrong.

**Trigger:** minimal reproduction.

**Fix:** what changed and why this is the right level to fix at.

**Verification:** tests run, new tests added.

**Related risks:** other code paths with the same shape (or "none found").

Anti-patterns

  • ❌ "I think this might work, let me try it" → that's not debugging, that's slot-machining
  • ❌ Adding try/catch to make an error go away without understanding it
  • ❌ Fixing symptoms (the wrong value displayed) instead of cause (where it became wrong)
  • ❌ Skipping the regression test because "it's obvious now"
  • ❌ Changing five things at once and not knowing which one fixed it

Useful commands

# Git bisect — find the commit that introduced the bug
git bisect start
git bisect bad                       # current is broken
git bisect good <known-good-commit>
# (run repro, then git bisect good/bad until it converges)
git bisect reset

# Re-run only the failing test in watch mode (adjust per stack)
# pytest: pytest path/to/test.py::test_name -x -vv
# vitest: npx vitest run path/to/test --reporter=verbose
# phpunit: vendor/bin/phpunit --filter testName

# Show recent changes to a file
git log -p --follow path/to/file

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.