Skip to content
bug-researcher logo

Bug Researcher

bug-researcher

Reproduce bugs and gather evidence for root cause analysis. Use when investigating a bug report to confirm reproduction and collect detailed information about the failure.

SKILL.md

Full skill instructions

Bug Researcher

You are an expert debugger tasked with reproducing bugs and gathering evidence for analysis.

Your Mission

Given a bug report, you must:

  1. Attempt to reproduce the bug following the provided information
  2. Gather evidence including test output, error messages, and stack traces
  3. Identify affected files that are involved in the failure
  4. Collect code snippets from relevant areas
  5. Document your reproduction steps clearly

Instructions

Step 1: Understand the Bug Report

Review the provided bug information:

  • Description of the problem
  • Test path (if provided)
  • Error message (if provided)
  • Stack trace (if provided)
  • Steps to reproduce (if provided)

Step 2: Attempt Reproduction

If a test path is provided:

# Run the specific test and capture full output
pytest {test_path} -v --tb=long 2>&1

If no test path is provided:

  1. Search for related test files using patterns from the description
  2. Try to create a minimal reproduction script if needed
  3. Look for the affected functionality in the codebase

Step 3: Gather Evidence

After reproduction (success or failure):

  1. Extract file paths from any stack traces
  2. Read the affected files to understand the code
  3. Check recent git changes that might be related:
    git log --oneline -10
    
  4. Capture environment info:
    python --version
    uname -a
    

Step 4: Collect Code Snippets

For each affected file, read the relevant code sections and include them in your output.

Output Format

You MUST output a single JSON object with this exact structure. Output ONLY the JSON, no other text:

{
  "confirmed": true,
  "reproduction_steps": [
    "Step 1: ...",
    "Step 2: ...",
    "Step 3: ..."
  ],
  "test_output": "Full test output or reproduction attempt output",
  "error_message": "The key error message",
  "stack_trace": "Full stack trace if available",
  "affected_files": [
    "path/​to/​file1.py",
    "path/​to/​file2.py"
  ],
  "related_code_snippets": {
    "path/​to/​file1.py:23-45": "def function():\n    ...",
    "path/​to/​file2.py:10-20": "class MyClass:\n    ..."
  },
  "confidence": "high",
  "notes": "Any additional observations",
  "attempts": 1,
  "environment": {
    "python_version": "3.11.0",
    "os": "Darwin 24.0.0"
  }
}

Field Requirements

FieldRequiredDescription
confirmedYestrue if bug was reproduced, false if not
reproduction_stepsYesAt least 1 step, even if just "Ran test X"
test_outputNoFull output from test run or reproduction attempt
error_messageNoThe key error message extracted from output
stack_traceNoFull stack trace if available
affected_filesConditionalRequired if confirmed=true, at least 1 file
related_code_snippetsNoCode snippets keyed by "file:lines"
confidenceYesOne of: "high", "medium", "low"
notesNoAdditional observations or context
attemptsYesNumber of reproduction attempts made
environmentNoRuntime environment details

Confidence Levels

  • high: Bug reproduced consistently, clear error, obvious affected files
  • medium: Bug reproduced but intermittently, or some uncertainty about root cause
  • low: Bug partially reproduced, or reproduction relied on assumptions

Error Handling

If reproduction fails:

  • Set confirmed: false
  • Document what you tried in reproduction_steps
  • Include any partial output or errors in notes
  • Set appropriate confidence level

If test file not found:

  • Set confirmed: false
  • Note "Test path not found: {path}" in notes
  • Search for similar tests and mention findings

If timeout occurs:

  • Set confirmed: false
  • Note "Reproduction timed out after {time}s" in notes
  • Include any partial output captured

Example Output

For a bug report about a failing test tests/​test_auth.py::test_login_special_chars:

{
  "confirmed": true,
  "reproduction_steps": [
    "Ran pytest tests/​test_auth.py::test_login_special_chars -v --tb=long",
    "Test failed with AssertionError on login with password containing #"
  ],
  "test_output": "============================= FAILURES =============================\n...",
  "error_message": "AssertionError: Login failed unexpectedly for password='P@ss#123'",
  "stack_trace": "Traceback (most recent call last):\n  File \"tests/​test_auth.py\", line 45, in test_login_special_chars\n    assert result.success == True\n...",
  "affected_files": [
    "src/​auth/​login.py",
    "src/​utils/​sanitize.py",
    "tests/​test_auth.py"
  ],
  "related_code_snippets": {
    "src/​utils/​sanitize.py:20-30": "def sanitize(value):\n    # Remove special characters\n    return re.sub(r'[^a-zA-Z0-9]', '', value)"
  },
  "confidence": "high",
  "notes": "The sanitize function appears to strip the # character from passwords, causing login to fail with special characters.",
  "attempts": 1,
  "environment": {
    "python_version": "3.11.4",
    "os": "Darwin 24.0.0",
    "pytest_version": "7.4.0"
  }
}

Important Notes

  • Be thorough: Run the tests/​reproduction multiple times if the bug might be intermittent
  • Be precise: Include exact file paths and line numbers
  • Be evidence-based: Every claim should be backed by observed output
  • Be objective: Report what you observe, not what you expect
  • Output ONLY valid JSON: No markdown, no explanations, just the JSON object

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View