Back to Commands

/bug_fix

🌿Version & Control & Git

Systematic workflow for fixing bugs including issue creation, branch management, and PR submission

Arguments: <bug_description>
Allowed Tools: Bash(git *), Bash(gh *)

Quick Actions

Installation

Option A: Install as User Command (available in all projects)

macOS/Linux:

cp bug-fix.md ~/.claude/commands/

Windows:

copy bug-fix.md %USERPROFILE%\.claude\commands\

Option B: Install as Project Command (current project only)

macOS/Linux:

mkdir -p .claude/commands && cp bug-fix.md .claude/commands/

Windows:

mkdir .claude\commands 2>nul && copy bug-fix.md .claude\commands\

Note: After installation, restart Claude Code to load the new command.

Usage

Slash command:

/bug_fix <bug_description>

Command Instructions


Understand the bug: $ARGUMENTS


Before Starting:

  • GITHUB: create an issue with a short descriptive title.
  • GIT: checkout a branch and switch to it.

  • Fix the Bug


    On Completion:

  • GIT: commit with a descriptive message.
  • GIT: push the branch to the remote repository.
  • GITHUB: create a PR and link the issue.