agentsclimarketplace

Systematic debugging

Skill itseffi/agentic-os/.agents/skills/systematic-debugging

Four-phase debugging process - root cause first, then fix. Use when encountering bugs or unexpected behavior.From its SKILL.md

Install
npx -y skills add itseffi/agentic-os --skill systematic-debugging

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

3.1 KB, 737 tokens by cl100k_base, as published. Nobody here has run it

Systematic Debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

If you haven't completed Phase 1, you cannot propose fixes.

The Four Phases

Phase 1: Root Cause Investigation

BEFORE attempting ANY fix:

  1. Read Error Messages Carefully

    • Don't skip past errors or warnings
    • Read stack traces completely
    • Note line numbers, file paths, error codes
  2. Reproduce Consistently

    • Can you trigger it reliably?
    • What are the exact steps?
    • If not reproducible, gather more data
  3. Check Recent Changes

    • Git diff, recent commits
    • New dependencies, config changes
    • Environmental differences
  4. Trace Data Flow

    • Where does bad value originate?
    • What called this with bad value?
    • Keep tracing up until you find the source

Phase 2: Pattern Analysis

  1. Find Working Examples

    • Locate similar working code in same codebase
  2. Compare Against References

    • Read reference implementation completely
    • Don't skim - read every line
  3. Identify Differences

    • What's different between working and broken?
    • List every difference, however small

Phase 3: Hypothesis and Testing

  1. Form Single Hypothesis

    • State clearly: "I think X is the root cause because Y"
    • Write it down
  2. Test Minimally

    • Make the SMALLEST possible change
    • One variable at a time
  3. Verify Before Continuing

    • Did it work? Yes -> Phase 4
    • Didn't work? Form NEW hypothesis
    • DON'T add more fixes on top

Phase 4: Implementation

  1. Create Failing Test Case

    • Use the tdd.md skill
  2. Implement Single Fix

    • ONE change at a time
    • No "while I'm here" improvements
  3. Verify Fix

    • Test passes now?
    • No other tests broken?
  4. If 3+ Fixes Failed: Question Architecture

    • Is this pattern fundamentally sound?
    • Should we refactor vs continue fixing symptoms?
    • Discuss before attempting more fixes

Red Flags - STOP and Follow Process

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • "I don't fully understand but this might work"
  • Proposing solutions before tracing data flow
  • "One more fix attempt" (when already tried 2+)

ALL mean: STOP. Return to Phase 1.

Quick Reference

PhaseKey ActivitiesSuccess Criteria
1. Root CauseRead errors, reproduce, check changesUnderstand WHAT and WHY
2. PatternFind working examples, compareIdentify differences
3. HypothesisForm theory, test minimallyConfirmed or new hypothesis
4. ImplementationCreate test, fix, verifyBug resolved, tests pass

When to Use

Use this skill when the task directly matches the workflow described above.

When Not to Use

Do not use this skill when the request is unrelated, low-stakes, or better handled by a simpler direct response.

What ships with it: 1 file

193 B alongside SKILL.md

agents/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.