flow-debugging

4-phase systematic debugging for flow-fix. NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

242 stars

Best use case

flow-debugging is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 4-phase systematic debugging for flow-fix. NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

4-phase systematic debugging for flow-fix. NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "flow-debugging" skill to help with this workflow task. Context: 4-phase systematic debugging for flow-fix. NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/flow-debugging/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/dimon94/flow-debugging/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/flow-debugging/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How flow-debugging Compares

Feature / Agentflow-debuggingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

4-phase systematic debugging for flow-fix. NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Flow Debugging - Systematic Debugging Method

## The Iron Law

```
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
```

Bug fixing is not a guessing game. Systematic debugging = faster fixes + fewer regressions.

## The 4-Phase Process

```
Phase 1: ROOT CAUSE INVESTIGATION (NO FIXES YET)
    ↓
Phase 2: PATTERN ANALYSIS
    ↓
Phase 3: HYPOTHESIS AND TESTING
    ↓
Phase 4: IMPLEMENTATION (TDD)
```

## Phase 1: Root Cause Investigation

**Iron Law**: In this phase, **NO FIX CODE ALLOWED**.

```yaml
Step 1: Read Error Completely
  - Don't skip any details
  - Record: error type, message, stack trace
  - Record: when it happens, frequency, impact

Step 2: Stable Reproduction
  - Find reliable reproduction steps
  - Record: inputs, environment, preconditions
  - If can't reproduce → gather more information

Step 3: Check Recent Changes
  - git log --oneline -20
  - git diff HEAD~5
  - Ask: What changed? When did it start failing?

Step 4: Trace Data Flow Backwards
  - Start from error point
  - Trace upstream
  - Find where data goes wrong
```

**Output**: Root cause hypothesis (evidence-based, not a guess)

## Phase 2: Pattern Analysis

```yaml
Step 1: Find Working Examples
  - Where does similar functionality work?
  - Compare: working vs broken

Step 2: Compare with Reference
  - What does official documentation say?
  - How do other projects do it?
  - What's different?

Step 3: Identify Patterns
  - Is this a known bug pattern?
  - Search: error message + framework name
```

**Output**: Confirmed or refined root cause hypothesis

## Phase 3: Hypothesis and Testing

```yaml
Step 1: Form Single Hypothesis
  - "The problem is because X"
  - Hypothesis must be verifiable

Step 2: Test One Variable at a Time
  - Change only one factor
  - Observe result
  - Record: what changed, what happened

Step 3: 3+ Failed Fixes → STOP
  - If 3+ fix attempts fail
  - Stop and question architecture
  - Problem may be deeper than thought
```

**Red Flag**: If you're "trying this, trying that", you're guessing, not debugging.

## Phase 4: Implementation (TDD)

**Prerequisite**: Phases 1-3 complete, root cause confirmed

```yaml
Step 1: Write Failing Test First
  - Test must reproduce the bug
  - Run test, confirm it fails
  - This is your "red light"

Step 2: Implement Single Fix
  - Fix only the root cause
  - Don't "while I'm here" other things
  - Minimal change

Step 3: Verify
  - Run test, confirm it passes
  - Run related tests, confirm no regression
  - Manual verify original issue resolved
```

## Rationalization Prevention

| Excuse | Reality |
|--------|---------|
| "I know where the problem is" | Prove it. Investigate first. |
| "Quick fix" | Quick fix = quick regression. Systematic debug. |
| "No time for tests" | No tests = don't know if really fixed. |
| "Small change" | Small changes can introduce big bugs. Test it. |
| "Fix first, investigate later" | Fixing without understanding = guessing. |
| "Let me try this" | "Trying" is not debugging. Form hypothesis, verify it. |
| "It's obvious" | Nothing is obvious. Prove with evidence. |
| "I've seen this before" | Every bug is unique. Investigate this one. |

## Red Flags - STOP

If you find yourself:
- Fixing without reproduction
- "Trying this, trying that"
- 3+ failed fix attempts
- Saying "fixed" without tests
- Changing many files for one bug

**STOP. Go back to Phase 1. Investigate root cause.**

## Debug Output Template

```markdown
# Bug Analysis - ${BUG_ID}

## Phase 1: Root Cause Investigation

### Error Details
- Type: [error type]
- Message: [error message]
- Stack: [key stack frames]

### Reproduction
- Steps: [1, 2, 3...]
- Frequency: [always/sometimes/rare]
- Environment: [conditions]

### Recent Changes
- [relevant commits]

### Data Flow Analysis
- [where data goes wrong]

### Root Cause Hypothesis
[Evidence-based hypothesis]

## Phase 2: Pattern Analysis

### Working Example
[Where similar code works]

### Comparison
[Difference between working and broken]

### Confirmed Root Cause
[Refined hypothesis]

## Phase 3: Hypothesis Testing

### Hypothesis
[Single testable hypothesis]

### Test Results
| Change | Result |
|--------|--------|
| [change 1] | [result] |

## Phase 4: Implementation

### Failing Test
[Test code that reproduces bug]

### Fix
[Minimal fix code]

### Verification
- [ ] Test passes
- [ ] No regression
- [ ] Manual verification
```

## Integration with flow-fix

This skill is the core methodology for `/flow-fix` command:

```yaml
/flow-fix phases:
  阶段 1: Root Cause Investigation → This skill Phase 1
  阶段 2: Pattern Analysis & Planning → This skill Phase 2
  阶段 3: 修复执行 (TDD) → This skill Phase 3-4
  阶段 4: 验证与发布 → verification-before-completion
```

## Cross-Reference

- [flow-fix.md](../../commands/flow-fix.md) - Bug fix command
- [flow-tdd/SKILL.md](../flow-tdd/SKILL.md) - TDD enforcement
- [verification-before-completion](../verification-before-completion/SKILL.md) - Verification skill

---

**[PROTOCOL]**: 变更时更新此头部,然后检查 CLAUDE.md

Related Skills

req-change-workflow

242
from aiskillstore/marketplace

Standardize requirement/feature changes in an existing codebase (especially Chrome extensions) by turning "改需求/需求变更/调整交互/改功能/重构流程" into a repeatable loop: clarify acceptance criteria, confirm current behavior from code, assess impact/risk, design the new logic, implement with small diffs, run a fixed regression checklist, and update docs/decision log. Use when the user feels the change process is chaotic, when edits tend to sprawl across files, or when changes touch manifest/service worker/OAuth/storage/UI and need reliable verification + rollback planning.

defou-workflow

242
from aiskillstore/marketplace

将原始想法转化为结构清晰、判断明确、具有长期价值的“得否”风格内容报告。

defou-stanley-workflow

242
from aiskillstore/marketplace

Defou x Stanley 融合工作流:结合深度结构化思考与人性弱点洞察,生成极简、犀利且具有长期价值的爆款内容。

agentic-workflow

242
from aiskillstore/marketplace

Practical AI agent workflows and productivity techniques. Provides optimized patterns for daily development tasks such as commands, shortcuts, Git integration, MCP usage, and session management.

workflow-patterns

242
from aiskillstore/marketplace

Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.

workflow-orchestration-patterns

242
from aiskillstore/marketplace

Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.

workflow-automation

242
from aiskillstore/marketplace

Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off. This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation. Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility

webflow-automation

242
from aiskillstore/marketplace

Automate Webflow CMS collections, site publishing, page management, asset uploads, and ecommerce orders via Rube MCP (Composio). Always search tools first for current schemas.

tdd-workflows-tdd-refactor

242
from aiskillstore/marketplace

Use when working with tdd workflows tdd refactor

tdd-workflows-tdd-red

242
from aiskillstore/marketplace

Generate failing tests for the TDD red phase to define expected behavior and edge cases.

tdd-workflows-tdd-green

242
from aiskillstore/marketplace

Implement the minimal code needed to make failing tests pass in the TDD green phase.

tdd-workflows-tdd-cycle

242
from aiskillstore/marketplace

Use when working with tdd workflows tdd cycle