agentleFS
drinkspillerdrinkspiller/skills/systematic_debugging/SKILL.md

systematic-debugging

Skill1 starsChanged 2 months agoUnlicenseView on GitHub

Systematic 4-phase debugging methodology: Investigation → Pattern Analysis → Hypothesis → Implementation. Use when encountering any bug, test failure, or unexpected behavior before proposing fixes. Enforces root-cause analysis over symptom fixes.

191 other projects use a version of this, 109 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, building-chatgpt-apps 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.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 projects that use this

  • mjunaidcaSkill

    building-chatgpt-apps

    Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).

    Also in 4 projects that use this

  • mjunaidcaSkill

    building-chat-interfaces

    Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.

    Also in 4 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • +8 more from mjunaidca

The file

We split this skill into the rules it gives an agent

3 rules. 2 are common, 1 is distinctive, and 0 are very specific to this project.

  • 2

    Common

    Most of the 173 edited versions we read keep these.

  • 1

    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. Common:

    Core principle: ALWAYS find root cause before attempting fixes.

    line 17
  2. Common:

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

    line 28
  3. Distinctive:

    Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.

    line 32

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

Systematic Debugging

Overview

Random fixes waste time and create new bugs. Quick patches mask underlying issues.

Core principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.

Violating the letter of this process is violating the spirit of debugging.

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

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

When to Use

Use for ANY technical issue: test failures, bugs, unexpected behavior, performance problems, build failures, integration issues.

Use ESPECIALLY when: - Under time pressure (emergencies make guessing tempting) - "Just one quick fix" seems obvious - You've already tried multiple fixes - Previous fix didn't work - You don't fully understand the issue

Don't skip when: - Issue seems simple (simple bugs have root causes too) - You're in a hurry (rushing guarantees rework)

The Four Phases

You MUST complete each phase before proceeding to the next.

Phase 1: Root Cause Investigation

BEFORE attempting ANY fix:

  1. Read Error Messages Carefully — Don't skip past errors or warnings. They often contain the exact solution. Read stack traces completely. Note line numbers, file paths, error codes.
  2. Reproduce Consistently — Can you trigger it reliably? What are the exact steps? Does it happen every time? If not reproducible, gather more data — don't guess.
  3. Check Recent Changes — What changed that could cause this? Git diff, recent commits, new dependencies, config changes, environmental differences.
  4. Gather Evidence in Multi-Component Systems — For each component boundary: log what data enters, log what data exits, verify environment/config propagation, check state at each layer. Run once to gather evidence showing WHERE it breaks, THEN analyze.
  5. Trace Data Flow — Where does the bad value originate? What called this with the bad value? Keep tracing up until you find the source. Fix at source, not at symptom.

Phase 2: Pattern Analysis

  1. Find Working Examples — Locate similar working code in same codebase.
  2. Compare Against References — Read reference implementations COMPLETELY. Don't skim.
  3. Identify Differences — List every difference, however small. Don't assume "that can't matter."
  4. Understand Dependencies — What other components, settings, config, environment does this need?

Phase 3: Hypothesis and Testing

  1. Form Single Hypothesis — State clearly: "I think X is the root cause because Y." Write it down. Be specific.
  2. Test Minimally — Make the SMALLEST possible change to test your hypothesis. If the fix doesn't work → REJECT THE HYPOTHESIS. DON'T just add another fix on top. IF your first fix doesn't work: STOP and re-analyze. You don't understand the problem yet.

Phase 4: Implementation and Verification

  1. Clean Implementation — Remove any temporary debug logs. Apply the fix cleanly, following project style. Add comments explaining WHY.
  2. Verify the Fix — Reproduce the original failure scenario. Verify it's gone. Run ALL related tests. Check for side effects.
  3. Add Regression Test — Create a test that fails without this fix. Ensure it passes now.

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.