agentleFS
magia187magia187/premium-agent-skills/skills/repro-first/SKILL.md

repro-first

Skill0 starsChanged 2 months agoMITView on GitHub

Use when fixing a bug or investigating unexpected behavior. Reproduce the failure with a minimal failing case before changing production code, so the fix is grounded in evidence and verifiable.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not delete databases, wipe volumes, or reset shared environments without explicit confirmation.

    line 27
  2. Distinctive:

    Prefer read-only inspection first.

    line 28
  3. Distinctive:

    Run that case and record the exact failure (message, exit code, artifact).

    line 34
  4. Distinctive:

    Only then change code — keep the repro as the verification oracle.

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Repro First

When to use

  • A bug report, failing CI job, or user-reported incorrect behavior needs a fix.
  • The user asks to "fix", "debug", or "investigate" without a confirmed repro.
  • You are tempted to patch code based on a stack trace alone.

When not to use

  • The failing test or minimal repro already exists and reliably fails.
  • Pure documentation, rename, or formatting changes with no behavioral claim.
  • Exploratory spikes where the goal is understanding APIs, not fixing a defect.

Assumptions

  • Shell access to run the project's test runner, build, or app entrypoint.
  • Ability to capture logs, exit codes, and (when relevant) screenshots or HTTP traces.
  • Do not delete databases, wipe volumes, or reset shared environments without explicit confirmation.
  • Prefer read-only inspection first; mutating fixtures or seed data requires confirmation if shared.

Workflow

  1. Restate the observed vs expected behavior in one sentence each.
  2. Locate or create the smallest input that triggers the failure.
  3. Run that case and record the exact failure (message, exit code, artifact).
  4. Only then change code — keep the repro as the verification oracle.
  5. Confirm the same case passes after the fix; note any remaining related failures.

Steps

  1. Capture symptoms — Quote the error, failing assertion, or incorrect output. Note version/branch/commit if known.
  2. Bisect the surface — Prefer a unit/integration test over a full UI path. Strip unrelated setup until the failure still occurs.
  3. Automate the repro — Add or update a test (or a script under scripts/) that fails for the right reason. Avoid flaky timing; use deterministic inputs.
  4. Hypothesis lock — Write one sentence naming the suspected cause. Do not implement until the failing case is green to reproduce (red bar).
  5. Minimal fix — Change only what the failing case requires. No drive-by refactors.
  6. Verify — Re-run the repro (now green) plus the nearest existing suite for the same module.

Success criteria

  • A minimal failing case existed (or was created) before production code changed.
  • The failure reason matches the reported bug, not a different incidental error.
  • After the fix, the same case passes with the same commands.
  • No speculative cleanup landed in the same change unless required for the fix.
  • Destructive environment resets were confirmed or avoided.

Out of scope

  • Performance tuning without a correctness failure (use perf-measure-first).
  • Broad rewrite of the module under investigation.
  • Triaging flaky tests that pass on retry (use flaky-test-triage).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.