agentleFS
sordi-aisordi-ai/skill-everything/skills/debugging/SKILL.md

debugging

Skill20 starsChanged 7 months agoMITView on GitHub

Apply when diagnosing a bug, reproducing a failure, or performing root cause analysis. Covers systematic isolation, binary search, logging strategy, and hypothesis-driven investigation.

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 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.
  • 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

  • pproencaSkill

    refactoring

    Code refactoring best practices based on Martin Fowler's catalog and Clean Code principles. This skill should be used when refactoring existing code, improving code structure, reducing complexity, eliminating code smells, or reviewing code for maintainability. Triggers on tasks involving extract method, rename, decompose conditional, reduce coupling, or improve readability.

    Also in 17 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

  • +5 more from mrgoonie

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 73 edited versions we read keep these.

  • 9

    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:

    Reproduce before fixing: Before changing any code, confirm you can trigger the failure on demand.

    line 26
  2. Distinctive:

    Change one variable at a time: Never modify multiple suspects simultaneously.

    line 32
  3. Distinctive:

    Use binary search on the call stack: When the failure source is unknown, bisect: confirm the bug is present at the midpoint of the …

    line 33
  4. Distinctive:

    Prefer structured logging over print-debugging: Add log statements at decision boundaries with structured key-value pairs (not free-form …

    line 34
  5. Distinctive:

    State a falsifiable hypothesis before each experiment: Write down: "I believe X causes Y because Z.

    line 38
  6. Distinctive:

    Verify the fix with the reproduction test: After applying the fix, confirm the reproduction test now passes and no previously passing tests …

    line 44
  7. Distinctive:

    Ensure the fix is observable: After merging, confirm the symptom is gone in the target environment using the same signal (log line, metric, …

    line 45
  8. Distinctive:

    Binary search applies to time too: Use git bisect to find the commit that introduced a regression.

    line 59
  9. Distinctive:

    Logging is temporary: Remove or gate debug log statements behind a flag before merging.

    line 60

“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

Sub-Skill: Debugging

Purpose: Systematic techniques for reproducing failures, isolating variables, and finding root causes without guessing. Complements skills/tdd/SKILL.md — a failing test is the best reproduction case.


Rules

Reproduction

  1. Reproduce before fixing. Before changing any code, confirm you can trigger the failure on demand. A fix applied to an unreproduced bug is a guess, not a solution. Reference: ERR-2026-018
  2. Capture the minimal reproduction. Reduce the failing scenario to the smallest input, fewest dependencies, and shortest code path that still exhibits the symptom. Smaller reproductions expose the cause faster and prevent regression.
  3. Write the reproduction as a test. Encode the reproduction case as an automated test before touching production code. This locks in the failure signal and prevents silent regression. See skills/tdd/SKILL.md.

Isolation

  1. Change one variable at a time. Never modify multiple suspects simultaneously. Each change must be independently observable so you know which variable caused the change in behaviour.
  2. Use binary search on the call stack. When the failure source is unknown, bisect: confirm the bug is present at the midpoint of the execution path, then recurse into the half that contains it. Avoid reading every line top-to-bottom.
  3. Prefer structured logging over print-debugging. Add log statements at decision boundaries with structured key-value pairs (not free-form strings). Structured output is grep-able, diffable, and removable without side effects.

Hypothesis and Root Cause

  1. State a falsifiable hypothesis before each experiment. Write down: "I believe X causes Y because Z. If I change X, Y should disappear." Run the experiment. If the hypothesis is wrong, update your model before the next experiment.
  2. Distinguish symptom from cause. The error message or stack trace is the symptom. The root cause is the incorrect assumption, missing guard, or wrong state that produced it. Never stop at the symptom — trace back to the decision that allowed the bad state to exist.
  3. Do not fix symptoms in isolation. Patching the symptom without addressing the root cause produces a second bug that hides the first. Ensure the fix makes the root cause impossible, not just the observed symptom unlikely.

Verification

  1. Verify the fix with the reproduction test. After applying the fix, confirm the reproduction test now passes and no previously passing tests regressed. A fix that breaks other tests has introduced a new bug.
  2. Ensure the fix is observable. After merging, confirm the symptom is gone in the target environment using the same signal (log line, metric, test) that first revealed the bug. Never declare a bug fixed without an observable confirmation.

See also

  • skills/tdd/SKILL.md — write the reproduction as a failing test first
  • skills/code-quality/SKILL.md — narrow exception catches to avoid masking bugs (ERR-2026-016)
  • skills/error-log/SKILL.md — errors that motivated rules in this skill

Notes

  • Binary search applies to time too. Use git bisect to find the commit that introduced a regression; do not read the full diff manually.
  • Logging is temporary. Remove or gate debug log statements behind a flag before merging. Permanent debug noise degrades signal quality for the next investigation.

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.