---
name: automated-test-driven-bug-fixing-and-pull
description: "Analyzes bug reports or feature tasks, writes reproduction tests, implements minimal code changes, and verifies test suites to prepare a pull request for review. Use when an agent is asked to fix a reported bug or deliver a feature from an issue prompt."
license: CC-BY-4.0
compatibility: "Needs access to: GitHub, Terminal."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-16"
  source: "https://botbento.com/usecases/automated-test-driven-bug-fixing-and-pull/"
  kind: skill
  hermes:
    tags: ["git", "testing", "code-review", "bugfix", "pull-request"]
    category: coding
    requires_toolsets: ["terminal"]
---
# Fix bugs from issue reports with tests

Reproduce an issue, write a failing test, patch the code, and prepare a PR for review

## When to use

Analyze bug descriptions and tickets, establish failing reproduction tests, implement necessary code adjustments, and compile verification results into a ready-to-merge pull request.

## Inputs

- `issue_or_feature_prompt`: Bug report, issue description, or feature task the agent must reproduce and address.
- `acceptance_criteria` (optional): Criteria the implemented change must satisfy; may be included in the issue or feature task.

## Steps

1. When you ask: Receive bug report or feature task (A person asks in chat with a bug report or feature task.)
2. Reproduce issue and verify tests
3. Request approval to submit pull request

## Instructions

When given an issue or feature prompt, inspect the repository to reproduce the problem and write automated test cases. Implement minimal code changes to satisfy acceptance criteria and verify that all test suites pass in the terminal. Do not push branches or open pull requests on GitHub without explicit user review and approval.

## Approvals

- Pushing branches to GitHub requires explicit user review and approval.
- Opening pull requests on GitHub requires explicit user review and approval.

## Output

Prepared code changes and test verification results, with a request for approval to push and open a pull request. (format: pull_request)

## Source

Summarized in our own words from [flow-next: Faster than your agent alone. And better. A workflow plugin that takes a bug, idea or ticket to a verified pull request: specs, c](https://github.com/gmickel/flow-next) (GitHub, checked 2026-10-16). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/automated-test-driven-bug-fixing-and-pull/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
