plugins/compound-engineering/skills/reproduce-bug/SKILL.md
Systematically reproduce and investigate a bug from a GitHub issue. Use when the user provides a GitHub issue number or URL for a bug they want reproduced or investigated.
npx skillsauth add gvkhosla/compound-engineering-pi reproduce-bugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A framework-agnostic, hypothesis-driven workflow for reproducing and investigating bugs from issue reports. Works across any language, framework, or project type.
Fetch and analyze the bug report to extract structured information before touching the codebase.
If no issue number or URL was provided as an argument, ask the user for one before proceeding (using the platform's question tool -- e.g., AskUserQuestion in Claude Code, request_user_input in Codex, ask_user in Gemini -- or present a prompt and wait for a reply).
gh issue view $ARGUMENTS --json title,body,comments,labels,assignees
If the argument is a URL rather than a number, extract the issue number or pass the URL directly to gh.
Read the issue and comments, then identify:
If the issue lacks reproduction steps or is ambiguous, note what is missing -- this shapes the investigation strategy.
Before running anything, form theories about the root cause. This focuses the investigation and prevents aimless exploration.
Use the native content-search tool (e.g., Grep in Claude Code) to find code paths related to the reported symptoms. Search for:
Based on the issue details and code search results, write down 2-3 plausible hypotheses. Each should identify:
Rank hypotheses by likelihood. Start investigating the most likely one first.
Attempt to trigger the bug. The reproduction strategy depends on the bug type.
Write or find an existing test that exercises the suspected code path:
Use the agent-browser CLI for browser automation. Do not use any alternative browser MCP integration or built-in browser-control tool. See the agent-browser skill for setup and detailed CLI usage.
agent-browser open http://localhost:${PORT:-3000}
agent-browser snapshot -i
If the server is not running, ask the user to start their development server and provide the correct port.
To detect the correct port, check project instruction files (AGENTS.md, CLAUDE.md) for port references, then package.json dev scripts, then .env files, falling back to 3000.
Navigate to the affected area and execute the steps from the issue:
agent-browser open "http://localhost:${PORT}/[affected_route]"
agent-browser snapshot -i
Use agent-browser commands to interact with the page:
agent-browser click @ref -- click elementsagent-browser fill @ref "text" -- fill form fieldsagent-browser snapshot -i -- capture current stateagent-browser screenshot bug-evidence.png -- save visual evidenceWhen the bug is reproduced:
For bugs that require specific data conditions, user roles, external service state, or cannot be automated:
AskUserQuestion in Claude Code, request_user_input in Codex, ask_user in Gemini -- or present options and wait for a reply) whether they can set up the required conditionsIf the bug cannot be reproduced after trying the most likely hypotheses:
git log --oneline -20 -- [affected_files]Dig deeper into the root cause using whatever observability the project offers.
Search for errors, warnings, or unexpected behavior around the time of reproduction. What to check depends on the bug and what the project has available:
Starting from the entry point identified in Phase 2, trace the execution path:
git log --oneline -10 -- [file]Summarize everything discovered during the investigation.
Organize findings into:
app/services/example_service.rb:42)Present the full report to the user. Do not post comments to the GitHub issue or take any external action without explicit confirmation.
Ask the user (using the platform's question tool, or present options and wait):
Investigation complete. How to proceed?
1. Post findings to the issue as a comment
2. Start working on a fix
3. Just review the findings (no external action)
If the user chooses to post to the issue:
gh issue comment $ARGUMENTS --body "$(cat <<'EOF'
## Bug Investigation
**Root Cause:** [summary]
**Reproduction Steps (verified):**
1. [step]
2. [step]
**Relevant Code:** [file:line references]
**Suggested Fix:** [description if applicable]
EOF
)"
tools
Triage and categorize findings for the CLI todo system
development
Always-on code-review persona. Reviews code for test coverage gaps, weak assertions, brittle implementation-coupled tests, and missing edge case coverage. Spawned by the ce:review-beta skill as part of a reviewer ensemble.
tools
Build and test iOS apps on simulator using XcodeBuildMCP
testing
Run browser tests on pages affected by current PR or branch