Fix errors · Skill

Write a failure reproduction

write-failure-reproduction

Turns a vague or intermittent failure report into the smallest repeatable reproduction, with expected and actual behaviour, and stops short of editing product code. Use when the report is incomplete, the failure comes and goes, or someone asks for a repro first.

Works with: Any AI Not yet model-tested; testing Jan 2027

Paste it into ChatGPT, Claude, Gemini or any AI chat, then tell it about your project. How it works

Install in Claude Code, Cursor or Codex (optional)

Only for AI coding tools that read skill folders. Run one line in a terminal, in your project folder. It downloads this skill's text files from TheSkillVault and nothing else; you can read them first with “View raw SKILL.md”.

Claude Code (all your projects)

curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-failure-reproduction/raw' -o ~/'.claude/skills/write-failure-reproduction/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-failure-reproduction/files/LICENSE.txt' -o ~/'.claude/skills/write-failure-reproduction/LICENSE.txt'

Cursor (this project)

curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-failure-reproduction/raw' -o '.cursor/skills/write-failure-reproduction/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-failure-reproduction/files/LICENSE.txt' -o '.cursor/skills/write-failure-reproduction/LICENSE.txt'

Codex and other Agent Skills tools (this project)

curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-failure-reproduction/raw' -o '.agents/skills/write-failure-reproduction/SKILL.md' && curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/write-failure-reproduction/files/LICENSE.txt' -o '.agents/skills/write-failure-reproduction/LICENSE.txt'

Or connect the whole library over MCP

Add TheSkillVault to Cursor or add this to your app's MCP settings (read-only; help):

{
  "mcpServers": {
    "theskillvault": {
      "url": "https://theskillvault.ai/mcp"
    }
  }
}

A code change without a repro is a guess. The deliverable here is the smallest case that still fails, written down so someone else can run it.

When to use

  • The report says "it broke" and gives no steps.
  • The failure is flaky, or only happens on one machine.
  • A teammate already named a cause, and that cause is still a guess.

When not to use

  • You already have a tiny failing test and you want a root-cause method. That is a different checklist.
  • The user wants the patch written now and the failure is already captured.

Steps

  1. Record the observed failure: the exact message, the route or command, the time, and the smallest input anyone has named. Mark second-hand claims as unverified.
  2. Record only the environment you can see: commit, runtime version, lockfile, operating system, and whether this is local, staging or production. Do not guess config.
  3. Write two lines and nothing else in them. Expected: what should be observable. Actual: what happens, including the status or error. Do not put a suspected cause in either line.
  4. Remove steps, data and services one at a time. When the failure disappears, restore the last piece you removed and note it. Prefer a unit test, a tiny script or a local request over production.
  5. Run the small case twice when that is safe. If it fails only sometimes, write the count (for example 2 of 10) instead of calling it steady.
  6. Stop. Do not edit product code while you still need the evidence. A change now can hide the failure.
  7. Hand over the brief: steps, environment, expected, actual, and how often it failed.
Expected: POST /login with a known user returns 200 and a session cookie.
Actual:   POST /login returns 500 "column email missing" on commit abc123, local, two runs in a row.

Gotchas

  • Do not paste secrets, session tokens, passwords or personal data into the brief. Redact logs first.
  • Do not reproduce a destructive case against production. Use a fixture or a staging copy you are allowed to break.
  • A long story with a theory at the top is not a repro. Lead with the two observable lines.
  • Intermittent does not mean unreal. Record the rate. Do not hide it by retrying until a green result appears.

Portability

Works for any language or host. A browser failure, an API failure and a CLI failure all use the same brief. If you use a ticket tool, paste the brief into the ticket and keep the failing test next to it.

Done when

  • Someone else can run the case from the brief alone.
  • Expected and actual are observable, and the case failed on a repeat run or the rate is written down.
  • No product code was changed while the brief was built, and no secret remains in it.

Example prompt

"The checkout button sometimes does nothing. Here is the report and the console text. Write the smallest reproduction and do not change the code yet."

---

Adapted from the reproduction-brief skill in github/awesome-copilot (MIT, Copyright GitHub, Inc.). See LICENSE.txt.

Bundled files

Licence

Adapted from GitHub awesome-copilot contributors (bug-reproduction-brief) (Copyright GitHub, Inc.), MIT License. Adapted by TheSkillVault: rewritten as a numbered brief (observed failure, environment, expected versus actual, shrink, repeat) with an original template; added secret handling, gotchas and done-when.

Licence: MIT License. Attribution when you reuse it: Based on work by GitHub awesome-copilot contributors (bug-reproduction-brief) (Copyright GitHub, Inc., MIT License), https://github.com/github/awesome-copilot/tree/5269f7ea2d6c3a9bfda5ed878b6726cf509121fd/skills/bug-reproduction-brief; adapted by TheSkillVault, https://theskillvault.ai