Add Bug Branch

VerifiedCaution

Creates a new bug branch from an existing project branch by guiding the user through adding a single debugging challenge. Helps generate debugging exercises with a run.sh script that reproduces the failure.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#git#debugging#bug-challenge#automation

Recommended for

Automated summary

Creates a bug branch from an existing project branch with a single debugging challenge.

Strengths

  • Automates the creation of sequentially numbered bug branches.
  • Guides the user through adding a bug and creating a run script to reproduce the failure.
  • Verifies repository state and ensures all changes are committed before finishing.

Limitations

  • Requires the user to manually introduce the bug (no automatic bug generation).
  • Does not handle complex multi-file bugs – intended for a single, simple bug.
When to use it

When you want to create a structured debugging challenge with a dedicated branch, reproduction script, and clear numbering.

When not to use it

If you need to automatically generate a bug or handle complex bugs with multiple dependencies.

Security analysis

Caution
Quality score90/100

The skill uses git and bash to create branches and run user-specified commands. While not inherently malicious, it allows the user to supply any command that will be executed, posing a risk if the user provides dangerous input. No input sanitization is mentioned.

Findings
  • •The skill instructs the execution of user-provided shell commands (via run.sh and uv run), which could be arbitrary and potentially destructive. It also uses git operations that modify the repository state.
How this analysis is made

Examples

Basic usage
/add-bug
Specifying project name
/add-bug
Project name: tinydb
Providing description upfront
/add-bug
Project name: quixbugs-challenge
Description: Add off-by-one error in loop condition

name: add-bug description: Create a new bug branch from an existing project branch with a single debugging challenge

Add Bug Branch

Creates a new bug branch from an existing project branch with a single debugging challenge.

Usage

/add-bug

Instructions

When this command is invoked:

  1. Ask the user for required information:

    • Project name (the base project branch, e.g., tinydb, quixbugs-challenge)
    • Bug number (or auto-detect next available number)
    • Brief description of what bug they want to add (optional, for commit message)
  2. Verify current state:

    • Confirm the project branch exists
    • Check for uncommitted changes (warn if any exist)
    • Find the next available bug number by checking for existing <project-name>-bug* branches
  3. Create the bug branch:

    git checkout <project-name>
    git checkout -b <project-name>-bug<N>
    
  4. Guide the user through adding the bug:

    • Explain that they should now: a. Modify the code to introduce the bug b. Verify the bug causes a test failure or observable issue
    • Wait for the user to make their changes (don't make code changes automatically)
  5. Help create the run script:

    • Ask the user what command reproduces the bug (e.g., pytest tests/test_foo.py::test_bar)
    • Create run.sh with the appropriate command:
      #!/bin/bash
      uv run <command>
      
    • Make it executable: chmod +x run.sh
  6. Commit the bug:

    git add .
    git commit -m "[<project-name>] Add bug <N>: <description>"
    
  7. Verify the setup:

    • Test that ./run.sh reproduces the failure
    • Confirm all changes are committed
  8. Provide next steps:

    • Suggest pushing the branch: git push -u origin <project-name>-bug<N>
    • Remind that this branch is now a complete debugging challenge

Context

Bug branches are the actual debugging challenges given to participants. Each bug branch should:

  • Contain exactly ONE bug (not multiple bugs)
  • Have a run.sh script that demonstrates the failure
  • Be small enough to debug within 30 minutes
  • Have bugs that aren't obvious from simple code inspection
  • Include clear test failures or observable incorrect behavior

Types of Bugs

According to academic software engineering research, the majority of all bug fixes are one of two kinds:

  1. Changes to a conditional path (adding a predicate to a branch, adding/removing a branch, adding an early exit branch)
  2. Changing a method call by changing the expression passed to the method or changing the shape of the method call

Thus, bugs that we add should prefer to have solutions that are one of these types of fixes.

Guidelines for Good Bugs

A good 30-minute debugging challenge should:

  • ✅ Require executing code to understand the failure
  • ✅ Have bugs that aren't obvious from simple inspection
  • ✅ Be small enough to debug within the time limit
  • ✅ Have clear test cases that show failures
  • ✅ Test realistic debugging scenarios
  • ❌ Not be solvable by just reading the code for 5 minutes
  • ❌ Not be so complex that understanding the code takes most of the time

Bug Numbering

Bug numbers should be sequential per project. If tinydb-bug1 and tinydb-bug2 exist, the next bug should be tinydb-bug3.

The skill should auto-detect the next available number, but allow the user to override if needed.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/add-bug-branch-mm78nnva/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/add-bug-branch-mm78nnva' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/add-bug-branch-mm78nnva/download' --output '.skill-downloads/add-bug-branch-mm78nnva/SKILL.md.part' && mv '.skill-downloads/add-bug-branch-mm78nnva/SKILL.md.part' '.skill-downloads/add-bug-branch-mm78nnva/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/add-bug-branch-mm78nnva/SKILL.md' && test -s '.skill-downloads/add-bug-branch-mm78nnva/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/add-bug' && cp -R '.skill-downloads/add-bug-branch-mm78nnva' '.claude/skills/add-bug'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/add-bug-branch-mm78nnva'

openskills read 'add-bug-branch-mm78nnva'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/add-bug-branch-mm78nnva/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills