home / skills / everyinc / compound-engineering-plugin / reproduce-bug

This skill helps you reproduce and investigate bugs by gathering logs, inspecting console output, and capturing browser screenshots with Playwright.

npx playbooks add skill everyinc/compound-engineering-plugin --skill reproduce-bug

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.0 KB
---
name: reproduce-bug
description: Reproduce and investigate a bug using logs, console inspection, and browser screenshots
argument-hint: "[GitHub issue number]"
disable-model-invocation: true
---

# Reproduce Bug Command

Look at github issue #$ARGUMENTS and read the issue description and comments.

## Phase 1: Log Investigation

Run the following agents in parallel to investigate the bug:

1. Task rails-console-explorer(issue_description)
2. Task appsignal-log-investigator(issue_description)

Think about the places it could go wrong looking at the codebase. Look for logging output we can look for.

Run the agents again to find any logs that could help us reproduce the bug.

Keep running these agents until you have a good idea of what is going on.

## Phase 2: Visual Reproduction with Playwright

If the bug is UI-related or involves user flows, use Playwright to visually reproduce it:

### Step 1: Verify Server is Running

```
mcp__plugin_compound-engineering_pw__browser_navigate({ url: "http://localhost:3000" })
mcp__plugin_compound-engineering_pw__browser_snapshot({})
```

If server not running, inform user to start `bin/dev`.

### Step 2: Navigate to Affected Area

Based on the issue description, navigate to the relevant page:

```
mcp__plugin_compound-engineering_pw__browser_navigate({ url: "http://localhost:3000/[affected_route]" })
mcp__plugin_compound-engineering_pw__browser_snapshot({})
```

### Step 3: Capture Screenshots

Take screenshots at each step of reproducing the bug:

```
mcp__plugin_compound-engineering_pw__browser_take_screenshot({ filename: "bug-[issue]-step-1.png" })
```

### Step 4: Follow User Flow

Reproduce the exact steps from the issue:

1. **Read the issue's reproduction steps**
2. **Execute each step using Playwright:**
   - `browser_click` for clicking elements
   - `browser_type` for filling forms
   - `browser_snapshot` to see the current state
   - `browser_take_screenshot` to capture evidence

3. **Check for console errors:**
   ```
   mcp__plugin_compound-engineering_pw__browser_console_messages({ level: "error" })
   ```

### Step 5: Capture Bug State

When you reproduce the bug:

1. Take a screenshot of the bug state
2. Capture console errors
3. Document the exact steps that triggered it

```
mcp__plugin_compound-engineering_pw__browser_take_screenshot({ filename: "bug-[issue]-reproduced.png" })
```

## Phase 3: Document Findings

**Reference Collection:**

- [ ] Document all research findings with specific file paths (e.g., `app/services/example_service.rb:42`)
- [ ] Include screenshots showing the bug reproduction
- [ ] List console errors if any
- [ ] Document the exact reproduction steps

## Phase 4: Report Back

Add a comment to the issue with:

1. **Findings** - What you discovered about the cause
2. **Reproduction Steps** - Exact steps to reproduce (verified)
3. **Screenshots** - Visual evidence of the bug (upload captured screenshots)
4. **Relevant Code** - File paths and line numbers
5. **Suggested Fix** - If you have one

Overview

This skill reproduces and investigates bugs by combining log analysis, console inspection, and browser screenshots. It runs targeted agents to find relevant logs, uses Playwright to reproduce UI issues, and packages findings into a clear issue comment. The goal is a verified reproduction, evidence, and actionable next steps for a fix.

How this skill works

First, the skill runs parallel log-investigation agents against the issue description to locate relevant log lines and likely failure locations in the codebase. Next, if the issue involves UI or user flows, it launches Playwright to navigate the app, execute the reported steps, capture screenshots, and collect console errors. Finally, it collects file paths, screenshots, console output and documented reproduction steps and prepares a concise issue comment with findings and suggested fixes.

When to use it

  • A bug report lacks a reliable reproduction or clear root cause.
  • You need concrete logs or stack traces tied to an issue.
  • UI regressions or user-flow failures that require visual evidence.
  • To gather evidence before proposing code changes or creating a PR.
  • When issue comments need a reproducible checklist and suggested fix.

Best practices

  • Start by reading the issue description and all comments to extract exact reproduction steps.
  • Run log investigators repeatedly until you find deterministic or helpful traces.
  • Verify the dev server is running before Playwright steps; instruct user to run bin/dev if not.
  • Take screenshots and console error dumps at every significant step.
  • Record exact file paths and line numbers for any suspect code paths.
  • Prepare a single, actionable issue comment with findings, reproduction steps, screenshots, and a suggested fix.

Example use cases

  • Reproduce a frontend form validation bug that only appears after a specific sequence of inputs.
  • Investigate an intermittent server error by finding matching logs and stack traces, then reproducing related requests in the browser.
  • Capture and document a visual regression introduced by a recent commit using Playwright screenshots and console errors.
  • Gather evidence for a performance issue by locating slow endpoints in logs and reproducing the user flow in the browser.
  • Provide a maintainable bug report with file references and a proposed code change for reviewers.

FAQ

What if the server is not running locally?

Inform the user to start the dev server (bin/dev) and retry the Playwright steps; the skill will fail to capture UI evidence otherwise.

How many times should log agents be run?

Repeat until you can correlate logs with the failing behavior; typically 2–4 iterations focusing on different suspected code paths.

What evidence is included in the issue comment?

Reproduction steps, screenshots, console error logs, relevant file paths/line numbers, and a suggested fix or next steps.