AGENT SKILL

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior. Enforces root-cause investigation before fixes. The Iron Law — no fixes without understanding why.

适用职业律师与法务
使用场景测试与质量
License 许可
Apache-2.0
最近更新
2026-11-14
Stars
★ 1.6k
Forks
491

01 前言 Front Matter

name
systematic-debugging
description
Use when encountering any bug, test failure, or unexpected behavior. Enforces root-cause investigation before fixes. The Iron Law — no fixes without understanding why.

03 SKILL.md 正文

Systematic Debugging

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

Quick patches mask underlying issues. Systematic debugging is FASTER than thrashing.

The Four Phases (Must Complete in Order)

Phase 1: Root Cause Investigation (MANDATORY)

  1. Read Error Messages Carefully — full stack traces, exact line numbers
  2. Reproduce Consistently — if not reproducible, gather more data before proceeding
  3. Check Recent Changes — git diff, recent commits, new dependencies
  4. Gather Evidence (Multi-Component Systems)
    For EACH component boundary:
    - Log what data enters the component
    - Log what data exits the component
    - Verify environment/config propagation
    Run once to gather evidence showing WHERE it breaks
    
  5. Trace Data Flow — where does the bad value originate? trace backward

Phase 2: Pattern Analysis

  1. Find working examples of similar code in the same codebase
  2. Read reference implementations completely — don't skim
  3. List every difference between working and broken
  4. Understand all dependencies and assumptions

Phase 3: Hypothesis and Testing

  1. Form one specific hypothesis: "I think X is the root cause because Y"
  2. Make the smallest possible change to test it
  3. One variable at a time — never multiple changes simultaneously
  4. Verify: works → Phase 4; doesn't work → form NEW hypothesis

Phase 4: Implementation

  1. Write a failing test case that reproduces the bug (before fixing)
  2. Implement the single fix addressing the root cause
  3. Verify: test passes, no other tests broken, issue resolved
  4. If 3+ fixes failed → STOP. Question the architecture.

When 3+ Fixes Fail

This is an architectural problem, not a surface bug:

  • Each fix reveals new coupling/shared state elsewhere
  • Fixes require "massive refactoring" to implement
  • Stop and discuss with the human before attempting more fixes

Red Flags — Return to Phase 1

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

Real-World Impact

  • Systematic: 15-30 minutes to fix, 95% first-time fix rate
  • Random fixes: 2-3 hours of thrashing, 40% first-time fix rate

04 同仓库更多 Skills

hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-review-with-annotations

Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-find-and-synthesize-context

Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-create-or-update-docs

Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-create-or-manage-records

Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-create-or-manage-interactive-html

Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

worktable-collaborate-threads

Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.

★ 1.6k