Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Reproduce Issue

ASecurity

Reproduce a bug reported in a GitHub issue by creating a worktree, analyzing the codebase, and attempting to trigger the bug.

10 stars
0 votes
0 copies
0 views
Added 10/6/2026
testingpythonbashnodegit

Works with

cli

Security Analysis

A100/100

Scanned 10/6/2026

$npx -y skills add tomzx/agents --skill reproduce-issue --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Reproduce Issue?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Reproduce Issue
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tomzx-reproduce-issue/badge)](https://www.skillsdirectory.com/skills/tomzx-reproduce-issue)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: reproduce-issue
description: Reproduce a bug reported in a GitHub issue by creating a worktree, analyzing the codebase, and attempting to trigger the bug.
allowed-tools: Bash(gh:*, git:*, ghx:*, asciinema:*, agg:*, npx:*, node:*, uv:*, python:*, python3:*, curl:*, ~/.agents/scripts/get-env:*), Read, Write, Edit, Glob, Grep
argument-hint: "<issue-number> [repository]"
---

# Reproduce Issue

Takes a GitHub issue that describes a bug, creates a git worktree on a fix branch,
and attempts to reproduce the reported behavior.
Posts the reproduction results as a comment on the issue.

Assumes `check-duplicates` has already been run to verify no duplicates or existing fix PRs.
This skill stops after reproduction. Use `fix-issue` to continue with the fix, or
call `create-implementation` directly if the issue is already reproduced.

## Prerequisites

- Apply the shared SDLC conventions in `skills/sdlc/references/shared.md`.
- If no argument is provided, target the issue from `$ISSUE_NUMBER` (and `$REPO`).
- `gh` CLI authenticated with write access to the target repository
- A GitHub issue number describing a bug
- Git worktree support (`git worktree` available)
- Read any files present under `.sdlc/context/` and apply any artifact style rules found there
- For before/after visual proof (optional, best-effort): `asciinema` + renderer for CLI bugs, or Playwright for web UI bugs. If unavailable, the recording step is skipped silently.

### Skill attribution (GitHub)

Before posting to GitHub, read `../github-post-attribution/SKILL.md` and append the footer for `SKILL_DIR` = `reproduce-issue`.

### Communication guidelines (outbound text)

Before composing any text posted or drafted on the user's behalf, apply [`communication-guidelines/SKILL.md`](../communication-guidelines/SKILL.md).

## Workflow

```
Fetch bug report issue
        |
        v
Create git worktree on fix branch
        |
        v
Analyze issue + explore codebase
        |
        v
Attempt to reproduce
        |
        v
Bug reproduced?
   /          \
 Yes            No
  |              |
  v              v
Record before   Post comment
(if surface      (unable to reproduce,
 classifiable)   ask for details)
        |
        v
Post comment
(reproduced,
 ready to fix)
```

## Steps

### 1. Fetch the bug report

Fetch the issue details to understand the bug:

```bash
ghx issue view $ISSUE_NUMBER --repo $REPO
```

Extract from the issue:
- Expected behavior
- Actual behavior
- Steps to reproduce
- Environment details (version, OS, etc.)
- Error messages, stack traces, or logs
- Any labels that indicate severity or area

If the issue lacks clear reproduction steps, check the issue author.
If the author is the current user, attempt to gather additional information from the codebase, logs, or error context and help update the original issue description with clearer steps.
If the author is someone else, comment on the issue asking for reproduction details before proceeding.

### 2. Create a git worktree

Create a worktree so the main working directory is not disturbed:

```bash
git fetch origin
WORKTREE_NAME=$(basename $(pwd))-fix-$ISSUE_NUMBER
git worktree add ../$WORKTREE_NAME -b fix/$ISSUE_NUMBER-<slug> origin/main
```

Where `<slug>` is a short hyphenated description derived from the issue title (e.g., `null-pointer-login`).

All subsequent work happens inside the worktree directory.

After creating the worktree, write `.sdlc/state.yml` inside it:

```yaml
current_phase: reproduce
github_ref: "#<issue-number>"
feature: null
```

If worktree creation fails (e.g., branch already exists, directory conflict), fall back to a regular branch:

```bash
git checkout -b fix/$ISSUE_NUMBER-<slug> origin/main
```

### 3. Analyze the codebase

- Search for the relevant code area based on the bug description.
- Identify the files, functions, and data flows involved.
- Read `.sdlc/context/architecture.md` and `.sdlc/context/conventions.md` if available.
- Note any existing tests related to the buggy behavior.

### 4. Attempt to reproduce

Based on the issue's reproduction steps, attempt to trigger the bug:

1. Follow the reported steps exactly as described.
2. If the steps are incomplete, try to infer missing steps from the error description.
3. Check out the specific commit or version mentioned in the issue if applicable.
4. Run the application or relevant test suite to observe the failure.

Record the reproduction attempt:
- What steps were taken
- Whether the bug was reproduced
- Any differences from the reported behavior
- Environment or version discrepancies

### 5. Record the before state (when reproduced)

When the bug is reproduced, capture a recording of the buggy behavior so `validate-implementation` can pair it with an after-the-fix recording before the PR is opened. This runs only on the bug-fix fast path and is best-effort: if the recording tools are unavailable or the surface cannot be classified, skip silently and proceed.

All proof assets for this issue live under a per-repo, per-issue directory so they never collide with other work:

```bash
PROOF_DIR="/tmp/$REPO/$ISSUE_NUMBER"   # expands to /tmp/<owner>/<repo>/<issue-id>
mkdir -p "$PROOF_DIR"
```

Classify the change surface from the reproduction (mirrors `validate-implementation`'s classification):

- **CLI bug** (the reproduction runs a CLI entry point, command, or script): identify the single command that triggers the bug. Read [`../record-asciinema/SKILL.md`](../record-asciinema/SKILL.md) and invoke it with:
  - `RECORD_SLUG` = `before-bug`
  - `RECORD_DIR` = `$PROOF_DIR`
  - `RECORD_COMMAND` = the triggering command
- **Web UI bug** (the reproduction loads a route or page): identify the route URL and the dev server command. Read [`../record-playwright/SKILL.md`](../record-playwright/SKILL.md) and invoke it with:
  - `RECORD_SLUG` = `before-bug`
  - `RECORD_DIR` = `$PROOF_DIR`
  - `RECORD_URL` = the route that exhibits the bug
  - `RECORD_VIEWPORTS` = `1280x720`
  - `RECORD_SERVER_CMD` = the dev server command
- **Neither / not determinable**: skip the recording.

The recording must show the bug (the error, crash, or wrong output). Re-record with `--overwrite` if the first take does not demonstrate the defect.

After a recording is produced, write a manifest so `validate-implementation` can replay the exact same demonstration on the fixed code:

```bash
# CLI surface
cat > "$PROOF_DIR/proof-manifest.txt" <<EOF
surface: cli
command: <the triggering command>
EOF

# Web UI surface
cat > "$PROOF_DIR/proof-manifest.txt" <<EOF
surface: web
url: <the route URL>
server_cmd: <the dev server command>
EOF
```

The rendered before asset lands at `$PROOF_DIR/before-bug.gif` (or `.png` / `.svg`). If no asset was produced (tools absent or surface unclassifiable), do not write a manifest; `validate-implementation` will report `surface: none` / `tools-missing` and `create-pr` will omit proof.

### 6. Post reproduction results

#### If the bug is reproduced

Comment on the issue to confirm reproduction and signal that a fix is in progress.
Include relevant details from the reproduction attempt (exact steps that triggered it, observed error, environment differences from the report):

```bash
ghx issue comment $ISSUE_NUMBER --repo $REPO --body "$(cat <<'EOF'
Reproduced. Working on a fix.

**Reproduction details:**
- <Exact steps that triggered the bug>
- <Observed error or behavior>
- <Any environment or version differences from the original report>

**Before recording:** captured at `$PROOF_DIR/before-bug.*` (pairs with an after-the-fix recording captured by `/validate-implementation` before the PR). Omit this line if no recording was taken.

---

Posted with [reproduce-issue](SKILL_FILE_URL) (`SKILL_SHORT_SHA`)
EOF
)"
```

The worktree and fix branch are now ready for implementation.
Proceed with `create-implementation` or `fix-issue`.

#### If the bug cannot be reproduced

1. Comment on the issue explaining what was tried and why reproduction failed.
2. Ask the reporter for additional details (specific version, environment, input data, etc.).
3. Do NOT proceed with a fix. Stop and inform the user.
4. Clean up the worktree if the user confirms no further action is needed:
   ```bash
   git worktree remove ../$WORKTREE_NAME
   git branch -d fix/$ISSUE_NUMBER-<slug>
   ```
5. If the user confirms the bug exists despite reproduction failure, leave the worktree in place and proceed with a best-effort fix based on code analysis.

## Failure Modes

| Mode | Response |
|---|---|
| **Cannot reproduce** | Comment on issue, ask for more details, clean up worktree |
| **Worktree creation fails** | Fall back to a regular branch in the main working directory |
| **Issue is not a bug** | Comment on the issue suggesting it be reclassified, stop |

## Outcome

If `$OUTCOME_YAML` is set, emit your verdict there per `skills/sdlc/references/shared.md`:

| Verdict | When |
|---|---|
| `reproduced` | Bug reproduced in the worktree |
| `cannot-reproduce` | Could not reproduce; needs more information |

## Example Usage

**Scenario 1: Reproducible bug**
```
/reproduce-issue 42 owner/myrepo
```
Fetches issue #42 (null pointer on login), creates worktree on `fix/42-null-pointer-login`, reproduces by sending a request with missing field, records the crash to `/tmp/<owner>/<repo>/42/before-bug.gif` with a manifest, posts reproduction details on the issue. Ready for `create-implementation`.

**Scenario 2: Cannot reproduce**
```
/reproduce-issue 15
```
Fetches issue #15 (intermittent timeout), follows reproduction steps, cannot trigger the timeout. Comments on issue asking for logs and specific timing details.

**Scenario 3: Cannot determine reproduction steps**
```
/reproduce-issue 20 owner/myrepo
```
Fetches issue #20, but the description lacks clear steps. The author is someone else, so posts a comment asking for reproduction details.

## Next Step

If reproduced, continue with `create-implementation` to write the regression test and fix,
then `validate-implementation` to capture the after recording and confirm the fix before opening a PR,
then `create-pr` to submit the pull request.
Or use `fix-issue` to orchestrate the remaining steps automatically.

Attribution

tomzxtomzx
View sourceSee grades on GitHubMore from tomzx →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Screen Reader Testing

Practical guide to testing web applications with screen readers for comprehensive accessibility validation.

401991 votes

Tdd Workflow

在编写新功能、修复错误或重构代码时使用此技能。强制执行测试驱动开发,包含单元测试、集成测试和端到端测试,覆盖率超过80%。

2456590 votes

Eval Harness

克劳德代码会话的正式评估框架,实施评估驱动开发(EDD)原则

2456590 votes

Python Testing

使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。

2456590 votes

Django Tdd

Django测试策略,包括pytest-django、TDD方法论、factory_boy、模拟、覆盖率以及测试Django REST Framework API。

2456590 votes
View all in testing →