Skip to content
Skillpedia
Security8.0k · #12691

reproduce-bug

What it does

Tries to reproduce a known bug in a local project using the original code and planned inputs, then saves the raw output. It is for developers and reviewers confirming a reported bug before fixing it.

When to use it

  • ✓When a developer needs to reproduce a named bug in a local project.
  • ✓When a reviewer wants to see whether a reported compiler or runtime bug really happens.
  • ✓When a team needs reproduction evidence before writing a fix.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/patching-bugs/skills/reproduce-bug/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Reproduce this reported crash in my local project on the original code and save the output.”

5 new skills a week. 1 minute to read.

How it works

The skill builds the current code with the project's own command and runs the planned inputs, including control cases. It saves stdout, stderr, exit status and timing, then reports whether the bug was reproduced, not reproduced or blocked.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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. Before target commands, follow its 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.

    Reproduce record schema:

{
  "schema_version": 1,
  "failure_type": "runtime",
  "outcome": "reproduced",
  "baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "build_argv": ["python", "build.py"],
  "poc_argv": ["python", "poc.py"],
  "target_artifact": "dist/app.py",
  "observed": "The PoC wrote outside uploads after PATCH_REACHED.",
  "blocker": null,
  "agent": "reproducer-1"
}
  1. Manifest the complete reproduce/ directory, including the PoC and record, using the record helper: run uv run --no-project <script> manifest <reproduce-step-dir>. Then check the record before handoff. State blocked with the actual failure when build or setup prevents a valid run.

Rationalizations to Reject

Shortcut Required action
A unit test imitates the bug. Exercise the target compiler or built runtime artifact.
A nonzero exit proves reproduction. Require the target diagnostic, or runtime marker and assertion.
FAQ

What if the bug does not happen?

The skill reports not reproduced when it has reliable evidence that the behavior is absent.

What if the build fails?

The skill reports blocked, since unreliable setup cannot show that a bug is absent.

Does it fix the bug?

No. It only reproduces the bug. Patching is a separate step.

Details

Original description by the author

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

repo: trailofbits/skills

Popularity

GitHub stars
8.0k
Ranking position
#12691
License
CC-BY-SA-4.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills