# Reproduce Bug

Use when a named runtime or compiler bug in a local repository needs independent...

- Repository: https://github.com/trailofbits/skills (7935 stars)
- Category: Engineering
- License: CC-BY-SA-4.0
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add trailofbits/skills --skill reproduce-bug -g -a claude-code -y`
Codex: `npx skills add trailofbits/skills --skill reproduce-bug -g -a codex -y`
Cursor: `npx skills add trailofbits/skills --skill reproduce-bug -g -a cursor -y`
Gemini CLI: `npx skills add trailofbits/skills --skill reproduce-bug -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add trailofbits/skills`

## Description

Use when a named runtime or compiler bug in a local repository needs independent reproduction.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Reproduce Bug

## When to Use

Use for the reproduction step of `patching-bugs` with one `finding.json` and a local
baseline checkout. Read the [record contract](../../references/records.md).
Before target commands, follow its [project guidance](../../references/records.md#project-guidance).

## When NOT to Use

Do not use for bug discovery, patching, or a claim that cannot be exercised locally.
Report a blocker when the build or environment cannot exercise the claim.

## Procedure

1. Select `failure_type` from the record contract. Build the current baseline with the
   project's own command. Exercise the planned scoped inputs before any edit and
   retain their observations, including valid controls. Save raw stdout, stderr,
   exit status, and timing. If the behavior is absent with trustworthy evidence,
   report `not_reproduced`; if setup or observations are unreliable, report `blocked`.
2. Runtime: exercise the built `target_artifact` with a PoC that records `PATCH_LOADED`
   as defined in the contract, then prints `PATCH_REACHED` immediately before the assertion.
   Exit nonzero for the bug, zero otherwise; a setup crash is inconclusive.
   Compile: record the target `expected_diagnostic` from the failed compiler invocation;
   use empty `poc_argv` and null `target_artifact`.
3. Save any unchanged PoC source under `reproduce/poc/` and raw receipts
   under `reproduce/receipts/`. Write `reproduce.json` with the baseline commit,
   command argument arrays, artifact path, observed result, outcome, and your agent
   identity. Set `finding.status` to `reproduced` or `not_reproduced` from the result.
   If reproduction is `blocked`, leave `finding.status` as `hypothesis`.

The rest: https://github.com/trailofbits/skills/blob/HEAD/plugins/patching-bugs/skills/reproduce-bug/SKILL.md
