agentleFS
Baba01hacker666Baba01hacker666/dummyskills/skills/bug-reproducer/SKILL.md

bug-reproducer

Skill0 starsChanged 2 months agoMITView on GitHub

Constructs a minimal, deterministic reproduction script or command for a reported bug before any fix is attempted.

  • Reads credentials

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 9 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 14
  2. Distinctive:

    Before modifying source code to fix an issue.

    line 16
  3. Very specific:

    Do not use to write or apply the code fix.

    line 20
  4. Very specific:

    Do not use to write permanent test suite integration.

    line 21
  5. Very specific:

    Do not use to diagnose a build/system command failure.

    line 22
  6. Distinctive:

    If expected behavior or actual behavior is omitted: ask the user for the missing expectation.

    line 29
  7. Distinctive:

    If reproduction steps are vague (e.g.

    line 30
  8. Distinctive:

    Do not modify repository source code while constructing reproductions.

    line 31
  9. Distinctive:

    Follow these numbered actions:

    line 34
  10. Very specific:

    Write a self-contained script or one-line command (e.g.

    line 40
  11. Distinctive:

    If the command passes instead of failing: the bug is not reproduced.

    line 47
  12. Distinctive:

    If reproduction requires network or paid external APIs: mock or stub the external call locally.

    line 48
  13. Very specific:

    If reproduction deletes data: use a temporary scratch directory (/tmp or test_scratch/).

    line 49
  14. Distinctive:

    Stop and ask the user when:

    line 88

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

Bug Reproducer

Isolates a reported issue into a single, reliable reproduction command or script. Proves the existence of a bug before writing fixes.

1. Purpose

Turn ambiguous bug reports into a standalone test case that exits with a failure code (non-zero). A "Reproduction" is a deterministic command that consistently triggers the defect.

2. When to Use

Use this skill when:

  • A bug or crash report is received.
  • Before modifying source code to fix an issue.
  • Isolating whether a bug is in local code or an external dependency.

3. When Not to Use

  • Do not use to write or apply the code fix; use minimal-bug-fix.
  • Do not use to write permanent test suite integration; use regression-test-writer.
  • Do not use to diagnose a build/system command failure; use command-failure-diagnoser.

4. Required Inputs

  • bug_report: Description of the faulty behavior, inputs, and expected vs actual results.
  • workspace_root: Directory of the target repository.

5. Missing-Input Behavior

  1. If expected behavior or actual behavior is omitted: ask the user for the missing expectation.
  2. If reproduction steps are vague (e.g. "it failed randomly"): search recent commit logs or issue tickets for stack traces before escalating.
  3. Do not modify repository source code while constructing reproductions.

6. Procedure

Follow these numbered actions:

  1. Action 1: Identify the Minimal Failing Input
    • Strip away unrelated parameters, large payloads, or background tasks.
  2. Action 2: Identify the Entry Point or Trigger Function
    • Find the exact CLI command, HTTP endpoint, or function call.
  3. Action 3: Create a Minimal Standalone Reproduction
    • Write a self-contained script or one-line command (e.g. python3 test_repro.py or curl ...).
  4. Action 4: Run Reproduction Once
    • Confirm it fails with the reported symptom.
  5. Action 5: Emit Reproduction Report
    • Format using Section 8.

7. Decision Rules

  • If the command passes instead of failing: the bug is not reproduced. Do not proceed to fix; refine the input parameters.
  • If reproduction requires network or paid external APIs: mock or stub the external call locally.
  • If reproduction deletes data: use a temporary scratch directory (/tmp or test_scratch/).

8. Output Format

Emit the reproduction report using this template:

### Bug Reproduction: [Bug Title]

- **Status**: [REPRODUCED | UNREPRODUCED | FLAKY]
- **Target File**: `[source file suspected]`
- **Reproduction Command**: `[Exact command]`

#### Minimal Failing Input
```text
[Input payload or invocation]

Observed Output (Failure)

[Exact stderr or traceback]

Expected Output

[What should happen when fixed]

## 9. Verification Checklist
- [ ] The reproduction command was executed and failed with the expected symptom.
- [ ] No production source files were modified.
- [ ] The reproduction does not depend on uncommitted temporary hacks.

## 10. Common Failures and Recovery
| Failure Symptom | Cause | Recovery Action |
| :--- | :--- | :--- |
| Bug does not trigger | Missing environment variables | Inspect `.env.example` and set dummy variables. |
| Non-deterministic failure | Concurrency or timing race | Pin random seeds or reduce concurrency to 1 thread. |

## 11. Stop or Escalation Conditions
Stop and ask the user when:
- The bug requires unavailable hardware, OS-specific features, or external database credentials.

## 12. Examples

### Example 1: Successful Execution
**Input:**
```text
Bug: Calling `formatName("")` throws Uncaught TypeError: Cannot read properties of undefined.
File: src/formatter.js

Output:

### Bug Reproduction: TypeError in formatName on Empty String

- **Status**: REPRODUCED
- **Target File**: `src/formatter.js`
- **Reproduction Command**: `node -e "require('./src/formatter').formatName('')"`

#### Minimal Failing Input
```javascript
formatName("")

Observed Output (Failure)

TypeError: Cannot read properties of undefined (reading 'split')
    at Object.formatName (/src/formatter.js:12:18)

Expected Output

Returns empty string "" without throwing an exception.

### Example 2: Ambiguous or Failure Case
**Input:**
```text
Bug: "Search is broken sometimes."

Output:

### Bug Reproduction: UNREPRODUCED - Insufficient Parameters

- **Status**: UNREPRODUCED
- **Target File**: TBD

The description "Search is broken sometimes" lacks specific search queries, HTTP parameters, or error messages. 
Please provide:
1. An example search query that fails.
2. The user role or authentication state.
3. The observed HTTP status code or UI error.

Example 3: Expected Final Output

Output:

### Bug Reproduction: Zero Division in Discount Calculator

- **Status**: REPRODUCED
- **Target File**: `src/pricing.py`
- **Reproduction Command**: `python3 -c "from src.pricing import calculate_rate; calculate_rate(100, 0)"`

#### Minimal Failing Input
```python
calculate_rate(price=100, original=0)

Observed Output (Failure)

ZeroDivisionError: division by zero

Expected Output

Returns 0.0 or raises InvalidDiscountError.

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.