commit-commands

Commands for git commit workflows including commit, push, and PR creation

View on GitHub
Author Anthropic
Namespace @anthropics/claude-plugins-official
Category productivity
Version 1.0.0
Stars 5,333
Downloads 6
self.md verified
Table of content

Commands for git commit workflows including commit, push, and PR creation

Installation

npx claude-plugins install @anthropics/claude-plugins-official/commit-commands

Contents

Folders: commands

Files: README.md

Documentation

Streamline your git workflow with simple commands for committing, pushing, and creating pull requests.

Overview

The Commit Commands Plugin automates common git operations, reducing context switching and manual command execution. Instead of running multiple git commands, use a single slash command to handle your entire workflow.

Commands

/commit

Creates a git commit with an automatically generated commit message based on staged and unstaged changes.

What it does:

  1. Analyzes current git status
  2. Reviews both staged and unstaged changes
  3. Examines recent commit messages to match your repository’s style
  4. Drafts an appropriate commit message
  5. Stages relevant files
  6. Creates the commit

Usage:

/commit

Example workflow:

# Make some changes to your code
# Then simply run:
/commit

# Claude will:
# - Review your changes
# - Stage the files
# - Create a commit with an appropriate message
# - Show you the commit status

Features:

/commit-push-pr

Complete workflow command that commits, pushes, and creates a pull request in one step.

What it does:

  1. Creates a new branch (if currently on main)
  2. Stages and commits changes with an appropriate message
  3. Pushes the branch to origin
  4. Creates a pull request using gh pr create
  5. Provides the PR URL

Usage:

/commit-push-pr

Example workflow:

# Make your changes
# Then run:
/commit-push-pr

# Claude will:
# - Create a feature branch (if needed)
# - Commit your changes
# - Push to remote
# - Open a PR with summary and test plan
# - Give you the PR URL to review

Features:

Requirements:

/clean_gone

Cleans up local branches that have been deleted from the remote repository.

What it does:

  1. Lists all local branches to identify [gone] status
  2. Identifies and removes worktrees associated with [gone] branches
  3. Deletes all branches marked as [gone]
  4. Provides feedback on removed branches

Usage:

/clean_gone

Example workflow:

# After PRs are merged and remote branches are deleted
/clean_gone

# Claude will:
# - Find all branches marked as [gone]
# - Remove any associated worktrees
# - Delete the stale local branches
# - Report what was cleaned up

Features:

When to use:

Installation

This plugin is included in the Claude Code repository. The commands are automatically available when using Claude Code.

Best Practices

Using /commit

Using /commit-push-pr

Using /clean_gone

Workflow Integration

Quick commit workflow:

# Write code
/commit
# Continue development

Feature branch workflow:

# Develop feature across multiple commits
/commit  # First commit
# More changes
/commit  # Second commit
# Ready to create PR
/commit-push-pr

Maintenance workflow:

# After several PRs are merged
/clean_gone
# Clean workspace ready for next feature

Requirements

Troubleshooting

/commit creates empty commit

Issue: No changes to commit

Solution:

/commit-push-pr fails to create

…(truncated)

Source

View on GitHub

Tags: productivity