agentleFS
PanPanFRPanPanFR/oh-my-openkilo/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill9 starsChanged 3 months agoMITView on GitHub

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

191 other projects use a version of this, 84 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

10 rules. 2 are common, 8 are distinctive, and 0 are very specific to this project.

  • 2

    Common

    Most of the 173 edited versions we read keep these.

  • 8

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

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

    line 18
  3. Distinctive:

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

    line 22
  4. Distinctive:

    Use ESPECIALLY when: under time pressure, "just one quick fix" seems obvious, you've tried multiple fixes, previous fix didn't work, or you …

    line 24
  5. Distinctive:

    Root Cause Investigation: - Read errors completely, reproduce consistently, check recent changes (git diff), gather evidence at component …

    line 41
  6. Distinctive:

    Implementation: - Create failing test case first, implement single fix for root cause, verify no other tests broke.

    line 44
  7. Distinctive:

    If 3+ fixes failed: this is NOT a failed hypothesis - it is a wrong architecture.

    line 56
  8. Distinctive:

    If investigation reveals the issue is truly environmental, timing-dependent, or external:

    line 69
  9. Distinctive:

    Document what you investigated

    line 71
  10. Distinctive:

    Add monitoring/logging for future investigation

    line 73

“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

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, production bugs, unexpected behavior, performance problems, build failures, integration issues.

Use ESPECIALLY when: under time pressure, "just one quick fix" seems obvious, you've tried multiple fixes, previous fix didn't work, or you don't fully understand the issue. Simple-looking bugs have root causes too. Rushing guarantees rework.

Reference Map - load when you hit these situations

SituationRead FIRST
Always - full phase-by-phase instructionsreferences/phase-details.md
System has multiple components (CI → build → signing, API → service → DB)references/phase-details.md § "Multi-Component Evidence"
Error is deep in a call stackroot-cause-tracing.md (this directory)
Tempted to skip steps / rationalizingreferences/rationalizations.md
Root cause found, adding layered protectiondefense-in-depth.md (this directory)
Test fails only intermittently / timing-dependentcondition-based-waiting.md (this directory)

The Four Phases (summary)

You MUST complete each phase before proceeding to the next. Full instructions in references/phase-details.md.

  1. Root Cause Investigation - Read errors completely, reproduce consistently, check recent changes (git diff), gather evidence at component boundaries, trace data flow to origin.
  2. Pattern Analysis - Find working examples in same codebase, compare against reference implementations COMPLETELY, list every difference, understand dependencies.
  3. Hypothesis and Testing - Form ONE specific hypothesis ("X is the root cause because Y"), make smallest possible change to test it, one variable at a time. Didn't work? NEW hypothesis, never stack fixes.
  4. Implementation - Create failing test case first, implement single fix for root cause, verify no other tests broke. 3+ failed fixes = STOP and question architecture with your human partner.

Red Flags - STOP and Return to Phase 1

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • Adding multiple changes before testing
  • Skipping the test, manual verification instead
  • Proposing solutions before tracing data flow
  • "One more fix attempt" after 2+ failures
  • Each fix reveals a new problem in a different place

If 3+ fixes failed: this is NOT a failed hypothesis - it is a wrong architecture. STOP, question fundamentals, discuss with your human partner.

Quick Reference

PhaseKey ActivitiesSuccess Criteria
1. Root CauseRead errors, reproduce, check changes, gather evidenceUnderstand 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 Process Reveals "No Root Cause"

If investigation reveals the issue is truly environmental, timing-dependent, or external:

  1. You've completed the process
  2. Document what you investigated
  3. Implement appropriate handling (retry, timeout, error message)
  4. Add monitoring/logging for future investigation

But: 95% of "no root cause" cases are incomplete 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.