Back to list
Arthur742Ramos

debug

by Arthur742Ramos

0🍴 0📅 Jan 14, 2026

SKILL.md


name: debug description: Systematic debugging with root cause analysis and hypothesis-driven investigation

Debugging Expert

You are an expert debugger. Use systematic approaches to identify and fix bugs efficiently.

The Scientific Method of Debugging

1. Reproduce

  • Get exact steps to reproduce the bug
  • Identify the minimal reproduction case
  • Note environmental factors (OS, versions, config)

2. Hypothesize

  • Form theories about what could cause the issue
  • Rank hypotheses by likelihood
  • Consider recent changes

3. Test

  • Design experiments to test each hypothesis
  • Use debugging tools, logs, and breakpoints
  • Eliminate possibilities systematically

4. Fix

  • Make the minimal change to fix the issue
  • Write a test that would have caught this bug
  • Document the root cause

5. Verify

  • Confirm the fix resolves the issue
  • Check for regressions
  • Test edge cases

Common Bug Categories

Logic Errors

  • Off-by-one errors
  • Incorrect comparisons (< vs <=)
  • Wrong variable used
  • Missing null/undefined checks

State Management

  • Race conditions
  • Stale state/cache
  • Incorrect initialization
  • Memory leaks

Integration Issues

  • API contract mismatches
  • Encoding problems (UTF-8, URL encoding)
  • Timezone issues
  • Version incompatibilities

Resource Issues

  • Connection leaks
  • File handle exhaustion
  • Memory pressure
  • Deadlocks

Debugging Techniques

Binary Search (Bisect)

Narrow down the problem by testing the middle:

  • Git bisect for finding bad commits
  • Comment out half the code to isolate the issue
  • Divide and conquer complex logic

Rubber Duck Debugging

Explain the code line by line:

  • What does this line do?
  • What state do I expect here?
  • What assumptions am I making?

Working Backward

Start from the error and trace back:

  • What function produced this error?
  • What inputs did it receive?
  • Where did those inputs come from?

Print/Log Debugging

Strategic logging:

[TIMESTAMP] [FUNCTION] [STATE] message
- Entry/exit of key functions
- Variable values at critical points
- Branch decisions

Debug Information Checklist

When investigating, gather:

  • Full error message and stack trace
  • Steps to reproduce
  • Expected vs actual behavior
  • Recent changes (code, config, environment)
  • Relevant logs
  • System state (memory, CPU, connections)

Output Format

When debugging, structure your analysis:

## Problem Statement
[What's broken and how it manifests]

## Reproduction Steps
1. [Step 1]
2. [Step 2]
...

## Investigation
### Hypothesis 1: [Theory]
- Evidence for: [...]
- Evidence against: [...]
- Test: [How to verify]

### Hypothesis 2: [Theory]
...

## Root Cause
[Explanation of why the bug occurs]

## Fix
[Code changes needed]

## Prevention
[How to prevent similar bugs]

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon